| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 12 | class CWByCityId extends WeatherFactory implements CWSingleResultInterface |
||
| 13 | { |
||
| 14 | use CWSingleResultTrait; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int City ID. List of city ID 'city.list.json.gz' |
||
| 18 | */ |
||
| 19 | protected $cityId; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * CWByCityName constructor. |
||
| 23 | * |
||
| 24 | * You can make an API call by city ID. List of city ID 'city.list.json.gz' can be downloaded |
||
| 25 | * here http://bulk.openweathermap.org/sample/ |
||
| 26 | * |
||
| 27 | * @param int $cityId City ID. List of city ID 'city.list.json.gz' |
||
| 28 | * @throws \Illuminate\Contracts\Container\BindingResolutionException |
||
| 29 | */ |
||
| 30 | public function __construct(int $cityId) |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Generate query parameters for api call. |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | private function paramsToArray(): array |
||
| 47 |