Skip to content

Commit

Permalink
refactor: remove setApiVersion setter
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrildewit committed Feb 1, 2021
1 parent 61a92ad commit 546d668
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/UrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand All @@ -49,7 +41,7 @@ protected function collectParameters(): array
protected function getDefaultParameters(): array
{
return [
'api' => $this->apiVersion,
'api' => self::API_VERSION,
];
}

Expand Down

0 comments on commit 546d668

Please sign in to comment.