This commit is contained in:
2023-04-16 00:59:56 +08:00
parent becf0bf249
commit cdd8644419
+3 -2
View File
@@ -35,8 +35,9 @@ class Scanner extends Component
$container = Container::instance(); $container = Container::instance();
foreach ($this->files as $file) { foreach ($this->files as $file) {
$class = $namespace . '\\' . $this->rename($file); $class = $namespace . '\\' . $this->rename($file);
if (!file_exists($class)) { if (file_exists($class)) {
throw new Exception('Please follow the PSR-4 specification to write code.' . $class); error('Please follow the PSR-4 specification to write code.' . $class);
continue;
} }
$container->parse($class); $container->parse($class);
} }