diff --git a/phpinspect-autoload.el b/phpinspect-autoload.el index 1b5730e..49f0d5b 100644 --- a/phpinspect-autoload.el +++ b/phpinspect-autoload.el @@ -139,12 +139,13 @@ bareword typenames.")) (prefix (phpinspect-psr4-prefix strat)) type-fqn) (dolist (dir (phpinspect-psr4-directories strat)) - (dolist (file (phpinspect-fs-directory-files-recursively fs dir "\\.php$")) - (setq type-fqn (phpinspect-filename-to-typename dir file prefix)) - (phpinspect-autoloader-put-type-bag al type-fqn) - (puthash type-fqn file typehash) - (when own - (puthash type-fqn file own-typehash)))))) + (when (phpinspect-fs-file-directory-p fs dir) + (dolist (file (phpinspect-fs-directory-files-recursively fs dir "\\.php$")) + (setq type-fqn (phpinspect-filename-to-typename dir file prefix)) + (phpinspect-autoloader-put-type-bag al type-fqn) + (puthash type-fqn file typehash) + (when own + (puthash type-fqn file own-typehash))))))) (cl-defmethod phpinspect-al-strategy-execute ((strat phpinspect-psr0)) (let* ((fs (phpinspect-psr0-fs strat))