| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.1481 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 6 | public function handleReport(RobotReport $query): string |
|
|
|
|||
| 44 | { |
||
| 45 | 6 | $robot = $this->repository->load(); |
|
| 46 | |||
| 47 | 6 | if (!($robot instanceof Robot)) { |
|
| 48 | throw new \RuntimeException( |
||
| 49 | 'Robot cannot be found. Please PLACE the robot first.' |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | |||
| 53 | 6 | return $robot->getReportAsString(); |
|
| 54 | } |
||
| 55 | } |
||
| 56 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.