PHP Coding Style rules we use in Codely
Opinionated linting configuration considering modern PHP best practices and providing consistency. 👌
Take a look, play and have fun with this.
Stars are welcome 😊
composer require --dev codelytv/coding-style
ecs.php
file:
use CodelyTv\CodingStyle;
use Symplify\EasyCodingStandard\Config\ECSConfig;
return function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([__DIR__ . '/src',]);
$ecsConfig->sets([CodingStyle::DEFAULT]);
// Or this if you prefer to have the code aligned
// $ecsConfig->sets([CodingStyle::ALIGNED]);
};
./vendor/bin/ecs check
ecs.php
:
use Symplify\EasyCodingStandard\ValueObject\Option;
ecsConfig->indentation(Option::INDENTATION_SPACES);
Simply create a new GitHub Release following semantic versioning.
Publishing this package we are committing ourselves to the following code quality standards: