|
| 1 | +<?php |
| 2 | + |
| 3 | +$header = 'The MIT License (MIT) |
| 4 | +
|
| 5 | +Copyright (c) 2014-2018 Spomky-Labs |
| 6 | +
|
| 7 | +This software may be modified and distributed under the terms |
| 8 | +of the MIT license. See the LICENSE file for details.'; |
| 9 | + |
| 10 | +$finder = PhpCsFixer\Finder::create() |
| 11 | + ->in(__DIR__.'/src') |
| 12 | + ->in(__DIR__.'/performance') |
| 13 | + ->in(__DIR__.'/tests') |
| 14 | +; |
| 15 | + |
| 16 | +return PhpCsFixer\Config::create() |
| 17 | + ->setRules([ |
| 18 | + '@PSR1' => true, |
| 19 | + '@PSR2' => true, |
| 20 | + '@Symfony' => true, |
| 21 | + '@DoctrineAnnotation' => true, |
| 22 | + '@PHP70Migration' => true, |
| 23 | + '@PHP71Migration' => true, |
| 24 | + 'strict_param' => true, |
| 25 | + 'strict_comparison' => true, |
| 26 | + 'array_syntax' => ['syntax' => 'short'], |
| 27 | + 'array_indentation' => true, |
| 28 | + 'ordered_imports' => true, |
| 29 | + 'protected_to_private' => true, |
| 30 | + 'declare_strict_types' => true, |
| 31 | + 'native_function_invocation' => [ |
| 32 | + 'include' => ['@compiler_optimized'], |
| 33 | + 'scope' => 'namespaced', |
| 34 | + ], |
| 35 | + 'mb_str_functions' => true, |
| 36 | + 'method_chaining_indentation' => true, |
| 37 | + 'linebreak_after_opening_tag' => true, |
| 38 | + 'combine_consecutive_issets' => true, |
| 39 | + 'combine_consecutive_unsets' => true, |
| 40 | + 'compact_nullable_typehint' => true, |
| 41 | + 'no_superfluous_phpdoc_tags' => true, |
| 42 | + 'no_superfluous_elseif' => true, |
| 43 | + 'phpdoc_trim_consecutive_blank_line_separation' => true, |
| 44 | + 'phpdoc_order' => true, |
| 45 | + 'pow_to_exponentiation' => true, |
| 46 | + 'simplified_null_return' => true, |
| 47 | + 'header_comment' => [ |
| 48 | + 'header' => $header, |
| 49 | + ], |
| 50 | + 'align_multiline_comment' => [ |
| 51 | + 'comment_type' => 'all_multiline', |
| 52 | + ], |
| 53 | + 'php_unit_test_annotation' => [ |
| 54 | + 'case' => 'snake', |
| 55 | + 'style' => 'annotation', |
| 56 | + ], |
| 57 | + 'php_unit_test_case_static_method_calls' => true, |
| 58 | + ]) |
| 59 | + ->setRiskyAllowed(true) |
| 60 | + ->setUsingCache(true) |
| 61 | + ->setFinder($finder) |
| 62 | + ; |
0 commit comments