hereldar/coding-style

PHP Coding Style rules for my projects.

Maintainers

Package info

github.com/hereldar/php-coding-style

Issues

pkg:composer/hereldar/coding-style

Statistics

Installs: 1 232

Dependents: 3

Suggesters: 0

Stars: 0

0.1.3 2024-06-23 08:30 UTC

This package is auto-updated.

Last update: 2026-03-23 12:18:42 UTC


README

PHP Type Coverage Psalm Level Packagist License

Opinionated linting configuration inspired on Codely's Coding Style.

How to use

Install the package via Composer:

composer require --dev hereldar/coding-style

Create a ecs.php file in the root of your project:

use Hereldar\CodingStyle;
use Symplify\EasyCodingStandard\Config\ECSConfig;

return ECSConfig
    ::configure()
    ->withSets([
        CodingStyle::PROJECTS,
    ])
    ->withPaths([
        __DIR__.'/src',
        __DIR__.'/tests',
    ])
    ->withRootFiles();

Execute the following command to see the suggested changes:

vendor/bin/ecs

To actually fix your code, add --fix:

vendor/bin/ecs --fix

For more information, check the Easy Coding Standard documentation

What it does

Checks the code style of your project using: