From 03119b8da9dcd031d0c1f7f20a91781e0ce42d7e Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Wed, 4 Dec 2024 14:41:56 +0100 Subject: [PATCH] add php-cs-fixer --- .php-cs-fixer.php | 7 ++++--- composer.json | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index c8c2223..65b106e 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -18,12 +18,13 @@ * @license https://www.gnu.org/licenses/gpl-3.0 GNU General Public License 3 (GPLv3) */ -$finder = PhpCsFixer\Finder::create()->in(__DIR__); +$finder = PhpCsFixer\Finder::create() + ->in(__DIR__); $config = new PhpCsFixer\Config(); return $config ->setRules([ - '@PHP74Migration' => true, + '@PHP80Migration' => true, '@PSR12' => true ]) - ->setFinder($finder); \ No newline at end of file + ->setFinder($finder); diff --git a/composer.json b/composer.json index 10a9f7d..c44cc0d 100755 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "d3/oxid-twig-extensions": "^1.3" }, "require-dev": { - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.0", + "friendsofphp/php-cs-fixer": "^3.64.0" }, "autoload": { "psr-4": { @@ -38,6 +39,9 @@ } }, "scripts": { + "php-cs-fixer_audit": "./vendor/bin/php-cs-fixer list-files --config=./vendor/d3/tinymce-editor/.php-cs-fixer.php", + "php-cs-fixer_fix": "./vendor/bin/php-cs-fixer fix --config=./vendor/d3/tinymce-editor/.php-cs-fixer.php", + "phpstan": "./vendor/bin/phpstan analyse -c./vendor/d3/tinymce-editor/phpstan.neon" } }