diff --git a/src/UrlGenerator.php b/src/UrlGenerator.php index ec920ff..dbe9566 100644 --- a/src/UrlGenerator.php +++ b/src/UrlGenerator.php @@ -7,8 +7,7 @@ class UrlGenerator { const BASE_URL = 'https://www.google.com/maps/'; - - protected string $apiVersion = '1'; + const API_VERSION = '1'; protected AbstractAction $action; @@ -32,13 +31,6 @@ public function setAction(AbstractAction $action): self return $this; } - public function setApiVersion(string $version): self - { - $this->apiVersion = $version; - - return $this; - } - protected function collectParameters(): array { $actionParameters = $this->action->getParameters(); @@ -49,7 +41,7 @@ protected function collectParameters(): array protected function getDefaultParameters(): array { return [ - 'api' => $this->apiVersion, + 'api' => self::API_VERSION, ]; }