Conditions | 5 |
Paths | 12 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5.1502 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
47 | 3 | protected function assertStartAndStop($start, $stop): void |
|
48 | { |
||
49 | 3 | $start_ok = false; |
|
50 | 3 | $stop_ok = false; |
|
51 | 3 | if (is_int($start)) { |
|
|
|||
52 | 3 | $start_ok = true; |
|
53 | } |
||
54 | 3 | if (is_int($stop)) { |
|
55 | 3 | $stop_ok = true; |
|
56 | } |
||
57 | 3 | if (!$start_ok) { |
|
58 | throw new \RuntimeException('Start value is NOT ok. [' . typeOf($start) . ']'); |
||
59 | } |
||
60 | 3 | if (!$stop_ok) { |
|
61 | throw new \RuntimeException('Stop value is NOT ok. [' . typeOf($stop) . ']'); |
||
62 | } |
||
66 |