diff --git a/tests/PHPStan/Rules/InternalTag/RestrictedInternalStaticMethodUsageExtensionTest.php b/tests/PHPStan/Rules/InternalTag/RestrictedInternalStaticMethodUsageExtensionTest.php index 72f38a688c..5fd7b6639a 100644 --- a/tests/PHPStan/Rules/InternalTag/RestrictedInternalStaticMethodUsageExtensionTest.php +++ b/tests/PHPStan/Rules/InternalTag/RestrictedInternalStaticMethodUsageExtensionTest.php @@ -76,4 +76,9 @@ public function testNoNamespace(): void ]); } + public function testBug13210(): void + { + $this->analyse([__DIR__ . '/data/bug-13210.php'], []); + } + } diff --git a/tests/PHPStan/Rules/InternalTag/data/bug-13210.php b/tests/PHPStan/Rules/InternalTag/data/bug-13210.php new file mode 100644 index 0000000000..090fbf2beb --- /dev/null +++ b/tests/PHPStan/Rules/InternalTag/data/bug-13210.php @@ -0,0 +1,20 @@ + 'NULL', + is_string($phpValue) => "''", + is_int($phpValue) => (string)$phpValue, + $phpValue instanceof BackedEnum => self::phpValueToSql($phpValue->value), + }; + } + +}