| Total Complexity | 6 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Client implements ClientInterface |
||
| 10 | { |
||
| 11 | private const TEAMS = '/v1/competitions/467/teams'; |
||
| 12 | private const GAMES = '/v1/competitions/467/fixtures'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Client |
||
| 16 | */ |
||
| 17 | private $client; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $options = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | */ |
||
| 26 | public function __construct() |
||
| 32 | ] |
||
| 33 | ]; |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | |||
| 38 | public function getTeams() |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getGames() |
||
| 48 | { |
||
| 49 | $res = $this->getClient()->get(self::GAMES, $this->options); |
||
| 50 | return json_decode( |
||
| 51 | (string)$res->getBody()->getContents(), |
||
| 52 | true |
||
| 53 | ); |
||
| 54 | } |
||
| 55 | |||
| 56 | private function getClient() |
||
| 64 | } |
||
| 65 | } |
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..