Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 0 |
1 | <?php |
||
18 | 36 | public function findMigrations(string $directory, ?string $namespace = null) : array |
|
19 | { |
||
20 | 36 | $dir = $this->getRealPath($directory); |
|
21 | |||
22 | 34 | $files = glob(rtrim($dir, '/') . '/Version*.php'); |
|
23 | 34 | if ($files === false) { |
|
24 | $files = []; |
||
25 | } |
||
26 | |||
27 | 34 | return $this->loadMigrations($files, $namespace); |
|
28 | } |
||
30 |