Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | public function databaseAlias(AbstractTable $table): string |
||
57 | { |
||
58 | foreach ($this->dbal->getDatabases() as $database) { |
||
59 | if ( |
||
60 | $table->getDriver() == $database->getDriver() |
||
61 | && $table->getPrefix() == $database->getPrefix() |
||
62 | ) { |
||
63 | return $database->getName(); |
||
64 | } |
||
65 | } |
||
66 | |||
67 | throw new AtomizerException("Unable to find database associated with {$table}"); |
||
68 | } |
||
69 | } |