Skip to content
Permalink
Browse files

Search better, and avoid fatal error

  • Loading branch information...
muglug committed May 9, 2019
1 parent 335b041 commit 9b756837965d4f850688b482cdbe0b72cb0f140c
@@ -98,8 +98,14 @@ private static function getPsr4Paths(string $current_dir, array $composer_json)
);
foreach ($php_files as $php_file) {
$php_file = str_replace($current_dir . DIRECTORY_SEPARATOR, '', $php_file);
$parts = explode(DIRECTORY_SEPARATOR, $php_file);
if (!$parts[0]) {
array_shift($parts);
}
if ($parts[0] === 'vendor') {
continue;
}
@@ -989,7 +989,8 @@ public static function getArrayAccessTypeGivenOffset(
}
if ($array_access_type === null) {
throw new \InvalidArgumentException('This is a bad place');
// shouldn’t happen, but don’t crash
return Type::getMixed();
}
if ($in_assignment) {

0 comments on commit 9b75683

Please sign in to comment.
You can’t perform that action at this time.