| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4.0466 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 52 | private function getRegistryDbList(Registry $registry): array |
||
| 53 | { |
||
| 54 | $databases = []; |
||
| 55 | foreach ($registry as $regEntity) { |
||
| 56 | if (!$registry->hasTable($regEntity)) { |
||
| 57 | continue; |
||
| 58 | } |
||
| 59 | 16 | $dbName = $registry->getDatabase($regEntity); |
|
| 60 | if (in_array($dbName, $databases, true)) { |
||
| 61 | 16 | continue; |
|
| 62 | 16 | } |
|
| 63 | 16 | ||
| 64 | $databases[] = $dbName; |
||
| 65 | } |
||
| 66 | 16 | ||
| 67 | 16 | return $databases; |
|
| 68 | 16 | } |
|
| 70 |