Settings used in Umbrellio php projects.
Install via composer:
php composer.phar require --dev umbrellio/code-style-php
Create config ecs.yml
:
imports:
- { resource: vendor/umbrellio/code-style-php/umbrellio-cs.yml }
If major version of EasyCodingStandard 9 or higher
create config ecs.php
:
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function(ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->import(__DIR__ . '/vendor/umbrellio/code-style-php/umbrellio-cs.php');
};
Run in CLI:
vendor/bin/ecs check src --fix --config=ecs.yml
or:
vendor/bin/ecs check src --fix --config=ecs.php
- EasyCodingStandard - used library.
- code-style - linter settings for other languages.
Released under MIT License.
- Fork it ( https://github.com/umbrellio/code-style-php )
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create new Pull Request