From 3ff158c337da2cfdf81b35825be2f9f43bcdab58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 25 Mar 2021 16:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gii/Gii.php | 4 ++-- Gii/GiiBase.php | 4 ++-- Gii/GiiTask.php | 2 +- HttpServer/Route/Router.php | 2 +- System/Abstracts/BaseApplication.php | 4 ++-- System/Process/ServerInotify.php | 2 +- function.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gii/Gii.php b/Gii/Gii.php index 8e0b6c85..95482bfb 100644 --- a/Gii/Gii.php +++ b/Gii/Gii.php @@ -35,10 +35,10 @@ class Gii /** @var Input */ private Input $input; - public string $modelPath = APP_PATH . '/app/Models/'; + public string $modelPath = APP_PATH . 'app/Models/'; public string $modelNamespace = 'App\\Models\\'; - public string $controllerPath = APP_PATH . '/app/Http/Controllers/'; + public string $controllerPath = APP_PATH . 'app/Http/Controllers/'; public string $controllerNamespace = 'App\\Http\\Controllers\\'; diff --git a/Gii/GiiBase.php b/Gii/GiiBase.php index bbe53a35..03929ac8 100644 --- a/Gii/GiiBase.php +++ b/Gii/GiiBase.php @@ -24,10 +24,10 @@ abstract class GiiBase /** @var Input */ protected Input $input; - public string $modelPath = APP_PATH . '/app/Models/'; + public string $modelPath = APP_PATH . 'app/Models/'; public string $modelNamespace = 'App\Models\\'; - public string $controllerPath = APP_PATH . '/app/Http/Controllers/'; + public string $controllerPath = APP_PATH . 'app/Http/Controllers/'; public string $controllerNamespace = 'App\\Http\\Controllers\\'; public ?string $module = null; diff --git a/Gii/GiiTask.php b/Gii/GiiTask.php index f1dce09e..8614281d 100644 --- a/Gii/GiiTask.php +++ b/Gii/GiiTask.php @@ -78,7 +78,7 @@ class ' . $managerName . ' implements Task }'; - $file = APP_PATH . '/app/Async/' . $managerName . '.php'; + $file = APP_PATH . 'app/Async/' . $managerName . '.php'; if (file_exists($file)) { unlink($file); } diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 03d44d41..42ad790f 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -626,7 +626,7 @@ class Router extends HttpService implements RouterInterface */ public function loadRouterSetting() { - $this->loadRouteDir(APP_PATH . '/routes'); + $this->loadRouteDir(APP_PATH . 'routes'); } /** diff --git a/System/Abstracts/BaseApplication.php b/System/Abstracts/BaseApplication.php index e0e07ced..7c2543aa 100644 --- a/System/Abstracts/BaseApplication.php +++ b/System/Abstracts/BaseApplication.php @@ -56,9 +56,9 @@ abstract class BaseApplication extends Service /** * @var string */ - public string $storage = APP_PATH . '/storage'; + public string $storage = APP_PATH . 'storage'; - public string $envPath = APP_PATH . '/.env'; + public string $envPath = APP_PATH . '.env'; /** * Init constructor. diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index bc6b6179..4529e28f 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -275,7 +275,7 @@ class ServerInotify extends Process return FALSE; } - if (in_array($dir, [APP_PATH . '/config', APP_PATH . '/commands', APP_PATH . '/.git', APP_PATH . '/.gitee'])) { + if (in_array($dir, [APP_PATH . 'config', APP_PATH . 'commands', APP_PATH . '.git', APP_PATH . '.gitee'])) { return FALSE; } diff --git a/function.php b/function.php index 92b108a5..0d6727ba 100644 --- a/function.php +++ b/function.php @@ -650,7 +650,7 @@ if (!function_exists('sweep')) { * @param string $configPath * @return array|false|string|null */ - function sweep($configPath = APP_PATH . '/config'): bool|array|string|null + function sweep($configPath = APP_PATH . 'config'): bool|array|string|null { $array = []; foreach (glob($configPath . '/*') as $config) {