From 13e5f02fbdd3d00ed12a375f2c09a3428a630a0b Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 7 Aug 2024 09:52:06 +0900 Subject: [PATCH] test: fix incorrect condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------ ----------------------------------------------------------------------- Line tests/Language/AbstractTranslationTestCase.php ------ ----------------------------------------------------------------------- 327 Strict comparison using === between array{list} and array{} will always evaluate to false. 💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false in your phpstan.neon.dist. ------ ----------------------------------------------------------------------- --- tests/Language/AbstractTranslationTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Language/AbstractTranslationTestCase.php b/tests/Language/AbstractTranslationTestCase.php index a400e855b..daf0cfbd0 100644 --- a/tests/Language/AbstractTranslationTestCase.php +++ b/tests/Language/AbstractTranslationTestCase.php @@ -324,7 +324,7 @@ final public function testAllLocalizationParametersAreNotTranslated(string $loca preg_match_all('/(\{[^\}]+\})/', $translation, $matches); array_shift($matches); - if ($matches === []) { + if ($matches === [[]]) { unset($matches); continue;