arty / php-coding-standard
Static analysis tools config for PHP projects, by arty.
Package info
github.com/ArthurJCQ/php-coding-standard
Type:phpcodesniffer-standard
pkg:composer/arty/php-coding-standard
v3.0.0
2026-03-07 10:09 UTC
Requires
- php: ^8.4
- phpat/phpat: ^0.12.3
- phpstan/phpstan: ^2.1
- phpstan/phpstan-symfony: ^2.0
- slevomat/coding-standard: ^8.24
- squizlabs/php_codesniffer: ^4.0
Requires (Dev)
- jangregor/phpstan-prophecy: ^2.2
- phpspec/prophecy-phpunit: ^2.4
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.0 || ^12.4
- roave/security-advisories: dev-latest
- dev-main
- v3.0.0
- v2.1.0
- v2.0.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-feat/add-phpat
- dev-claude/review-pr-changes-yYmyi
- dev-dependabot/github_actions/zgosalvez/github-actions-ensure-sha-pinned-actions-4.0.1
- dev-dependabot/github_actions/shivammathur/setup-php-2.36.0
- dev-dependabot/github_actions/actions/upload-artifact-6.0.0
- dev-dependabot/github_actions/mikepenz/action-junit-report-6.1.0
- dev-dependabot/github_actions/actions/checkout-6.0.1
This package is auto-updated.
Last update: 2026-03-07 10:11:27 UTC
README
This is the coding style tools config I use everyday on my projects.
it includes :
- PHPCS for code sniffing.
- PHPStan for static bug finding into code.
- PHPAt as phpstan extension for architecture validation
Installation
Installation with composer :
composer require arty/php-coding-standard --dev
Usage
PHPCS
In your project, create a phpcs.xml file and fill it up with :
<?xml version="1.0"?> <ruleset name="Arty Coding Standard" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/squizlabs/php_codesniffer/phpcs.xsd"> <rule ref="./vendor/arty/php-coding-standard/lib/phpcs/phpcs.xml" /> </ruleset>
Run it with :
$ ./vendor/bin/phpcs src
PHPStan
In your project, create a phpstan.neon file and fill it up with :
includes: - vendor/arty/php-coding-standard/lib/phpstan/phpstan.neon
Run it with :
$ ./vendor/bin/phpstan analyse --level=max src
PHPAT
Validate Architecture.
A minimal Clean Architecture validation is provided, activate it by adding this to your phpstan.neon:
services: - class: ArtyCodingStandard\PHPAt\CleanArchitectureTest tags: - phpat.test