johninamillion / php-code-styles
PHP-CS-Fixer configuration and PHPStan setup for PHP projects.
Installs: 40
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/johninamillion/php-code-styles
Requires
- php: ^8.2
- friendsofphp/php-cs-fixer: ^3.80
- johninamillion/scripture-header: ^0.2.0
- phpstan/phpstan: ^2.0
Requires (Dev)
- roave/security-advisories: dev-latest
README
PHP Code-Styles for PHP-CS-Fixer.
Table of Contents
Installation
You can install the package via Composer:
composer require --dev johninamillion/php-code-styles
Add the following scripts to your composer.json file:
{
"scripts": {
"post-install-cmd": [
"johninamillion\\CodeStyles\\Composer::install"
],
"post-update-cmd": [
"johninamillion\\CodeStyles\\Composer::update"
],
"code:analyse": "./vendor/bin/phpstan analyse",
"code:format": "./vendor/bin/php-cs-fixer fix"
}
}
Usage
Fix code styles with PHP-CS-Fixer:
composer code:format
Analyse your code with PHPStan:
composer code:analyse
License
This package is licensed under the MIT License. See the LICENSE file for more details.
All Glory To God - The Father, The Son, and The Holy Spirit.