| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function __invoke($decodeRequest = true, $encodeResponse = true) |
||
| 11 | { |
||
| 12 | 4 | return function (Request $request) use ($decodeRequest, $encodeResponse) { |
|
| 13 | 4 | $restAttribute = $request->attributes->get('_rest', array()); |
|
| 14 | |||
| 15 | 4 | $restAttribute['decode_request'] = (bool) $decodeRequest; |
|
| 16 | 4 | $restAttribute['encode_response'] = (bool) $encodeResponse; |
|
| 17 | |||
| 18 | 4 | $request->attributes->set('_rest', $restAttribute); |
|
| 19 | 4 | }; |
|
| 20 | } |
||
| 21 | } |
||
| 22 |