This commit is contained in:
2021-01-19 18:44:19 +08:00
parent 7aa72b9eac
commit d5e0bea13a
2 changed files with 19 additions and 7 deletions
+4 -7
View File
@@ -56,22 +56,19 @@ class Gii
*/
public function run(?Connection $db, $input): array
{
return [
go(function () use ($db, $input) {
return $this->gen($input, $db);
})
];
return $this->gen($input, $db);
}
/**
* @param $input
* @param $db
* @return array|string[]
* @return array
* @throws ComponentException
* @throws ConfigException
* @throws Exception
*/
public function gen($input, $db)
public function gen($input, $db): array
{
$this->input = $input;
if (!empty($db)) $this->db = $db;