Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 21, 2024
1 parent 3a5c6b1 commit 4b7329e
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/Contracts/ProvinceSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ public static function getCountryCode(): string;
* @return array|ProvinceType[]
*/
public static function getProvinceTypes(): array;

}
1 change: 1 addition & 0 deletions src/resources/database/seeds/CountiesOfHungary.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CountiesOfHungary extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'HU';

protected static array $provinceTypes = [ProvinceType::COUNTY];

public function run()
Expand Down
1 change: 1 addition & 0 deletions src/resources/database/seeds/CountiesOfRomania.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CountiesOfRomania extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'RO';

protected static array $provinceTypes = [ProvinceType::COUNTY];

/**
Expand Down
3 changes: 1 addition & 2 deletions src/resources/database/seeds/IsProvinceSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public static function getCountryCode(): string

public static function getProvinceTypes(): array
{
return array_map(fn(string|ProvinceType $type) => is_string($type) ? ProvinceTypeProxy::create($type): $type, self::$provinceTypes);
return array_map(fn (string|ProvinceType $type) => is_string($type) ? ProvinceTypeProxy::create($type) : $type, self::$provinceTypes);
}

}
4 changes: 2 additions & 2 deletions src/resources/database/seeds/ProvinceSeeders.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Konekt\Address\Seeds;

use InvalidArgumentException;
use Illuminate\Support\Str;
use InvalidArgumentException;
use Konekt\Address\Contracts\ProvinceSeeder;
use Konekt\Extend\Concerns\HasRegistry;
use Konekt\Extend\Concerns\RequiresClassOrInterface;
Expand All @@ -32,7 +32,7 @@ public static function make(string $id, array $parameters = []): object
/** @return ProvinceSeeder[] */
public static function availableSeedersOfCountry(string $country): array
{
return array_filter(self::$registry, fn($class) => $class::getCountryCode() === $country);
return array_filter(self::$registry, fn ($class) => $class::getCountryCode() === $country);
}

public static function extend(string $seederClass): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ProvincesAndRegionsOfBelgium extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'BE';

protected static array $provinceTypes = [ProvinceType::REGION, ProvinceType::PROVINCE];

public function run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ProvincesAndTerritoriesOfCanada extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'CA';

protected static array $provinceTypes = [ProvinceType::PROVINCE, ProvinceType::TERRITORY];

public function run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class ProvincesAndTerritoriesOfCanadaFrench extends Seeder implements ProvinceSe
use IsProvinceSeeder;

protected static string $forCountry = 'CA';

protected static array $provinceTypes = [ProvinceType::PROVINCE, ProvinceType::TERRITORY];

public function run()
Expand Down
1 change: 1 addition & 0 deletions src/resources/database/seeds/ProvincesOfIndonesia.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ProvincesOfIndonesia extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'ID';

protected static array $provinceTypes = [ProvinceType::UNIT, ProvinceType::PROVINCE, ProvinceType::REGION];

public function run()
Expand Down
2 changes: 1 addition & 1 deletion src/resources/database/seeds/ProvincesOfNetherlands.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class ProvincesOfNetherlands extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'NL';
protected static array $provinceTypes = [ProvinceType::PROVINCE];

protected static array $provinceTypes = [ProvinceType::PROVINCE];

public function run()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class StatesAndTerritoriesOfIndia extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'IN';

protected static array $provinceTypes = [ProvinceType::STATE, ProvinceType::TERRITORY];

public function run()
Expand Down
1 change: 1 addition & 0 deletions src/resources/database/seeds/StatesOfGermany.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class StatesOfGermany extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'DE';

protected static array $provinceTypes = [ProvinceType::STATE];

public function run()
Expand Down
1 change: 1 addition & 0 deletions src/resources/database/seeds/StatesOfUsa.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class StatesOfUsa extends Seeder implements ProvinceSeeder
use IsProvinceSeeder;

protected static string $forCountry = 'US';

protected static array $provinceTypes = [ProvinceType::STATE, ProvinceType::FEDERAL_DISTRICT, ProvinceType::MILITARY, ProvinceType::TERRITORY];

/**
Expand Down

0 comments on commit 4b7329e

Please sign in to comment.