|
| 1 | +<?php |
| 2 | + |
| 3 | +return PhpCsFixer\Config::create() |
| 4 | + ->setFinder( |
| 5 | + \Symfony\Component\Finder\Finder::create() |
| 6 | + ->in([ |
| 7 | + __DIR__ . '/src', |
| 8 | + __DIR__ . '/tests', |
| 9 | + ]) |
| 10 | + ->name('*.php') |
| 11 | + ) |
| 12 | + ->setRiskyAllowed(true) |
| 13 | + ->setRules([ |
| 14 | + '@PSR2' => true, |
| 15 | + 'align_multiline_comment' => true, |
| 16 | + 'array_indentation' => true, |
| 17 | + 'declare_strict_types' => true, |
| 18 | + 'final_class' => true, |
| 19 | + 'global_namespace_import' => [ |
| 20 | + 'import_classes' => true, |
| 21 | + 'import_constants' => true, |
| 22 | + 'import_functions' => true, |
| 23 | + ], |
| 24 | + 'list_syntax' => [ |
| 25 | + 'syntax' => 'short', |
| 26 | + ], |
| 27 | + 'lowercase_constants' => true, |
| 28 | + 'multiline_comment_opening_closing' => true, |
| 29 | + 'native_function_casing' => true, |
| 30 | + 'no_empty_phpdoc' => true, |
| 31 | + 'no_leading_import_slash' => true, |
| 32 | + 'no_superfluous_phpdoc_tags' => [ |
| 33 | + 'allow_mixed' => true, |
| 34 | + ], |
| 35 | + 'no_unused_imports' => true, |
| 36 | + 'no_useless_else' => true, |
| 37 | + 'no_useless_return' => true, |
| 38 | + 'ordered_imports' => [ |
| 39 | + 'imports_order' => ['class', 'function', 'const'], |
| 40 | + ], |
| 41 | + 'ordered_interfaces' => true, |
| 42 | + 'php_unit_test_annotation' => true, |
| 43 | + 'php_unit_test_case_static_method_calls' => [ |
| 44 | + 'call_type' => 'static', |
| 45 | + ], |
| 46 | + 'php_unit_method_casing' => [ |
| 47 | + 'case' => 'snake_case', |
| 48 | + ], |
| 49 | + 'single_import_per_statement' => true, |
| 50 | + 'single_trait_insert_per_statement' => true, |
| 51 | + 'static_lambda' => true, |
| 52 | + 'strict_comparison' => true, |
| 53 | + 'strict_param' => true, |
| 54 | + ]) |
| 55 | +; |
0 commit comments