PHP80 小修 (#187)

* migrate-php80

fix styles
fix static analyse

* fix some bugs
This commit is contained in:
sunxyw
2022-12-19 20:22:47 +08:00
committed by GitHub
parent da516b487d
commit 8ff7da4d23
46 changed files with 180 additions and 366 deletions

View File

@@ -130,9 +130,7 @@ class InitCommand extends Command
// TODO: 优化代码,避免在循环中使用 array_merge 以减少资源消耗
$files = array_merge($files, glob($this->getVendorPath($pattern), GLOB_BRACE));
}
return array_map(function ($file) {
return str_replace($this->getVendorPath(''), '', $file);
}, $files);
return array_map(fn ($file) => str_replace($this->getVendorPath(''), '', $file), $files);
}
/**