diff --git a/composer.json b/composer.json index 3a9309db..3250bcc6 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,14 @@ "phpstan/phpstan": "^0.12.33" }, "require-dev": { - "consistence/coding-standard": "^3.0.1", + "consistence/coding-standard": "^3.10", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "ergebnis/composer-normalize": "^2.0.2", "phing/phing": "^2.16.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan-phpunit": "^0.12", "phpunit/phpunit": "^7.0", - "slevomat/coding-standard": "^4.5.2" + "slevomat/coding-standard": "^6.4" }, "config": { "sort-packages": true diff --git a/phpcs.xml b/phpcs.xml index 738b1aec..969e0543 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -17,7 +17,7 @@ - + + + + + + + + + + + + + - + diff --git a/src/Rules/DisallowedConstructs/DisallowedImplicitArrayCreationRule.php b/src/Rules/DisallowedConstructs/DisallowedImplicitArrayCreationRule.php index f5f53dca..4aa7c1c4 100644 --- a/src/Rules/DisallowedConstructs/DisallowedImplicitArrayCreationRule.php +++ b/src/Rules/DisallowedConstructs/DisallowedImplicitArrayCreationRule.php @@ -41,7 +41,9 @@ public function processNode(\PhpParser\Node $node, Scope $scope): array return [ sprintf('Implicit array creation is not allowed - variable $%s does not exist.', $node->name), ]; - } elseif ($certainty->maybe()) { + } + + if ($certainty->maybe()) { return [ sprintf('Implicit array creation is not allowed - variable $%s might not exist.', $node->name), ];