aboutsummaryrefslogtreecommitdiffhomepage
path: root/ecs.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-14 11:13:15 +0900
committernsfisis <nsfisis@gmail.com>2024-03-14 11:13:15 +0900
commitbae8cf7a0287442e7e822a194d2b6eba8c32552c (patch)
treeca89f59bc432bfc4d8b07f14c8e95373ca8f0321 /ecs.php
parentf4edb19f21c4777a95a5a8705d0e5f602103eb44 (diff)
downloadphp-waddiwasi-bae8cf7a0287442e7e822a194d2b6eba8c32552c.tar.gz
php-waddiwasi-bae8cf7a0287442e7e822a194d2b6eba8c32552c.tar.zst
php-waddiwasi-bae8cf7a0287442e7e822a194d2b6eba8c32552c.zip
perf: use global functions
Diffstat (limited to 'ecs.php')
-rw-r--r--ecs.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/ecs.php b/ecs.php
index 086f569..c4c9b5b 100644
--- a/ecs.php
+++ b/ecs.php
@@ -4,6 +4,8 @@ declare(strict_types=1);
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
+use PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer;
+use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer;
return function (ECSConfig $ecsConfig): void {
$ecsConfig->paths([
@@ -13,4 +15,10 @@ return function (ECSConfig $ecsConfig): void {
SetList::CLEAN_CODE,
SetList::PSR_12,
]);
+ $ecsConfig->rule(NativeFunctionInvocationFixer::class);
+ $ecsConfig->ruleWithConfiguration(GlobalNamespaceImportFixer::class, [
+ 'import_classes' => true,
+ 'import_constants' => true,
+ 'import_functions' => true,
+ ]);
};