| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 41 | public function sendData($data)  | 
            ||
| 42 |     { | 
            ||
| 43 | $request = new Request(  | 
            ||
| 44 | 'GET',  | 
            ||
| 45 | $this->endpoint . '?' . http_build_query(['version' => $this->getVersion(), 'text' => $this->getText()]),  | 
            ||
| 46 | ['Authorization' => 'Basic ' . base64_encode($data['username'] . ':' . $data['password'])]  | 
            ||
| 47 | );  | 
            ||
| 48 | |||
| 49 |         try { | 
            ||
| 50 | $response = $this->httpClient->send($request);  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 51 |         } catch (ClientException $e) { | 
            ||
| 52 | }  | 
            ||
| 53 | |||
| 54 | return $this->response = new ToneResponse($this, $response->getBody());  | 
            ||
| 55 | }  | 
            ||
| 56 | }  | 
            ||
| 57 | 
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: