| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 59 | 8 | public function post($url, $body) |
|
| 60 | { |
||
| 61 | try { |
||
| 62 | 8 | $response = $this->client->request('POST', $url, [ |
|
| 63 | 8 | 'headers' => $this->headers->getValues(), |
|
| 64 | 8 | 'body' => $body, |
|
| 65 | 'verify' => false |
||
| 66 | ]); |
||
| 67 | |||
| 68 | 1 | return $response; |
|
| 69 | |||
| 70 | 7 | } catch (RequestException $e) { |
|
| 71 | 7 | throw new SiftScienceRequestException($e); |
|
| 72 | } |
||
| 73 | } |
||
| 74 | } |
||
| 75 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.