ppshobi /
openweathermap
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Shobi\Weatherapp; |
||
| 4 | |||
| 5 | use Shobi\Weatherapp\Http\Client; |
||
| 6 | use Shobi\Weatherapp\Endpoints\Current; |
||
| 7 | |||
| 8 | class WeatherApp |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Shobi\Weatherapp\Http\Client |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 12 | */ |
||
| 13 | private $client; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * WeatherApp constructor. |
||
| 17 | */ |
||
| 18 | public function __construct(Client $client) |
||
| 19 | { |
||
| 20 | $this->client = $client; |
||
|
0 ignored issues
–
show
It seems like
$client of type Shobi\Weatherapp\Http\Client is incompatible with the declared type Shobi\Weatherapp\Shobi\Weatherapp\Http\Client of property $client.
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.. Loading history...
|
|||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $location |
||
| 25 | * @return Weather\Weather |
||
| 26 | * @throws GuzzleHttp\Exception\ClientException |
||
| 27 | */ |
||
| 28 | public function current($location = 'london') |
||
| 29 | { |
||
| 30 | return (new Current($this->client))->get($location); |
||
| 31 | } |
||
| 32 | } |