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:
parent
86201e71b2
commit
d0207b6098
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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')
|
||||
)
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user