Conditions | 5 |
Paths | 12 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5.0187 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
22 | 4 | protected function assertStartAndStop($start, $stop): void |
|
23 | { |
||
24 | 4 | $start_ok = false; |
|
25 | 4 | $stop_ok = false; |
|
26 | 4 | if (is_float($start)) { |
|
|
|||
27 | 2 | $start_ok = true; |
|
28 | } |
||
29 | 4 | if (is_float($stop)) { |
|
30 | 2 | $stop_ok = true; |
|
31 | } |
||
32 | 4 | if (!$start_ok) { |
|
33 | 2 | throw new \RuntimeException('Start value is NOT ok. [' . typeOf($start) . ']'); |
|
34 | } |
||
35 | 2 | if (!$stop_ok) { |
|
36 | throw new \RuntimeException('Stop value is NOT ok. [' . typeOf($stop) . ']'); |
||
37 | } |
||
41 |