sunfoxcz/coding-standard

Sunfox coding standard

2.0.0 2020-03-28 20:43 UTC

This package is auto-updated.

Last update: 2020-07-11 21:47:26 UTC


README

This is set of sniff and fixers combined under EasyCodingStandard that checks and fixes your PHP code.

Versions

Nette Coding Standard ^1.0 ^2.0
PHP ^7.1 ^7.2
symplify/easy-coding-standard ^6.0.4 ^7.2
nette/coding-standard ^2.2 ^2.3
slevomat/coding-standard 5.0.4 ^6.0

Installation

composer require sunfoxcz/coding-standard:^2.0

Example ecs.yml

imports:
    - { resource: 'vendor/sunfoxcz/coding-standard/config/sunfox.yml' }

parameters:
    cache_directory: .ecs_cache
    indentation: spaces
    exclude_files:
        - 'projects/*/temp/cache/*'
        - 'projects/*/temp/proxies/*'
    exclude_checkers:
        - 'SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff'
        - 'Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDocBlockFixer'
    skip:
        PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff.NotCamelCaps: ~
        SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff.WriteOnlyProperty: ~
        SlevomatCodingStandard\Sniffs\TypeHints\TypeHintDeclarationSniff.MissingTraversableParameterTypeHintSpecification: ~
        SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff.UnusedProperty:
            - 'app/Model/Entities/Pay.php'