Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 4.5923 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
24 | 18 | protected function checkEnvironment(): void |
|
25 | { |
||
26 | 18 | if (PHP_VERSION_ID < 70300 && false === static::$ignoreVersionRestrictions) { |
|
27 | // `HRTimer::class` uses `hrtime()` function of PHP ^7.3. |
||
28 | // There is almost no sense in using polyfill function. |
||
29 | // If you're REALLY need to use HRTimer set `$ignoreVersionRestrictions` to true. |
||
30 | // Otherwise use `Timer::class` instance instead. |
||
31 | throw new \RuntimeException('[' . static::class . '] Your php version is below 7.3.0.'); |
||
32 | } |
||
33 | // @codeCoverageIgnoreStart |
||
34 | if (PHP_INT_SIZE < INT_SIZE_64BIT) { |
||
35 | // `HRTimer::class` is designed and tested in 64bit environment |
||
36 | // So it can be used in 64bit environments only |
||
37 | // Maybe with some minor modification it can run on 32bit installations too |
||
38 | throw new \RuntimeException(' You\'re using 32bit php installation.'); |
||
39 | } |
||
66 |