| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 4 | public function __construct(\Guzzle\Http\Message\Response $response) |
|
| 19 | { |
||
| 20 | 4 | if ($response->isSuccessful()) { |
|
| 21 | 4 | $this->response = $response->json(); |
|
| 22 | |||
| 23 | 4 | if (is_array($this->response)) { |
|
| 24 | 4 | foreach ($this->response as $key => $value) { |
|
| 25 | 4 | $this->response[$key] = $value; |
|
| 26 | 4 | } |
|
| 27 | 4 | } |
|
| 28 | 4 | } else { |
|
|
|
|||
| 29 | // TODO: Error handling |
||
| 30 | } |
||
| 31 | 4 | } |
|
| 32 | |||
| 67 |
This check looks for the
elsebranches ofifstatements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
elsebranches can be removed.could be turned into
This is much more concise to read.