zibios/wrike-php-library

View on GitHub
.php_cs.dist

Summary

Maintainability
Test Coverage
<?php
if (!file_exists(__DIR__.'/src')) {
    exit(0);
}

$header = <<<'EOF'
This file is part of the zibios/wrike-php-library package.

(c) Zbigniew Ślązak

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return PhpCsFixer\Config::create()
    ->setUsingCache(false)
    ->setRiskyAllowed(true)
    ->setRules(
        [
            '@Symfony' => true,
            '@Symfony:risky' => true,
            '@PSR1' => true,
            '@PSR2' => true,
            'psr4' => true,
            'psr0' => true,
            'strict_param' => true,
            'php_unit_strict' => true,
            'date_time_immutable' => true,
            'declare_strict_types' => true,
            'array_syntax' => ['syntax' => 'short'],
            'braces' => ['allow_single_line_closure' => true],
            'header_comment' => ['header' => $header],
            'phpdoc_add_missing_param_annotation' => true,
            'phpdoc_order' => true,
            'ordered_imports' => true,
            'ordered_class_elements' => true,
            'concat_space' => ['spacing' => 'one'],
            'explicit_indirect_variable' => true,
            'explicit_string_variable' => true,
        ]
    )
    ->setFinder(
        PhpCsFixer\Finder::create()
            ->in(__DIR__)
            ->exclude(['build', 'docs', 'vendor'])
    );