From 99ea81498760a693e36263383b54efbef63ec63a Mon Sep 17 00:00:00 2001 From: MaxBuhe01 Date: Wed, 20 Nov 2024 17:51:07 +0100 Subject: [PATCH] [Added] php cs fixer --- .noencode | 2 +- .php-cs-fixer.php | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .php-cs-fixer.php diff --git a/.noencode b/.noencode index a64141a..f6cc7ca 100644 --- a/.noencode +++ b/.noencode @@ -1 +1 @@ -copyAsIsFiles=metadata.php, IntelliSenseHelper.php, migration, Application/views \ No newline at end of file +copyAsIsFiles=metadata.php, .php-cs-fixer.php, IntelliSenseHelper.php, migration, Application/views \ No newline at end of file diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php new file mode 100644 index 0000000..f1033fc --- /dev/null +++ b/.php-cs-fixer.php @@ -0,0 +1,34 @@ +in(__DIR__) + ; + + $header = << +@link https://www.oxidmodule.com +EOF; + + $config = new PhpCsFixer\Config(); + return $config->setRules([ + '@PHP80Migration' => true, + '@PSR12' => true, + 'header_comment' => [ + 'comment_type' => 'PHPDoc', + 'header' => $header, + 'location' => 'after_open', + 'separate' => 'both', + ], + 'php_unit_test_class_requires_covers' => true, + 'doctrine_annotation_indentation' => true, + ]) + ->setFinder($finder) +; \ No newline at end of file