diff --git a/bin/Base.php b/bin/Base.php index e6013a2..97190be 100644 --- a/bin/Base.php +++ b/bin/Base.php @@ -124,15 +124,15 @@ class Base $dirFiles = scandir($dir); $oldDir = $dir . DIRECTORY_SEPARATOR; foreach ($dirFiles as $file) { - if ($file !== '.' && $file !== '..') { - $newsDir = $oldDir . $file; - if (is_dir($newsDir)) { - $this->scandir($newsDir); - } elseif ($file === 'Run.php') { - // 这样可以屏蔽非入口 - $this->dirFiles[] = $oldDir . 'Run'; - } + if ($file === '.' || $file === '..') continue; + + if (is_dir($newsDir = $oldDir . $file)) { + $this->scandir($newsDir); + } elseif ($file === 'Run.php') { + // 这样可以屏蔽非入口 + $this->dirFiles[] = $oldDir . 'Run'; } + } } diff --git a/bin/Psr4Autoload.php b/bin/Psr4Autoload.php index 73f354d..1e854c4 100644 --- a/bin/Psr4Autoload.php +++ b/bin/Psr4Autoload.php @@ -22,7 +22,6 @@ class Psr4Autoload $this->addNamespace('bin', ROOTDIR . DIRECTORY_SEPARATOR . 'bin', true); $this->addNamespace('demo', ROOTDIR . DIRECTORY_SEPARATOR . 'demo', true); - $this->addNamespace('mode', ROOTDIR . DIRECTORY_SEPARATOR . 'mode', true); } diff --git a/demo/AbstractFactory/Run.php b/demo/AbstractFactory/Run.php deleted file mode 100644 index 2d3e774..0000000 --- a/demo/AbstractFactory/Run.php +++ /dev/null @@ -1,14 +0,0 @@ -