Using PHP-CS-Fixer.
This coding standard deviates from the PSR, focusing on comfort and ergonomics for me.
Important
This package is still in development, and intended for internal use.
This package is not (yet) available on packagist, but you can install manually by editing your coposer.json
file:
{
"require-dev": {
"northrook/php-cs": "dev-main"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/northrook/php-cs"
}
]
}
Then copy the included .php-cs-fixer.dist.php
file from
/vendor/northrook/php-cs/.php-cs-fixer.dist.php
to the project root.
Run the fixer mnually in the console:
./vendor/bin/php-cs-fixer fix
Your IDE might also have an integration, like PhpStorm.