| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| 1 | <?php |
||
| 18 | 5 | public function __invoke( |
|
| 19 | ServerRequestInterface $request, |
||
| 20 | ResponseInterface $response, |
||
| 21 | callable $next |
||
| 22 | ) { |
||
| 23 | 5 | $mime = strtolower($request->getHeaderLine('Content-Type')); |
|
| 24 | |||
| 25 | 5 | if ($this->isApplicableMimeType($mime) && !$request->getParsedBody()) { |
|
| 26 | 3 | $body = (string) $request->getBody(); |
|
|
|
|||
| 27 | 3 | $parsed = $this->getParsedBody($body); |
|
| 28 | 2 | $request = $request->withParsedBody($parsed); |
|
| 29 | } |
||
| 30 | |||
| 31 | 4 | return $next($request, $response); |
|
| 32 | } |
||
| 33 | |||
| 52 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.