1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Check that class exists before checking for ArrayAccess inheritors

This commit is contained in:
Matt Brown 2017-01-19 18:59:14 -05:00 committed by Matt Brown
parent 86201e71b2
commit d0207b6098
2 changed files with 4 additions and 3 deletions

View File

@ -786,12 +786,12 @@ class FileChecker extends SourceChecker implements StatementsSource
}
/**
* @param string $file
* @param string $file_path
* @return boolean
*/
public static function hasFileChanged($file)
public static function hasFileChanged($file_path)
{
return filemtime($file) > self::getLastGoodRun();
return filemtime($file_path) > self::getLastGoodRun();
}
/**

View File

@ -1001,6 +1001,7 @@ class FetchChecker
}
} elseif (!$type instanceof TNamedObject ||
(strtolower($type->value) !== 'simplexmlelement' &&
ClassChecker::classExists($type->value, $statements_checker->getFileChecker()) &&
!ClassChecker::classImplements($type->value, 'ArrayAccess')
)
) {