| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function get($url) |
||
| 37 | { |
||
| 38 | $response = $this->httpClient->get($url); |
||
| 39 | |||
| 40 | $contentTypes = $response->getHeader('content-type'); |
||
| 41 | $contentType = array_shift($contentTypes); |
||
|
|
|||
| 42 | |||
| 43 | if (!array_key_exists($contentType, $this->processors)) { |
||
| 44 | throw new UnknownContentTypeException($contentType); |
||
| 45 | } |
||
| 46 | |||
| 47 | $processor = $this->processors[$contentType]; |
||
| 48 | |||
| 49 | return $processor->process($response, $this); |
||
| 50 | } |
||
| 51 | } |
||
| 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.