From 5a7b9cbe0e05253a218dd45d89c3bd1c27a052f4 Mon Sep 17 00:00:00 2001 From: Aleksander Kaim Date: Fri, 1 Mar 2024 10:56:10 +0100 Subject: [PATCH] Add new type to enum --- .gitignore | 1 + .php_cs => .php-cs-fixer.php | 4 +++- grumphp.yaml | 2 +- src/Enum/Type.php | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) rename .php_cs => .php-cs-fixer.php (92%) diff --git a/.gitignore b/.gitignore index 064648d..1eb63d2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ \.php_cs\.cache .phpunit.result.cache composer.lock +.php-cs-fixer.cache diff --git a/.php_cs b/.php-cs-fixer.php similarity index 92% rename from .php_cs rename to .php-cs-fixer.php index 3362983..13e44b5 100644 --- a/.php_cs +++ b/.php-cs-fixer.php @@ -8,7 +8,9 @@ ) ->in(__DIR__); -return PhpCsFixer\Config::create() +$config = new PhpCsFixer\Config(); + +return $config ->setRules( [ '@Symfony' => true, diff --git a/grumphp.yaml b/grumphp.yaml index 759f2b3..3808677 100644 --- a/grumphp.yaml +++ b/grumphp.yaml @@ -18,7 +18,7 @@ grumphp: phpcsfixer: allow_risky: true cache_file: ~ - config: './.php_cs' + config: './.php-cs-fixer.php' using_cache: true verbose: true phpstan: diff --git a/src/Enum/Type.php b/src/Enum/Type.php index bab2db4..194f6fe 100644 --- a/src/Enum/Type.php +++ b/src/Enum/Type.php @@ -15,6 +15,7 @@ class Type extends Enum public const SWIP_BOX_2 = '400402'; public const POINT_PACK = '500501'; public const FOREIGN_LOCKER = '400'; + public const FOREIGN_EXTERNAL_LOCKER = '501'; public static function standard(): self { @@ -50,4 +51,9 @@ public static function foreignLocker(): self { return self::get(self::FOREIGN_LOCKER); } + + public static function foreignExternalLocker(): self + { + return self::get(self::FOREIGN_EXTERNAL_LOCKER); + } }