Update AnnotationDirectoryLoader.php
This commit is contained in:
parent
ff4b815fdf
commit
5e805850cc
@ -66,12 +66,16 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
|
||||
*/
|
||||
public function supports($resource, $type = null)
|
||||
{
|
||||
if (!is_string($resource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$path = $this->locator->locate($resource);
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return is_string($resource) && is_dir($path) && (!$type || 'annotation' === $type);
|
||||
return is_dir($path) && (!$type || 'annotation' === $type);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user