1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

InvalidClass is also reported if the casing in the namespace is wrong (#4090)

This commit is contained in:
Alfred Bez 2020-08-31 16:05:03 +02:00 committed by Daniil Gentili
parent eae55eb584
commit 6db3f45114
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -8,3 +8,19 @@ Emitted when referencing a class with the wrong casing
class Foo {}
(new foo());
```
Could also be an issue in the namespace even if the class has the correct casing
```php
<?php
namespace OneTwo {
class Three {}
}
namespace {
use Onetwo\Three;
// ^ ("t" instead of "T")
$three = new Three();
}
```