umbrellio/code-style-php

Umbrellio php code style.

2.0 2024-05-02 17:05 UTC

This package is auto-updated.

Last update: 2024-11-02 18:14:57 UTC


README

Settings used in Umbrellio php projects.

Installation

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');
};

Usage

Run in CLI:

vendor/bin/ecs check src --fix --config=ecs.yml

or:

vendor/bin/ecs check src --fix --config=ecs.php

Dependencies (and Links)

License

Released under MIT License.

Contributing

  • 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
Supported by Umbrellio