From 1481025d487d3564025bea98a9e9be86457cf814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 29 Sep 2021 10:26:35 +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 --- kiri-gii/Gii.php | 8 ++------ kiri-gii/GiiCommand.php | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/kiri-gii/Gii.php b/kiri-gii/Gii.php index 7c6b5c00..1ba800ca 100644 --- a/kiri-gii/Gii.php +++ b/kiri-gii/Gii.php @@ -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); } diff --git a/kiri-gii/GiiCommand.php b/kiri-gii/GiiCommand.php index ac52a5b1..a3e0d0cf 100644 --- a/kiri-gii/GiiCommand.php +++ b/kiri-gii/GiiCommand.php @@ -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 {