From 19f13b286dfd1a24e1ddd91a97ffd2c5f05dccad Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Wed, 1 Jul 2026 07:36:47 +0300 Subject: [PATCH 1/6] fix event callback --- src/Model/Behavior/EnumBehavior.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Behavior/EnumBehavior.php b/src/Model/Behavior/EnumBehavior.php index ecd3426..a288016 100644 --- a/src/Model/Behavior/EnumBehavior.php +++ b/src/Model/Behavior/EnumBehavior.php @@ -251,9 +251,9 @@ protected function translate(array $list): array /** * @param \Cake\Event\EventInterface $event Event. * @param \Cake\ORM\RulesChecker $rules Rules checker. - * @return \Cake\ORM\RulesChecker + * @return void */ - public function buildRules(EventInterface $event, RulesChecker $rules): RulesChecker + public function buildRules(EventInterface $event, RulesChecker $rules): void { foreach ($this->getConfig('lists') as $alias => $config) { if (Hash::get($config, 'applicationRules') === false) { @@ -267,7 +267,7 @@ public function buildRules(EventInterface $event, RulesChecker $rules): RulesChe ]); } - return $rules; + $event->setResult($rules); } /** From d769ddbf95e9bd917ee1eab5be7677e155b27039 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Wed, 1 Jul 2026 07:54:03 +0300 Subject: [PATCH 2/6] =?UTF-8?q?cakephp=205.3=20=D0=B3pgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 4 ++-- src/Model/Behavior/EnumBehavior.php | 2 +- .../TestCase/Model/Behavior/EnumBehaviorTest.php | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 756c7f6..d2e63f2 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ "source": "https://github.com/cakedc/enum" }, "require": { - "php": ">=8.1", - "cakephp/cakephp": "^5.0.6" + "php": ">=8.2", + "cakephp/cakephp": "^5.3" }, "require-dev": { "phpunit/phpunit": "^10.5.20", diff --git a/src/Model/Behavior/EnumBehavior.php b/src/Model/Behavior/EnumBehavior.php index a288016..3d73b7d 100644 --- a/src/Model/Behavior/EnumBehavior.php +++ b/src/Model/Behavior/EnumBehavior.php @@ -293,7 +293,7 @@ public function __call(string $method, array $args): bool throw new MissingEnumConfigurationException([$alias]); } - if ($entity->isEmpty($config['field']) && Hash::get($config, 'allowEmpty') === true) { + if (!$entity->hasValue($config['field']) && Hash::get($config, 'allowEmpty') === true) { return true; } $value = $entity->{$config['field']}; diff --git a/tests/TestCase/Model/Behavior/EnumBehaviorTest.php b/tests/TestCase/Model/Behavior/EnumBehaviorTest.php index 960f72b..b121f2c 100644 --- a/tests/TestCase/Model/Behavior/EnumBehaviorTest.php +++ b/tests/TestCase/Model/Behavior/EnumBehaviorTest.php @@ -249,7 +249,7 @@ public static function provideBasicLookups(): array */ public function testBasicLookups($group, $expected) { - $result = $this->Articles->enum($group); + $result = $this->Articles->getBehavior('Enum')->enum($group); $this->assertEquals($expected, $result); } @@ -305,7 +305,7 @@ public function testBuildRules($data, $expected) public function testEnumNested() { $this->Articles->behaviors()->Enum->setConfig('nested', true); - $result = $this->Articles->enum('priority'); + $result = $this->Articles->getBehavior('Enum')->enum('priority'); $expected = [ ['value' => 'URGENT', 'text' => 'Urgent'], ['value' => 'HIGH', 'text' => 'High'], @@ -329,7 +329,7 @@ public function testAssociationsCreated() public function testEnumMultipleAlias() { - $result = $this->Articles->enum(); + $result = $this->Articles->getBehavior('Enum')->enum(); $expected = [ 'priority' => [ 'URGENT' => 'Urgent', @@ -366,10 +366,10 @@ public function testEnumMultipleAlias() ]; $this->assertEquals($expected, $result); - $result = $this->Articles->enum([]); + $result = $this->Articles->getBehavior('Enum')->enum([]); $this->assertEquals($expected, $result); - $result = $this->Articles->enum(['priority', 'status']); + $result = $this->Articles->getBehavior('Enum')->enum(['priority', 'status']); $expected = [ 'priority' => [ 'URGENT' => 'Urgent', @@ -388,11 +388,11 @@ public function testEnumMultipleAlias() public function testTranslatedValues() { $this->Articles->behaviors()->Enum->setConfig('translate', true); - $result = $this->Articles->enum('node_group'); + $result = $this->Articles->getBehavior('Enum')->enum('node_group'); $this->assertEquals(['active' => 'Translated Active'], $result); - $result = $this->Articles->enum(['node_group', 'norules']); + $result = $this->Articles->getBehavior('Enum')->enum(['node_group', 'norules']); $expected = [ 'node_group' => ['active' => 'Translated Active'], @@ -427,7 +427,7 @@ public function testThirdPartyStrategy(array $config, array $expected) $this->getTableLocator()->clear(); $Articles = $this->getTableLocator()->get('CakeDC/Enum.Articles', ['table' => 'enum_articles']); $Articles->addBehavior('CakeDC/Enum.Enum', $config); - $result = $Articles->enum('article_category'); + $result = $Articles->getBehavior('Enum')->enum('article_category'); $this->assertEquals($expected, $result); } } From 6357c5ce93e89f921f398634be242be4b945d009 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Sat, 4 Jul 2026 16:39:53 +0300 Subject: [PATCH 3/6] enum plguin code style fixes --- .github/workflows/ci.yml | 90 ++++++++++++++++--- .phive/phars.xml | 6 +- composer.json | 3 +- phpcs.xml | 17 +++- src/Model/Behavior/EnumBehavior.php | 4 +- src/Model/Behavior/Strategy/ConstStrategy.php | 8 +- 6 files changed, 103 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f2b875..46ab887 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,21 +2,91 @@ name: CI on: push: - branches: - - master - - 3.next-cake5 pull_request: branches: - '*' -permissions: - contents: read - jobs: testsuite: - uses: cakephp/.github/.github/workflows/testsuite-with-db.yml@5.x - secrets: inherit + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + php-version: ['8.2', '8.3', '8.4'] + os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: mbstring, intl, pdo_sqlite + coverage: pcov + + - name: Cache composer dependencies + uses: actions/cache@v4 + with: + path: ~/.composer/cache + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} + + - name: composer install + run: composer install --prefer-dist --no-progress + + - name: Setup problem matchers for PHPUnit + if: matrix.php-version == '8.2' && matrix.os == 'ubuntu-latest' + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run PHPUnit with coverage + if: matrix.php-version == '8.2' && matrix.os == 'ubuntu-latest' + run: | + export CODECOVERAGE=1 + vendor/bin/phpunit --configuration=phpunit.xml --display-deprecations --display-incomplete --display-skipped --coverage-clover=coverage.xml + + - name: Run PHPUnit without coverage + if: matrix.php-version != '8.3' || matrix.os != 'ubuntu-latest' + run: vendor/bin/phpunit --configuration=phpunit.xml + + - name: Submit code coverage + if: matrix.php-version == '8.3' && matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v3 cs-stan: - uses: cakephp/.github/.github/workflows/cs-stan.yml@5.x - secrets: inherit + name: Coding Standard & Static Analysis + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: mbstring, intl, pdo_sqlite + coverage: none + tools: phive + + - name: Cache composer dependencies + uses: actions/cache@v4 + with: + path: ~/.composer/cache + key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }} + + - name: composer install + run: composer install --prefer-dist --no-progress + + - name: Install phive + run: | + wget -O phive.phar https://phar.io/releases/phive.phar + chmod +x phive.phar + sudo mv phive.phar /usr/local/bin/phive + + - name: Install PHP tools with phive + run: | + phive install --trust-gpg-keys CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5 + + - name: Run PHP CodeSniffer + run: composer cs-check + + - name: Run phpstan + run: composer stan diff --git a/.phive/phars.xml b/.phive/phars.xml index bf43870..4b57f47 100644 --- a/.phive/phars.xml +++ b/.phive/phars.xml @@ -1,5 +1,5 @@ - - - + + + \ No newline at end of file diff --git a/composer.json b/composer.json index d2e63f2..6bfe945 100644 --- a/composer.json +++ b/composer.json @@ -44,8 +44,7 @@ "phpstan": "tools/phpstan analyse", "psalm": "tools/psalm --show-info=false", "stan": [ - "@phpstan", - "@psalm" + "@phpstan" ], "stan-tests": "phpstan.phar analyze -c tests/phpstan.neon", "stan-baseline": "phpstan.phar --generate-baseline", diff --git a/phpcs.xml b/phpcs.xml index 6c56635..d854f2a 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,6 +1,15 @@ - - - - + + My custom coding standard. + + + + + + + */src/Controller/* + + + templates/* + diff --git a/src/Model/Behavior/EnumBehavior.php b/src/Model/Behavior/EnumBehavior.php index 3d73b7d..af5e764 100644 --- a/src/Model/Behavior/EnumBehavior.php +++ b/src/Model/Behavior/EnumBehavior.php @@ -226,7 +226,7 @@ protected function enumList(string $alias, array $config): array $return, function (mixed &$item, mixed $val): void { $item = ['value' => $val, 'text' => $item]; - } + }, ); $return = array_values($return); @@ -245,7 +245,7 @@ protected function translate(array $list): array { $domain = $this->getConfig('translationDomain'); - return array_map(fn ($value) => __d($domain, $value), $list); + return array_map(fn($value) => __d($domain, $value), $list); } /** diff --git a/src/Model/Behavior/Strategy/ConstStrategy.php b/src/Model/Behavior/Strategy/ConstStrategy.php index eff663b..a9f7f2b 100644 --- a/src/Model/Behavior/Strategy/ConstStrategy.php +++ b/src/Model/Behavior/Strategy/ConstStrategy.php @@ -65,7 +65,7 @@ public function enum(array $config = []): array } } - $values = array_map(fn ($v): mixed => $constants[$v], $keys); + $values = array_map(fn($v): mixed => $constants[$v], $keys); return array_combine($keys, $values); } @@ -117,13 +117,13 @@ public function beforeFind(EventInterface $event, SelectQuery $query, ArrayObjec $contain = array_filter( $query->getContain(), - fn ($value): bool => $value !== $assocName, - ARRAY_FILTER_USE_KEY + fn($value): bool => $value !== $assocName, + ARRAY_FILTER_USE_KEY, ); $query->clearContain()->contain($contain); - $query->formatResults(fn (CollectionInterface $results) => $results + $query->formatResults(fn(CollectionInterface $results) => $results ->map(function (mixed $row): mixed { if (is_string($row) || !$row) { return $row; From 27c1434b5aa65d89f270ffecbba9254402b3f723 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Sat, 4 Jul 2026 16:42:14 +0300 Subject: [PATCH 4/6] add gpg key --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46ab887..3657af1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: - name: Install PHP tools with phive run: | - phive install --trust-gpg-keys CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5 + phive install --trust-gpg-keys CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5,99BF4D9A33D65E1E - name: Run PHP CodeSniffer run: composer cs-check From 8f27373eb6f9eb69172c18866ff0fb5047fe3bf6 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Sat, 4 Jul 2026 16:43:02 +0300 Subject: [PATCH 5/6] fix ci file --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3657af1..558657b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,11 +41,11 @@ jobs: if: matrix.php-version == '8.2' && matrix.os == 'ubuntu-latest' run: | export CODECOVERAGE=1 - vendor/bin/phpunit --configuration=phpunit.xml --display-deprecations --display-incomplete --display-skipped --coverage-clover=coverage.xml + vendor/bin/phpunit --configuration=phpunit.xml.dist --display-deprecations --display-incomplete --display-skipped --coverage-clover=coverage.xml - name: Run PHPUnit without coverage if: matrix.php-version != '8.3' || matrix.os != 'ubuntu-latest' - run: vendor/bin/phpunit --configuration=phpunit.xml + run: vendor/bin/phpunit --configuration=phpunit.xml.dist - name: Submit code coverage if: matrix.php-version == '8.3' && matrix.os == 'ubuntu-latest' From 8063ecdd08234372cab6ad30d209400f63ed4d83 Mon Sep 17 00:00:00 2001 From: Yevgeny Tomenko Date: Sat, 4 Jul 2026 17:00:19 +0300 Subject: [PATCH 6/6] chore code styles --- phpstan.neon | 2 -- src/Model/Behavior/EnumBehavior.php | 28 +++++++++---------- .../Behavior/Strategy/AbstractStrategy.php | 3 +- .../Behavior/Strategy/ConfigStrategy.php | 4 +-- src/Model/Behavior/Strategy/ConstStrategy.php | 14 +++++----- .../Behavior/Strategy/LookupStrategy.php | 6 ++-- .../Behavior/Strategy/StrategyInterface.php | 6 ++-- src/Model/Table/LookupsTable.php | 2 +- .../Model/Behavior/EnumBehaviorTest.php | 4 +-- .../Behavior/Strategy/ConstStrategyTest.php | 4 +-- 10 files changed, 36 insertions(+), 37 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 36e2ad0..d7f8277 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,4 @@ parameters: level: 6 - checkMissingIterableValueType: false - checkGenericClassInNonGenericObjectType: false paths: - src diff --git a/src/Model/Behavior/EnumBehavior.php b/src/Model/Behavior/EnumBehavior.php index af5e764..3f1ecc8 100644 --- a/src/Model/Behavior/EnumBehavior.php +++ b/src/Model/Behavior/EnumBehavior.php @@ -81,7 +81,7 @@ class EnumBehavior extends Behavior /** * Class map. * - * @var array + * @var array> */ protected array $classMap = [ 'lookup' => LookupStrategy::class, @@ -92,14 +92,14 @@ class EnumBehavior extends Behavior /** * Stack of strategies in use. * - * @var array + * @var array */ protected array $strategies = []; /** * Initializes the behavior. * - * @param array $config Strategy's configuration. + * @param array $config Strategy's configuration. * @return void */ public function initialize(array $config): void @@ -181,8 +181,8 @@ protected function normalizeConfig(): void } /** - * @param array|string|null $alias Defined list's alias/name. - * @return array + * @param array|string|null $alias Defined list's alias/name. + * @return array * @throws \CakeDC\Enum\Model\Behavior\Exception\MissingEnumConfigurationException */ public function enum(array|string|null $alias = null): array @@ -211,8 +211,8 @@ public function enum(array|string|null $alias = null): array /** * @param string $alias List alias. - * @param array $config Config - * @return array + * @param array $config Config + * @return array */ protected function enumList(string $alias, array $config): array { @@ -238,8 +238,8 @@ function (mixed &$item, mixed $val): void { /** * Translate list values. * - * @param array $list List. - * @return array + * @param array $list List. + * @return array */ protected function translate(array $list): array { @@ -249,7 +249,7 @@ protected function translate(array $list): array } /** - * @param \Cake\Event\EventInterface $event Event. + * @param \Cake\Event\EventInterface<\Cake\ORM\Table> $event Event. * @param \Cake\ORM\RulesChecker $rules Rules checker. * @return void */ @@ -274,7 +274,7 @@ public function buildRules(EventInterface $event, RulesChecker $rules): void * Universal validation rule for lists. * * @param string $method Method name. - * @param array $args Method's arguments. + * @param array $args Method's arguments. * @return bool * @throws \BadMethodCallException * @throws \CakeDC\Enum\Model\Behavior\Exception\MissingEnumConfigurationException @@ -307,9 +307,9 @@ public function __call(string $method, array $args): bool } /** - * @param \Cake\Event\EventInterface $event The beforeFind event that was fired. - * @param \Cake\ORM\Query\SelectQuery $query Query - * @param \ArrayObject $options The options for the query + * @param \Cake\Event\EventInterface<\Cake\ORM\Table> $event The beforeFind event that was fired. + * @param \Cake\ORM\Query\SelectQuery<\Cake\Datasource\EntityInterface> $query Query + * @param \ArrayObject $options The options for the query * @return void */ public function beforeFind(EventInterface $event, SelectQuery $query, ArrayObject $options): void diff --git a/src/Model/Behavior/Strategy/AbstractStrategy.php b/src/Model/Behavior/Strategy/AbstractStrategy.php index 37908a2..1f0ba05 100644 --- a/src/Model/Behavior/Strategy/AbstractStrategy.php +++ b/src/Model/Behavior/Strategy/AbstractStrategy.php @@ -25,7 +25,7 @@ abstract class AbstractStrategy implements StrategyInterface /** * Default configuration. * - * @var array + * @var array */ protected array $_defaultConfig = []; @@ -56,6 +56,7 @@ public function __construct(string $alias, Table $table) } /** + * @param array $config * @inheritDoc */ public function initialize(array $config): void diff --git a/src/Model/Behavior/Strategy/ConfigStrategy.php b/src/Model/Behavior/Strategy/ConfigStrategy.php index 76de4d2..5d67e75 100644 --- a/src/Model/Behavior/Strategy/ConfigStrategy.php +++ b/src/Model/Behavior/Strategy/ConfigStrategy.php @@ -22,8 +22,8 @@ class ConfigStrategy extends AbstractStrategy /** * {@inheritDoc} * - * @param array $config (unused in this case). - * @return array + * @param array $config (unused in this case). + * @return array */ public function enum(array $config = []): array { diff --git a/src/Model/Behavior/Strategy/ConstStrategy.php b/src/Model/Behavior/Strategy/ConstStrategy.php index a9f7f2b..884eb44 100644 --- a/src/Model/Behavior/Strategy/ConstStrategy.php +++ b/src/Model/Behavior/Strategy/ConstStrategy.php @@ -30,7 +30,7 @@ class ConstStrategy extends AbstractStrategy /** * Constants list * - * @var array|null + * @var array|null */ protected ?array $constants = null; @@ -50,8 +50,8 @@ public function __construct(string $alias, Table $table) /** * {@inheritDoc} * - * @param array $config List of callable filters to limit items generated from list. - * @return array + * @param array $config List of callable filters to limit items generated from list. + * @return array * @throws \ReflectionException */ public function enum(array $config = []): array @@ -73,7 +73,7 @@ public function enum(array $config = []): array /** * Returns defined constants for the current `$_table`. * - * @return array + * @return array * @throws \ReflectionException */ protected function getConstants(): array @@ -103,9 +103,9 @@ protected function getConstants(): array } /** - * @param \Cake\Event\EventInterface $event The beforeFind event that was fired. - * @param \Cake\ORM\Query\SelectQuery $query Query - * @param \ArrayObject $options The options for the query + * @param \Cake\Event\EventInterface<\Cake\ORM\Table> $event The beforeFind event that was fired. + * @param \Cake\ORM\Query\SelectQuery<\Cake\Datasource\EntityInterface> $query Query + * @param \ArrayObject $options The options for the query * @return void */ public function beforeFind(EventInterface $event, SelectQuery $query, ArrayObject $options): void diff --git a/src/Model/Behavior/Strategy/LookupStrategy.php b/src/Model/Behavior/Strategy/LookupStrategy.php index d1547a0..dc18696 100644 --- a/src/Model/Behavior/Strategy/LookupStrategy.php +++ b/src/Model/Behavior/Strategy/LookupStrategy.php @@ -25,8 +25,8 @@ class LookupStrategy extends AbstractStrategy /** * {@inheritDoc} * - * @param array $config (unused in this case). - * @return array + * @param array $config (unused in this case). + * @return array */ public function enum(array $config = []): array { @@ -48,7 +48,7 @@ public function enum(array $config = []): array /** * {@inheritDoc} * - * @param array $config Strategy's configuration. + * @param array $config Strategy's configuration. * @return void */ public function initialize(array $config): void diff --git a/src/Model/Behavior/Strategy/StrategyInterface.php b/src/Model/Behavior/Strategy/StrategyInterface.php index ddaf15b..575128c 100644 --- a/src/Model/Behavior/Strategy/StrategyInterface.php +++ b/src/Model/Behavior/Strategy/StrategyInterface.php @@ -16,13 +16,13 @@ interface StrategyInterface { /** - * @param array $config Strategy's configuration. - * @return array + * @param array $config Strategy's configuration. + * @return array */ public function enum(array $config = []): array; /** - * @param array $config Configuration. + * @param array $config Configuration. * @return void */ public function initialize(array $config): void; diff --git a/src/Model/Table/LookupsTable.php b/src/Model/Table/LookupsTable.php index 7a73a68..288cba7 100644 --- a/src/Model/Table/LookupsTable.php +++ b/src/Model/Table/LookupsTable.php @@ -20,7 +20,7 @@ class LookupsTable extends Table /** * {@inheritDoc} * - * @param array $config Table's configuration. + * @param array $config Table's configuration. * @return void */ public function initialize(array $config): void diff --git a/tests/TestCase/Model/Behavior/EnumBehaviorTest.php b/tests/TestCase/Model/Behavior/EnumBehaviorTest.php index b121f2c..b5fc4b2 100644 --- a/tests/TestCase/Model/Behavior/EnumBehaviorTest.php +++ b/tests/TestCase/Model/Behavior/EnumBehaviorTest.php @@ -20,7 +20,7 @@ use Cake\TestSuite\TestCase; use CakeDC\Enum\Model\Behavior\Strategy\AbstractStrategy; -// @codingStandardsIgnoreStart +// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses,Squiz.Classes.ClassFileName.NoMatch class ArticlesTable extends Table { public const STATUS_PUBLIC = 'Published'; @@ -69,7 +69,7 @@ public function enum(array $config = []): array } class EnumBehaviorTest extends TestCase -// @codingStandardsIgnoreEnd +// phpcs:enable PSR1.Classes.ClassDeclaration.MultipleClasses,Squiz.Classes.ClassFileName.NoMatch { public array $fixtures = [ 'plugin.CakeDC/Enum.Articles', diff --git a/tests/TestCase/Model/Behavior/Strategy/ConstStrategyTest.php b/tests/TestCase/Model/Behavior/Strategy/ConstStrategyTest.php index b6e5b49..da04687 100644 --- a/tests/TestCase/Model/Behavior/Strategy/ConstStrategyTest.php +++ b/tests/TestCase/Model/Behavior/Strategy/ConstStrategyTest.php @@ -18,7 +18,7 @@ use Cake\TestSuite\TestCase; use CakeDC\Enum\Model\Behavior\Strategy\ConstStrategy; -// @codingStandardsIgnoreStart +// phpcs:disable PSR1.Classes.ClassDeclaration.MultipleClasses,Squiz.Classes.ClassFileName.NoMatch class ArticlesTable extends Table { public const EXTRA_VALUE = 'Extra'; @@ -37,7 +37,7 @@ class Article extends Entity public const STATUS_ARCHIVE = 'Archived'; } class ConstStrategyTest extends TestCase -// @codingStandardsIgnoreEnd +// phpcs:enable PSR1.Classes.ClassDeclaration.MultipleClasses,Squiz.Classes.ClassFileName.NoMatch { public ConstStrategy $StrategyTable;