| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 12 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | View Code Duplication | protected function testExists($target, $expectExists, array $task) |
|
| 49 | { |
||
| 50 | $success = $this->curl($target, []); |
||
| 51 | |||
| 52 | if ($success === $expectExists) { |
||
| 53 | throw new SuccessException('Ok', $task); |
||
| 54 | } |
||
| 55 | |||
| 56 | $msg = $expectExists ? "Target '{$target}' is not available'" : "Target '{$target}' is available"; |
||
| 57 | |||
| 58 | throw new FailException($msg, $task); |
||
| 59 | } |
||
| 60 | } |
||
| 61 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.