| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 18 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | View Code Duplication | public function getTokenFromServer() |
|
| 53 | { |
||
| 54 | $data = [ |
||
| 55 | 'suite_id' => $this->id, |
||
| 56 | 'suite_secret' => $this->secret, |
||
| 57 | 'suite_ticket' => $this->ticket->getTicket(), |
||
| 58 | ]; |
||
| 59 | |||
| 60 | $http = $this->getHttp(); |
||
| 61 | |||
| 62 | $token = $http->parseJSON($http->json(self::API_TOKEN_GET, $data)); |
||
| 63 | |||
| 64 | if (empty($token[$this->tokenJsonKey])) { |
||
| 65 | throw new HttpException('Request SuiteAccessToken fail. response: '.json_encode($token, JSON_UNESCAPED_UNICODE)); |
||
| 66 | } |
||
| 67 | |||
| 68 | return $token; |
||
| 69 | } |
||
| 70 | } |
||
| 71 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..