This commit is contained in:
2021-09-29 10:26:35 +08:00
parent 4a5e21cc49
commit 1481025d48
2 changed files with 2 additions and 8 deletions
+2 -6
View File
@@ -51,8 +51,7 @@ class Gii
*
* @param InputInterface $input
* @return array
* @throws ComponentException
* @throws ConfigException
* @throws Exception
*/
public function run(?Connection $db, InputInterface $input): array
{
@@ -64,13 +63,12 @@ class Gii
* @param InputInterface $input
* @param $db
* @return array
* @throws ComponentException
* @throws Exception
*/
public function gen(InputInterface $input, $db): array
{
$this->input = $input;
if (!empty($db)) $this->db = $db;
$this->db = $db;
$make = $this->input->getArgument('make');
if (empty($make)) {
@@ -110,8 +108,6 @@ class Gii
if ($this->db instanceof Connection) {
return $this->makeByDatabases($make, $input);
}
$db = $this->input->getArgument('databases');
$this->db = Kiri::app()->get('db')->get($db);
return $this->makeByDatabases($make, $input);
}
-2
View File
@@ -45,8 +45,6 @@ class GiiCommand extends Command
* @return array
* @throws ComponentException
* @throws ConfigException
* @throws NotFindClassException
* @throws ReflectionException
*/
public function execute(InputInterface $input, OutputInterface $output): array
{