retailcrm/php-code-style

There is no license information available for the latest version (v1.0.2) of this package.

Defaults for php linters and code style fixers

v1.0.2 2024-05-06 07:32 UTC

This package is auto-updated.

Last update: 2024-05-06 15:10:21 UTC


README

Дефолтные настройки для PhpCsFixer.

Установка

  1. Выполняем composer require --dev retailcrm/php-code-style ^1.0

  2. Используем в .php_cs.dist

    <?php
    
    $finder = PhpCsFixer\Finder::create()
        ->in(__DIR__ . '/src')
        // ... и другие папки, за которыми должен следить PhpCsFixer
    ;
    
    return Retailcrm\PhpCsFixer\Defaults::rules()
        ->setFinder($finder)
        // ->setCacheFile(__DIR__ . '/var/.php_cs.cache');

PHPStorm

  1. Если вы используете плагин Php Inspections (EA Extended). Измените настройки инспекции:

    • Static methods invocation via '->' - установите флаг Except PHPUnit assertions