|
4 | 4 | * |
5 | 5 | * @see https://github.com/attogram/weatherbit-api-wrapper |
6 | 6 | */ |
7 | | -declare(strict_types = 1); |
| 7 | +declare(strict_types=1); |
8 | 8 |
|
9 | 9 | namespace Attogram\Weatherbit; |
10 | 10 |
|
|
20 | 20 |
|
21 | 21 | class Weatherbit |
22 | 22 | { |
23 | | - const VERSION = '2.1.0'; |
| 23 | + const VERSION = '2.1.1'; |
24 | 24 |
|
25 | 25 | /** |
26 | 26 | * @var string - user agent for API requests |
@@ -175,7 +175,7 @@ public function setLocationByCity(string $city, string $country = '') |
175 | 175 | if (!empty($country) && strlen($country) != 2) { |
176 | 176 | throw new WeatherbitException('Invalid Country Code'); |
177 | 177 | } |
178 | | - |
| 178 | + |
179 | 179 | $this->location['city'] = $city; |
180 | 180 | if (!empty($country)) { |
181 | 181 | $this->location['country'] = $country; |
@@ -325,13 +325,13 @@ private function setUrl($prefix, $additional = []) |
325 | 325 | throw new WeatherbitException('Missing API Key'); |
326 | 326 | } |
327 | 327 |
|
328 | | - $this->url = self::PREFIX_API . $prefix . '?key=' . urlencode($this->key); |
| 328 | + $this->url = self::PREFIX_API . $prefix . '?key=' . urlencode($this->key); |
329 | 329 |
|
330 | 330 | if (!empty($this->language)) { |
331 | | - $this->url .= '&lang=' . urlencode($this->language); |
| 331 | + $this->url .= '&lang=' . urlencode($this->language); |
332 | 332 | } |
333 | 333 | if (!empty($this->units)) { |
334 | | - $this->url .= '&units=' . urlencode($this->units); |
| 334 | + $this->url .= '&units=' . urlencode($this->units); |
335 | 335 | } |
336 | 336 | $this->setUrlLocation(); |
337 | 337 | $this->setUrlAdditional($additional); |
@@ -383,7 +383,7 @@ private function get() |
383 | 383 | if (empty($this->url)) { |
384 | 384 | throw new WeatherbitException('Missing URL for API Call'); |
385 | 385 | } |
386 | | - |
| 386 | + |
387 | 387 | $curl = curl_init($this->url); |
388 | 388 | curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
389 | 389 | curl_setopt($curl, CURLOPT_USERAGENT, self::USER_AGENT); |
|
0 commit comments