refactor with php-libonebot factory classes

This commit is contained in:
crazywhalecc
2022-12-18 18:33:51 +08:00
parent 3ecd224ce6
commit 39b3a74d34
11 changed files with 191 additions and 72 deletions

View File

@@ -15,7 +15,7 @@ class CheckConfigCommand extends Command
protected function handle(): int
{
$current_cfg = getcwd() . '/config/';
$current_cfg = SOURCE_ROOT_DIR . '/config/';
$remote_cfg = include FRAMEWORK_ROOT_DIR . '/config/global_old.php';
if (file_exists($current_cfg . 'global.php')) {
$this->check($remote_cfg, 'global.php');
@@ -38,11 +38,7 @@ class CheckConfigCommand extends Command
return self::SUCCESS;
}
/**
* @param mixed $remote
* @param mixed $local
*/
private function check($remote, $local)
private function check(mixed $remote, mixed $local)
{
$local_file = include WORKING_DIR . '/config/' . $local;
if ($local_file === true) {