diff --git a/readme.md b/readme.md index 7741728..89ac7b7 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# PHP Library for the Nationanl Weather Service REST API +# PHP Library for the National Weather Service REST API Provides an intuitive interface to use the NWS REST API in any PHP application. diff --git a/src/Api.php b/src/Api.php index ed4cf49..73686cc 100644 --- a/src/Api.php +++ b/src/Api.php @@ -14,7 +14,7 @@ class Api { - protected Psr16Adapter|null $cache = null; + private Psr16Adapter|null $cache = null; private string $base_url = "https://api.weather.gov"; private string $user_agent; private HttpClient $client; @@ -43,10 +43,9 @@ public function getUserAgent(): string return $this->user_agent; } - public function setUserAgent(string $domain, string $email): self + private function setUserAgent(string $domain, string $email): void { $this->user_agent = "({$domain}, {$email})"; - return $this; } public function getCacheLifetime(): int diff --git a/src/Features/Point.php b/src/Features/Point.php index 583b052..96fb34d 100644 --- a/src/Features/Point.php +++ b/src/Features/Point.php @@ -117,7 +117,7 @@ public function gridY(): int return $this->properties_gridY(); } - public function latestObservations($observation_station_index = 0): LatestObservations + public function latestObservations(int $observation_station_index = 0): LatestObservations { return $this->observationStations()->station($observation_station_index)->latestObservations(); }