| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 56 | public function post(string $id, string $type, string $rawId, array $response, ObjectId $challenge): Response |
||
| 57 | { |
||
| 58 | $challenge = $this->creation_challenge_factory->getOne($challenge); |
||
| 59 | |||
| 60 | $device = $this->device_factory->create($challenge, [ |
||
| 61 | 'id' => $id, |
||
| 62 | 'type' => $type, |
||
| 63 | 'rawId' => $rawId, |
||
| 64 | 'response' => $response, |
||
| 65 | ]); |
||
| 66 | |||
| 67 | return (new Response())->setCode(201)->setBody([]); |
||
| 68 | } |
||
| 69 | } |
||
| 70 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.