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

Avoid checking classes named Null, because PHP will complain

Ref #415
This commit is contained in:
Matthew Brown 2017-12-29 19:45:32 -05:00
parent 086b314df8
commit 37a3c0a81e

View File

@ -876,6 +876,11 @@ class ProjectChecker
$fq_classlike_name_lc = strtolower($fq_classlike_name);
// avoid checking classes that we know will just end in failure
if ($fq_classlike_name_lc === 'null' || substr($fq_classlike_name_lc, -5) === '\null') {
return;
}
if (!isset($this->classlike_files[$fq_classlike_name_lc])) {
if (!isset($this->classes_to_scan[$fq_classlike_name_lc]) || $store_failure) {
$this->classes_to_scan[$fq_classlike_name_lc] = $fq_classlike_name;