| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Current implements Endpoint |
||
| 10 | { |
||
| 11 | const ENDPOINT = 'weather'; |
||
| 12 | |||
| 13 | private $client; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Current constructor. |
||
| 17 | * @param Client $client |
||
| 18 | */ |
||
| 19 | public function __construct(Client $client) |
||
| 20 | { |
||
| 21 | $this->client = $client; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $location |
||
| 26 | * @return Shobi\Weatherapp\Weather\Weather |
||
|
|
|||
| 27 | * |
||
| 28 | * @throws GuzzleHttp\Exception\ClientException\ClientException |
||
| 29 | * fetches the current weather data from the api |
||
| 30 | */ |
||
| 31 | public function get($location = "london") : Weather |
||
| 40 | } |
||
| 41 | } |