From 32885ee1df94d8dbb3be5c5373dd304a53d4061c Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sat, 5 Sep 2026 15:54:23 +0100 Subject: Add php-cs-fixer configuration --- .php-cs-fixer.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .php-cs-fixer.php diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 0000000..c87e9f0 --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,40 @@ +in([ + __DIR__ . '/public', + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + ->name('*.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +return (new Config()) + ->setRules([ + '@PSR12' => true, + 'declare_strict_types' => true, + 'array_syntax' => ['syntax' => 'short'], + 'single_quote' => true, + 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'no_unused_imports' => true, + 'trailing_comma_in_multiline' => [ + 'elements' => ['arrays', 'arguments', 'parameters'], + ], + 'no_superfluous_phpdoc_tags' => [ + 'remove_inheritdoc' => true, + 'allow_mixed' => true, + ], + 'strict_param' => true, + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + ], + 'type_declaration_spaces' => true, + ]) + ->setRiskyAllowed(true) + ->setFinder($finder); -- cgit v1.2.3-13-gbd6f