Skip to content

Commit

Permalink
🚨 Apply PHP CS Fixer fixes (#1219)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelien authored Mar 2, 2024
1 parent 1518542 commit e84d7ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Mapbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ final class Mapbox extends AbstractHttpProvider implements Provider
public function __construct(
ClientInterface $client,
string $accessToken,
string $country = null,
?string $country = null,
string $geocodingMode = self::GEOCODING_MODE_PLACES
) {
parent::__construct($client);
Expand Down Expand Up @@ -232,7 +232,7 @@ public function getName(): string
/**
* @return string query with extra params
*/
private function buildQuery(string $url, int $limit, string $locale = null, string $country = null): string
private function buildQuery(string $url, int $limit, ?string $locale = null, ?string $country = null): string
{
$parameters = array_filter([
'country' => $country,
Expand All @@ -246,7 +246,7 @@ private function buildQuery(string $url, int $limit, string $locale = null, stri
return $url.$separator.http_build_query($parameters);
}

private function fetchUrl(string $url, int $limit, string $locale = null, string $country = null): AddressCollection
private function fetchUrl(string $url, int $limit, ?string $locale = null, ?string $country = null): AddressCollection
{
$url = $this->buildQuery($url, $limit, $locale, $country);
$content = $this->getUrlContents($url);
Expand Down
10 changes: 5 additions & 5 deletions Model/MapboxAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final class MapboxAddress extends Address
*/
private $neighborhood;

public function withId(string $id = null): self
public function withId(?string $id = null): self
{
$new = clone $this;
$new->id = $id;
Expand All @@ -67,7 +67,7 @@ public function getStreetName(): ?string
return $this->streetName;
}

public function withStreetName(string $streetName = null): self
public function withStreetName(?string $streetName = null): self
{
$new = clone $this;
$new->streetName = $streetName;
Expand All @@ -80,7 +80,7 @@ public function getStreetNumber(): ?string
return $this->streetNumber;
}

public function withStreetNumber(string $streetNumber = null): self
public function withStreetNumber(?string $streetNumber = null): self
{
$new = clone $this;
$new->streetNumber = $streetNumber;
Expand Down Expand Up @@ -112,7 +112,7 @@ public function getFormattedAddress(): ?string
return $this->formattedAddress;
}

public function withFormattedAddress(string $formattedAddress = null): self
public function withFormattedAddress(?string $formattedAddress = null): self
{
$new = clone $this;
$new->formattedAddress = $formattedAddress;
Expand All @@ -125,7 +125,7 @@ public function getNeighborhood(): ?string
return $this->neighborhood;
}

public function withNeighborhood(string $neighborhood = null): self
public function withNeighborhood(?string $neighborhood = null): self
{
$new = clone $this;
$new->neighborhood = $neighborhood;
Expand Down

0 comments on commit e84d7ad

Please sign in to comment.