aboutsummaryrefslogtreecommitdiffhomepage
path: root/ecs.php
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-10-18 22:31:25 +0900
committernsfisis <nsfisis@gmail.com>2025-10-18 22:48:40 +0900
commit114d1f074e30483b0fddd9a4cc45572b8c070797 (patch)
treef9027bc8dfff6f9cb6cd3d006e10069002f59e08 /ecs.php
parent751db19873b5cb14bedd8adcb40cee3e3ad6089b (diff)
downloadphp-next-after-114d1f074e30483b0fddd9a4cc45572b8c070797.tar.gz
php-next-after-114d1f074e30483b0fddd9a4cc45572b8c070797.tar.zst
php-next-after-114d1f074e30483b0fddd9a4cc45572b8c070797.zip
first commit
Diffstat (limited to 'ecs.php')
-rw-r--r--ecs.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/ecs.php b/ecs.php
new file mode 100644
index 0000000..60a9df5
--- /dev/null
+++ b/ecs.php
@@ -0,0 +1,28 @@
+<?php
+
+declare(strict_types=1);
+
+use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer;
+use PhpCsFixer\Fixer\Import\GlobalNamespaceImportFixer;
+use Symplify\EasyCodingStandard\Config\ECSConfig;
+
+return ECSConfig::configure()
+ ->withPaths([
+ __DIR__ . '/src',
+ __DIR__ . '/tests',
+ ])
+ ->withPreparedSets(
+ psr12: true,
+ common: true,
+ cleanCode: true,
+ )
+ ->withEditorConfig()
+ ->withRules([
+ NativeFunctionInvocationFixer::class,
+ ])
+ ->withConfiguredRule(GlobalNamespaceImportFixer::class, [
+ 'import_classes' => true,
+ 'import_constants' => true,
+ 'import_functions' => true,
+ ])
+;