| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | #[Override] |
||
| 25 | public function invoke(MethodInvocation $invocation) |
||
| 26 | 6 | { |
|
| 27 | $ro = $invocation->proceed(); |
||
| 28 | assert($ro instanceof ResourceObject); |
||
| 29 | 6 | $isCreated = $ro->code === 201 && isset($ro->headers['Location']); |
|
| 30 | 6 | if (! $isCreated) { |
|
| 31 | 6 | return $ro; |
|
| 32 | 1 | } |
|
| 33 | |||
| 34 | 5 | $ro->setRenderer($this->renderer); |
|
| 35 | |||
| 36 | 5 | return $ro; |
|
| 37 | } |
||
| 39 |