|
| 1 | +#!/usr/bin/env php |
| 2 | +<?php |
| 3 | + |
| 4 | +$finder = PhpCsFixer\Finder::create() |
| 5 | + ->in(__DIR__); |
| 6 | + |
| 7 | +return PhpCsFixer\Config::create() |
| 8 | + ->setRiskyAllowed(true) |
| 9 | + ->setRules([ |
| 10 | + '@PhpCsFixer' => true, |
| 11 | + '@PhpCsFixer:risky' => true, |
| 12 | + '@Symfony' => true, |
| 13 | + '@Symfony:risky' => true, |
| 14 | + 'array_syntax' => ['syntax' => 'short'], |
| 15 | + 'declare_strict_types' => true, |
| 16 | + 'binary_operator_spaces' => ['operators' => ['=>' => 'single_space']], |
| 17 | + 'fopen_flags' => ['b_mode' => true], |
| 18 | + 'fully_qualified_strict_types' => true, |
| 19 | + 'global_namespace_import' => ['import_functions' => true], |
| 20 | + 'heredoc_indentation' => true, |
| 21 | + 'linebreak_after_opening_tag' => true, |
| 22 | + 'list_syntax' => ['syntax' => 'short'], |
| 23 | + 'multiline_whitespace_before_semicolons'=> false, |
| 24 | + 'native_function_invocation' => true, |
| 25 | + 'no_null_property_initialization' => true, |
| 26 | + 'no_unreachable_default_argument_value' => true, |
| 27 | + 'no_useless_else' => true, |
| 28 | + 'no_useless_return' => true, |
| 29 | + 'non_printable_character' => false, |
| 30 | + 'not_operator_with_space' => false, |
| 31 | + 'not_operator_with_successor_space' => false, |
| 32 | + 'ordered_class_elements' => true, |
| 33 | + 'ordered_imports' => true, |
| 34 | + 'php_unit_internal_class' => false, |
| 35 | + 'php_unit_strict' => true, |
| 36 | + 'php_unit_test_case_static_method_calls'=> true, |
| 37 | + 'php_unit_test_class_requires_covers' => false, |
| 38 | + 'phpdoc_order' => true, |
| 39 | + 'phpdoc_to_comment' => false, |
| 40 | + 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], |
| 41 | + 'random_api_migration' => true, |
| 42 | + 'simplified_null_return' => false, |
| 43 | + 'single_line_throw' => false, |
| 44 | + 'strict_comparison' => true, |
| 45 | + 'strict_param' => true, |
| 46 | + 'ternary_to_null_coalescing' => true, |
| 47 | + 'void_return' => true, |
| 48 | + ]) |
| 49 | + ->setFinder($finder) |
| 50 | + ->setCacheFile(__DIR__.'/.php_cs.cache'); |
0 commit comments