umbrellio / code-style-php
Umbrellio php code style.
Installs: 59 953
Dependents: 11
Suggesters: 0
Security: 0
Stars: 7
Watchers: 5
Forks: 1
Open Issues: 0
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4
- symplify/easy-coding-standard: ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
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)
- EasyCodingStandard - used library.
- code-style - linter settings for other languages.
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