| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 95 | protected function getRealPath(string $directory) : string |
|
| 24 | { |
||
| 25 | 95 | $dir = realpath($directory); |
|
| 26 | |||
| 27 | 95 | if ($dir === false || ! is_dir($dir)) { |
|
| 28 | 4 | throw new InvalidArgumentException(sprintf( |
|
| 29 | 4 | 'Cannot load migrations from "%s" because it is not a valid directory', |
|
| 30 | 4 | $directory |
|
| 31 | )); |
||
| 32 | } |
||
| 33 | |||
| 34 | 91 | return $dir; |
|
| 35 | } |
||
| 74 |