Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
29 | protected function testExists($name, $expectExists, array $task) |
||
30 | { |
||
31 | if (extension_loaded($name) === $expectExists) { |
||
32 | throw new SuccessException('Ok', $task); |
||
33 | } |
||
34 | |||
35 | $msg = $expectExists ? "Php extension'{$name}' is not loaded'" : "Php extension '{$name}' is loaded"; |
||
36 | |||
37 | throw new FailException($msg, $task); |
||
38 | } |
||
39 | } |
||
40 |