Skip to content

Commit fed802e

Browse files
committed
cleanup
1 parent fa41cea commit fed802e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

public/example.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
*
55
* @see https://github.com/attogram/weatherbit-api-wrapper
66
*/
7-
declare(strict_types = 1);
7+
declare(strict_types=1);
88

9-
use \Attogram\Weatherbit\Weatherbit;
9+
use Attogram\Weatherbit\Weatherbit;
1010

1111
ini_set('display_errors', '1');
1212
ini_set('display_startup_errors', '1');

src/Weatherbit.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @see https://github.com/attogram/weatherbit-api-wrapper
66
*/
7-
declare(strict_types = 1);
7+
declare(strict_types=1);
88

99
namespace Attogram\Weatherbit;
1010

@@ -20,7 +20,7 @@
2020

2121
class Weatherbit
2222
{
23-
const VERSION = '2.1.0';
23+
const VERSION = '2.1.1';
2424

2525
/**
2626
* @var string - user agent for API requests
@@ -175,7 +175,7 @@ public function setLocationByCity(string $city, string $country = '')
175175
if (!empty($country) && strlen($country) != 2) {
176176
throw new WeatherbitException('Invalid Country Code');
177177
}
178-
178+
179179
$this->location['city'] = $city;
180180
if (!empty($country)) {
181181
$this->location['country'] = $country;
@@ -325,13 +325,13 @@ private function setUrl($prefix, $additional = [])
325325
throw new WeatherbitException('Missing API Key');
326326
}
327327

328-
$this->url = self::PREFIX_API . $prefix . '?key=' . urlencode($this->key);
328+
$this->url = self::PREFIX_API . $prefix . '?key=' . urlencode($this->key);
329329

330330
if (!empty($this->language)) {
331-
$this->url .= '&lang=' . urlencode($this->language);
331+
$this->url .= '&lang=' . urlencode($this->language);
332332
}
333333
if (!empty($this->units)) {
334-
$this->url .= '&units=' . urlencode($this->units);
334+
$this->url .= '&units=' . urlencode($this->units);
335335
}
336336
$this->setUrlLocation();
337337
$this->setUrlAdditional($additional);
@@ -383,7 +383,7 @@ private function get()
383383
if (empty($this->url)) {
384384
throw new WeatherbitException('Missing URL for API Call');
385385
}
386-
386+
387387
$curl = curl_init($this->url);
388388
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
389389
curl_setopt($curl, CURLOPT_USERAGENT, self::USER_AGENT);

src/WeatherbitException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* Custom Exception for Weatherbit
44
*/
5-
declare(strict_types = 1);
5+
declare(strict_types=1);
66

77
namespace Attogram\Weatherbit;
88

0 commit comments

Comments
 (0)