| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 37 | private function sendRequest() |
|
| 42 | { |
||
| 43 | 37 | $method = $this->chain->http['method']; |
|
| 44 | 37 | $data = $this->chain->http; |
|
| 45 | 37 | if ($method == 'get' or $method == 'getJson') { |
|
| 46 | 27 | $response = $this->phpunit->$method($data['uri'], $data['headers']); |
|
| 47 | } else { |
||
| 48 | 10 | $response = $this->phpunit->$method($data['uri'], $data['data'], $data['headers']); |
|
| 49 | } |
||
| 50 | |||
| 51 | 37 | return $response; |
|
| 52 | } |
||
| 79 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.