diff --git a/resources/functionMap.php b/resources/functionMap.php index 71866bb604e..4696ff21201 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -5468,7 +5468,7 @@ 'lstat' => ['array|false', 'filename'=>'string'], 'ltrim' => ['string', 'str'=>'string', 'character_mask='=>'string'], 'Lua::__call' => ['mixed', 'lua_func'=>'callable', 'args='=>'array', 'use_self='=>'int'], -'Lua::__construct' => ['void', 'lua_script_file'=>'string'], +'Lua::__construct' => ['void', 'lua_script_file='=>'string'], 'Lua::assign' => ['mixed', 'name'=>'string', 'value'=>'string'], 'Lua::call' => ['mixed', 'lua_func'=>'callable', 'args='=>'array', 'use_self='=>'int'], 'Lua::eval' => ['mixed', 'statements'=>'string'], diff --git a/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php b/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php index ddf9c63f854..5f83c21b6e9 100644 --- a/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php +++ b/tests/PHPStan/Rules/Classes/InstantiationRuleTest.php @@ -646,4 +646,9 @@ public function testBug14138(): void ]); } + public function testBug14499(): void + { + $this->analyse([__DIR__ . '/data/bug-14499.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Classes/data/bug-14499.php b/tests/PHPStan/Rules/Classes/data/bug-14499.php new file mode 100644 index 00000000000..d738e5b30ce --- /dev/null +++ b/tests/PHPStan/Rules/Classes/data/bug-14499.php @@ -0,0 +1,6 @@ +