Skip to content

Commit

Permalink
Run latest php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Jan 5, 2024
1 parent f545fe9 commit 0db2cc8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/Database/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use GeoIp2\ProviderInterface;
use MaxMind\Db\Reader as DbReader;
use MaxMind\Db\Reader\InvalidDatabaseException;
use MaxMind\Db\Reader\Metadata;

/**
* Instances of this class provide a reader for the GeoIP2 database format.
Expand Down Expand Up @@ -250,7 +251,7 @@ private function getRecord(string $class, string $type, string $ipAddress): arra
* @throws \InvalidArgumentException if arguments are passed to the method
* @throws \BadMethodCallException if the database has been closed
*
* @return \MaxMind\Db\Reader\Metadata object for the database
* @return Metadata object for the database
*/
public function metadata(): DbReader\Metadata
{
Expand Down
8 changes: 4 additions & 4 deletions src/Model/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ public function __construct(array $raw, array $locales = ['en'])
parent::__construct($raw, $locales);

$this->city = new CityRecord($raw['city'] ?? [], $locales);
$this->location = new \GeoIp2\Record\Location($raw['location'] ?? []);
$this->postal = new \GeoIp2\Record\Postal($raw['postal'] ?? []);
$this->location = new Location($raw['location'] ?? []);
$this->postal = new Postal($raw['postal'] ?? []);

if (!isset($raw['subdivisions'])) {
$this->subdivisions = [];
$this->mostSpecificSubdivision =
new \GeoIp2\Record\Subdivision([], $locales);
new Subdivision([], $locales);

return;
}

$subdivisions = [];
foreach ($raw['subdivisions'] as $sub) {
$subdivisions[] =
new \GeoIp2\Record\Subdivision($sub, $locales)
new Subdivision($sub, $locales)
;
}

Expand Down
8 changes: 4 additions & 4 deletions src/Model/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,24 @@ class Country implements \JsonSerializable
*/
public function __construct(array $raw, array $locales = ['en'])
{
$this->continent = new \GeoIp2\Record\Continent(
$this->continent = new Continent(
$raw['continent'] ?? [],
$locales
);
$this->country = new CountryRecord(
$raw['country'] ?? [],
$locales
);
$this->maxmind = new \GeoIp2\Record\MaxMind($raw['maxmind'] ?? []);
$this->maxmind = new MaxMind($raw['maxmind'] ?? []);
$this->registeredCountry = new CountryRecord(
$raw['registered_country'] ?? [],
$locales
);
$this->representedCountry = new \GeoIp2\Record\RepresentedCountry(
$this->representedCountry = new RepresentedCountry(
$raw['represented_country'] ?? [],
$locales
);
$this->traits = new \GeoIp2\Record\Traits($raw['traits'] ?? []);
$this->traits = new Traits($raw['traits'] ?? []);
}

public function jsonSerialize(): ?array
Expand Down
2 changes: 1 addition & 1 deletion tests/GeoIp2/Test/WebService/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ private function makeRequest(

$method = strtolower($service);

$client = new \GeoIp2\WebService\Client(
$client = new Client(
$accountId,
$licenseKey,
$locales,
Expand Down

0 comments on commit 0db2cc8

Please sign in to comment.