1<?php 2 3$config = PhpCsFixer\Config::create() 4 ->setRiskyAllowed(true) 5 ->setRules([ 6 '@PSR2' => true, 7 'array_syntax' => ['syntax' => 'short'], 8 'concat_space' => ['spacing' => 'one'], 9 'declare_strict_types' => false, 10 'final_static_access' => true, 11 'fully_qualified_strict_types' => true, 12 'header_comment' => false, 13 'is_null' => ['use_yoda_style' => true], 14 'list_syntax' => ['syntax' => 'long'], 15 'lowercase_cast' => true, 16 'magic_method_casing' => true, 17 'modernize_types_casting' => true, 18 'multiline_comment_opening_closing' => true, 19 'no_alias_functions' => true, 20 'no_alternative_syntax' => true, 21 'no_blank_lines_after_phpdoc' => true, 22 'no_empty_comment' => true, 23 'no_empty_phpdoc' => true, 24 'no_empty_statement' => true, 25 'no_extra_blank_lines' => true, 26 'no_leading_import_slash' => true, 27 'no_trailing_comma_in_singleline_array' => true, 28 'no_unset_cast' => true, 29 'no_unused_imports' => true, 30 'no_whitespace_in_blank_line' => true, 31 'ordered_imports' => true, 32 'php_unit_ordered_covers' => true, 33 'php_unit_test_annotation' => ['style' => 'prefix'], 34 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], 35 'phpdoc_align' => ['align' => 'vertical'], 36 'phpdoc_no_useless_inheritdoc' => true, 37 'phpdoc_scalar' => true, 38 'phpdoc_separation' => true, 39 'phpdoc_single_line_var_spacing' => true, 40 'phpdoc_trim' => true, 41 'phpdoc_trim_consecutive_blank_line_separation' => true, 42 'phpdoc_types' => true, 43 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], 44 'phpdoc_var_without_name' => true, 45 'single_trait_insert_per_statement' => true, 46 'standardize_not_equals' => true, 47 ]) 48 ->setFinder( 49 PhpCsFixer\Finder::create() 50 ->in(__DIR__.'/src') 51 ->in(__DIR__.'/tests') 52 ->name('*.php') 53 ) 54; 55 56return $config; 57