Skip to content

Commit 74eca03

Browse files
vjikStyleCIBot
andauthored
Adopt to yiisoft/db #343 (#118)
* Adopt to `yiisoft/db` #343 * Apply fixes from StyleCI Co-authored-by: StyleCI Bot <bot@styleci.io>
1 parent 647f531 commit 74eca03

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

src/Schema.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,15 @@ public function __construct(private ConnectionInterface $db, SchemaCache $schema
135135
*
136136
* @throws Exception|InvalidConfigException|Throwable
137137
*
138-
* @return array all table names in the database. The names have NO schema name prefix.
138+
* @return array All table names in the database. The names have NO schema name prefix.
139139
*/
140140
protected function findTableNames(string $schema = ''): array
141141
{
142-
$tableNames = $this->db->createCommand(
143-
"SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence' ORDER BY tbl_name"
144-
)->queryColumn();
145-
146-
if (!$tableNames) {
147-
return [];
148-
}
149-
150-
return $tableNames;
142+
return $this->db
143+
->createCommand(
144+
"SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence' ORDER BY tbl_name"
145+
)
146+
->queryColumn();
151147
}
152148

153149
/**

0 commit comments

Comments
 (0)