setRiskyAllowed(true) ->setRules([ '@PSR2' => true, '@PHP80Migration' => true, '@PHP80Migration:risky' => true, '@PHP81Migration' => true, 'header_comment' => ['header' => $header], 'ordered_class_elements' => true, 'ordered_imports' => true, 'no_mixed_echo_print' => ['use' => 'print'], 'strict_param' => true, 'strict_comparison' => true, 'single_import_per_statement' => false, 'phpdoc_order' => true, 'array_syntax' => ['syntax' => 'short'], 'phpdoc_add_missing_param_annotation' => true, 'psr_autoloading' => true, 'phpdoc_var_without_name' => false, 'no_unused_imports' => true, 'no_useless_else' => true, 'no_useless_return' => true, 'no_extra_blank_lines' => [ 'tokens' => [ 'break', 'continue', 'extra', 'return', 'throw', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block', ], ], ])->setFinder( (new \PhpCsFixer\Finder()) ->ignoreDotFiles(true) ->ignoreVCS(true) ->name('*.php') ->in([ 'src', 'tests', __DIR__, ]) );