apiera / php-standards
PHP code quality configurations enforcing strict typing and clean code practices
Installs: 101
Dependents: 3
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
pkg:composer/apiera/php-standards
Requires
- php: ^8.3
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.1
- slevomat/coding-standard: ^8.15
- squizlabs/php_codesniffer: ^3.11
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-27 16:11:12 UTC
README
Central repository for PHP coding standards and static analysis configurations.
Installation
composer require apiera/php-standards --dev
Components
Usage
Add to your composer.json:
{
"scripts": {
"cs": "phpcs --standard=vendor/apiera/php-standards/phpcs/ruleset.xml src/",
"cs:fix": "phpcbf --standard=vendor/apiera/php-standards/phpcs/ruleset.xml src/",
"stan": "phpstan analyse -c vendor/apiera/php-standards/phpstan/phpstan.neon src/",
"analyse": [
"@cs",
"@stan"
]
}
}
Then run:
composer cs # Check code style composer cs:fix # Fix code style issues composer stan # Run static analysis composer analyse # Run all checks