is_dir($directory))); $finder = PhpCsFixer\Finder::create() ->in($directories) ->name('*.php') ->ignoreDotFiles(true) ->ignoreVCS(true); return (new PhpCsFixer\Config()) ->setRiskyAllowed(true) ->setFinder($finder) ->setRules([ '@PSR12' => true, 'array_indentation' => true, 'binary_operator_spaces' => ['default' => 'single_space'], 'blank_line_after_opening_tag' => true, 'blank_line_before_statement' => ['statements' => ['return', 'throw', 'try']], 'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], 'concat_space' => ['spacing' => 'one'], 'declare_strict_types' => true, 'final_class' => false, 'no_unused_imports' => true, 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'ordered_types' => ['sort_algorithm' => 'alpha'], 'single_import_per_statement' => true, 'single_line_empty_body' => true, 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']], ]);