diff --git a/src/Psalm/Internal/Scanner/PhpStormMetaScanner.php b/src/Psalm/Internal/Scanner/PhpStormMetaScanner.php index 92b03532a..06ea5d0b2 100644 --- a/src/Psalm/Internal/Scanner/PhpStormMetaScanner.php +++ b/src/Psalm/Internal/Scanner/PhpStormMetaScanner.php @@ -83,7 +83,7 @@ class PhpStormMetaScanner ) { $meta_fq_classlike_name = implode('\\', $identifier->class->parts); - $meta_method_name = $identifier->name->name; + $meta_method_name = strtolower($identifier->name->name); if ($map) { $offset = $identifier->args[0]->value->value; diff --git a/tests/StubTest.php b/tests/StubTest.php index 155b1be5b..2d6568ccd 100644 --- a/tests/StubTest.php +++ b/tests/StubTest.php @@ -75,7 +75,9 @@ class StubTest extends TestCase Config::loadFromXML( dirname(__DIR__), ' - + @@ -97,7 +99,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -144,7 +148,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -166,7 +172,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( $runDir, ' - + @@ -187,7 +195,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -224,7 +234,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -283,19 +295,19 @@ class StubTest extends TestCase */ function bar(array $a) {} - $a1 = (new \Ns\MyClass)->create("object"); - $a2 = (new \Ns\MyClass)->create("exception"); + $a1 = (new \Ns\MyClass)->creAte("object"); + $a2 = (new \Ns\MyClass)->creaTe("exception"); - $b1 = \create("object"); - $b2 = \create("exception"); + $b1 = \Create("object"); + $b2 = \cReate("exception"); - $e2 = \create(\LogicException::class); + $e2 = \creAte(\LogicException::class); $c1 = (new \Ns\MyClass)->foo(5); $c2 = (new \Ns\MyClass)->bar(["hello"]); - $d1 = \foo(5); - $d2 = \bar(["hello"]); + $d1 = \foO(5); + $d2 = \baR(["hello"]); }' ); @@ -312,7 +324,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -350,7 +364,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -382,7 +398,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -416,7 +434,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -450,7 +470,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -573,7 +595,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -606,7 +630,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -642,7 +668,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -670,7 +698,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -702,7 +732,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -734,7 +766,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -782,7 +816,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -814,7 +850,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -863,7 +901,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -901,7 +941,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -947,7 +989,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + @@ -989,7 +1033,9 @@ class StubTest extends TestCase TestConfig::loadFromXML( dirname(__DIR__), ' - + diff --git a/tests/fixtures/stubs/phpstorm.meta.php b/tests/fixtures/stubs/phpstorm.meta.php index 4b3f7a71c..7ba1b8af0 100644 --- a/tests/fixtures/stubs/phpstorm.meta.php +++ b/tests/fixtures/stubs/phpstorm.meta.php @@ -1,7 +1,7 @@ '@', 'exception' => \Exception::class, 'object' => \stdClass::class, @@ -12,8 +12,8 @@ namespace PHPSTORM_META { 'object' => \stdClass::class, ])); - override(\Ns\MyClass::foo(0), type(0)); - override(\Ns\MyClass::bar(0), elementType(0)); + override(\Ns\MyClass::foO(0), type(0)); + override(\Ns\MyClass::Bar(0), elementType(0)); override(\foo(0), type(0)); override(\bar(0), elementType(0)); }