in([__DIR__.'/lib', __DIR__.'/public']) ->append([__DIR__.'/config/settings-sample.php']) ->name('*.php'); return (new PhpCsFixer\Config()) ->setIndent("\t") ->setLineEnding("\n") ->setRules([ //Strings: single quotes except where interpolation needs double 'single_quote' => true, //Arrays: short [] syntax, not long-form array() 'array_syntax' => ['syntax' => 'short'], //Braces: same line as class/function signature (dominant in lib/, //not the PSR-2 next-line-for-class convention) 'braces_position' => [ 'classes_opening_brace' => 'same_line', 'functions_opening_brace' => 'same_line', 'anonymous_functions_opening_brace' => 'same_line' ], //Concatenation: no padding around `.` 'concat_space' => ['spacing' => 'none'], //true/false/null: lowercase (100% consistent already) 'constant_case' => ['case' => 'lower'], 'lowercase_keywords' => true, 'visibility_required' => ['elements' => ['method', 'property', 'const']], //Housekeeping - safe regardless of style 'no_unused_imports' => true, 'no_trailing_whitespace' => true, 'no_trailing_whitespace_in_comment' => true, 'single_blank_line_at_eof' => true, 'no_empty_statement' => true, 'trim_array_spaces' => true, 'new_with_parentheses' => true ]) ->setFinder($finder);