From 1592505c01adda3c3fb1f90ca6736a63b0ace892 Mon Sep 17 00:00:00 2001 From: "Km.Van" Date: Sat, 11 Jul 2026 10:50:32 +0800 Subject: [PATCH] rename php-cs-fixer config file update php-cs-fixer config --- .php-cs-fixer54.php => .php-cs-fixer.dist.php | 4 ++-- .vscode/settings.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename .php-cs-fixer54.php => .php-cs-fixer.dist.php (98%) diff --git a/.php-cs-fixer54.php b/.php-cs-fixer.dist.php similarity index 98% rename from .php-cs-fixer54.php rename to .php-cs-fixer.dist.php index cca9139..4b7924f 100644 --- a/.php-cs-fixer54.php +++ b/.php-cs-fixer.dist.php @@ -11,7 +11,7 @@ $finder = (new PhpCsFixer\Finder()) return (new PhpCsFixer\Config()) ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect()) - ->setIndent(" ") + ->setIndent(' ') ->setRiskyAllowed(true) ->setLineEnding("\n") ->setUsingCache(false) @@ -87,7 +87,7 @@ return (new PhpCsFixer\Config()) 'ordered_imports' => true, 'single_quote' => true, 'yoda_style' => true, - 'constant_case' => ['case' => 'lowercase'], + 'constant_case' => ['case' => 'lower'], // 显式禁用会破坏 PHP 5.4 语法的现代规则 'declare_strict_types' => false, // PHP 7.0+ diff --git a/.vscode/settings.json b/.vscode/settings.json index de4eb28..006dd38 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "php-cs-fixer.config": ".php-cs-fixer54", + "php-cs-fixer.config": ".php-cs-fixer.dist.php", "php-cs-fixer.allowRisky": true, "php.suggest.basic": false -} +} \ No newline at end of file diff --git a/package.json b/package.json index b69da78..3c2d5b9 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "vite build --config ./prod.vite.config.mjs", "build:php": "bash ./php-build.sh", "build:php-debug": "php ./Make.php build debug && echo '\nPlease access via http://localhost:8001/prober.php' && PHP_CLI_SERVER_WORKERS=4 php -S localhost:8001 -t dist", - "php-cs-fixer-54": "php-cs-fixer fix ./src --config=.php-cs-fixer54" + "php-cs-fixer-54": "php-cs-fixer fix ./src --config=.php-cs-fixer54.php" }, "browserslist": [ "defaults"