Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
35 | 9 | public function getNumber(): int |
|
36 | { |
||
37 | 9 | if (!preg_match('/\d+/', get_class($this), $matches) || !($number = (int) $matches[0])) { |
|
38 | 1 | throw new \LogicException("Invalid migration class name (must include a migration number)"); |
|
39 | } |
||
40 | |||
41 | 8 | return $number; |
|
42 | } |
||
43 | |||
56 |