|
| 1 | +<?php |
| 2 | + |
| 3 | +$header = <<<'EOF' |
| 4 | +This file is part of WickedOne\PHPCSReporter. |
| 5 | +
|
| 6 | + |
| 7 | +
|
| 8 | +For the full copyright and license information, please view the LICENSE |
| 9 | +file that was distributed with this source code. |
| 10 | +EOF; |
| 11 | + |
| 12 | +return (new PhpCsFixer\Config()) |
| 13 | + ->setRiskyAllowed(true) |
| 14 | + ->setRules(array( |
| 15 | + '@Symfony' => true, |
| 16 | + '@Symfony:risky' => true, |
| 17 | + 'combine_consecutive_unsets' => true, |
| 18 | + 'array_syntax' => array('syntax' => 'short'), |
| 19 | + 'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']], |
| 20 | + 'header_comment' => array('header' => $header), |
| 21 | + 'no_useless_else' => true, |
| 22 | + 'no_useless_return' => true, |
| 23 | + 'ordered_class_elements' => true, |
| 24 | + 'ordered_imports' => true, |
| 25 | + 'php_unit_strict' => true, |
| 26 | + 'phpdoc_add_missing_param_annotation' => true, |
| 27 | + 'psr_autoloading' => true, |
| 28 | + 'strict_comparison' => true, |
| 29 | + 'strict_param' => true, |
| 30 | + 'fopen_flags' => array('b_mode' => true), |
| 31 | + )) |
| 32 | + ->setFinder( |
| 33 | + (new PhpCsFixer\Finder()) |
| 34 | + ->in([__DIR__ . '/src/']) |
| 35 | + ->name('*.php') |
| 36 | + ); |
0 commit comments