diff --git a/config/nusa.php b/config/nusa.php index 7718d0b..530d369 100644 --- a/config/nusa.php +++ b/config/nusa.php @@ -15,5 +15,5 @@ 'villages' => 'villages', ], - 'addressable' => Address::class + 'addressable' => Address::class, ]; diff --git a/scripts/Database.php b/scripts/Database.php index f816b43..d1c4c10 100644 --- a/scripts/Database.php +++ b/scripts/Database.php @@ -54,7 +54,7 @@ public static function import($event): void $self->query($postalSql); } - $stmt = $self->query(<<query(<<<'SQL' SELECT w.kode, w.nama, p.kodepos, diff --git a/src/Console/SyncCommand.php b/src/Console/SyncCommand.php index 7883f47..e00a895 100644 --- a/src/Console/SyncCommand.php +++ b/src/Console/SyncCommand.php @@ -6,12 +6,8 @@ use Creasi\Nusa\Models\District; use Creasi\Nusa\Models\Province; -use Creasi\Nusa\Models\Regency; use Creasi\Nusa\Models\Village; -use Creasi\Nusa\Normalizer; use Illuminate\Console\Command; -use Illuminate\Support\Collection; -use PDO; class SyncCommand extends Command { diff --git a/tests/Models/DistrictTest.php b/tests/Models/DistrictTest.php index d6b82d8..8227048 100644 --- a/tests/Models/DistrictTest.php +++ b/tests/Models/DistrictTest.php @@ -5,10 +5,10 @@ namespace Creasi\Tests\Models; use Creasi\Nusa\Contracts\District as DistrictContract; -use Creasi\Nusa\Models\District; use Creasi\Nusa\Contracts\Province; use Creasi\Nusa\Contracts\Regency; use Creasi\Nusa\Contracts\Village; +use Creasi\Nusa\Models\District; use Creasi\Tests\TestCase; use Illuminate\Support\Collection; use PHPUnit\Framework\Attributes\Depends; @@ -21,7 +21,7 @@ class DistrictTest extends TestCase { /** - * @param Collection $districts + * @param Collection $districts * @return Collection */ #[Test] @@ -38,7 +38,7 @@ public function it_should_has_many_districts(Collection $districts) } /** - * @param Collection $districts + * @param Collection $districts */ #[Test] #[Depends('it_should_has_many_districts')] @@ -50,7 +50,7 @@ public function it_should_belongs_to_province(Collection $districts) } /** - * @param Collection $districts + * @param Collection $districts */ #[Test] #[Depends('it_should_has_many_districts')] @@ -62,7 +62,7 @@ public function it_should_belongs_to_regency(Collection $regencies) } /** - * @param Collection $districts + * @param Collection $districts */ #[Test] #[Depends('it_should_has_many_districts')] diff --git a/tests/Models/ProvinceTest.php b/tests/Models/ProvinceTest.php index 9c00045..4cca7b9 100644 --- a/tests/Models/ProvinceTest.php +++ b/tests/Models/ProvinceTest.php @@ -6,15 +6,13 @@ use Creasi\Nusa\Contracts\District; use Creasi\Nusa\Contracts\Province as ProvinceContract; -use Creasi\Nusa\Models\Province; use Creasi\Nusa\Contracts\Regency; use Creasi\Nusa\Contracts\Village; -use Creasi\Tests\NusaTest; +use Creasi\Nusa\Models\Province; use Creasi\Tests\TestCase; use Illuminate\Support\Collection; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\Depends; -use PHPUnit\Framework\Attributes\DependsExternal; use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\Attributes\Test; @@ -71,7 +69,7 @@ public function it_should_be_true() } /** - * @param Collection $provinces + * @param Collection $provinces */ #[Test] #[Depends('it_should_be_true')] @@ -89,7 +87,7 @@ public function it_should_has_many_regencies(Collection $provinces) } /** - * @param Collection $provinces + * @param Collection $provinces */ #[Test] #[Depends('it_should_be_true')] @@ -107,7 +105,7 @@ public function it_should_has_many_districts(Collection $provinces) } /** - * @param Collection $provinces + * @param Collection $provinces */ #[Test] #[Depends('it_should_be_true')] diff --git a/tests/Models/RegencyTest.php b/tests/Models/RegencyTest.php index 52ffd68..dd9d526 100644 --- a/tests/Models/RegencyTest.php +++ b/tests/Models/RegencyTest.php @@ -7,8 +7,8 @@ use Creasi\Nusa\Contracts\District; use Creasi\Nusa\Contracts\Province; use Creasi\Nusa\Contracts\Regency as RegencyContract; -use Creasi\Nusa\Models\Regency; use Creasi\Nusa\Contracts\Village; +use Creasi\Nusa\Models\Regency; use Creasi\Tests\TestCase; use Illuminate\Support\Collection; use PHPUnit\Framework\Attributes\DataProvider; @@ -39,7 +39,7 @@ public function it_should_be_able_to_search(string|int $keyword) } /** - * @param Collection $regencies + * @param Collection $regencies * @return Collection */ #[Test] @@ -59,7 +59,7 @@ public function it_should_has_many_regencies(Collection $regencies) } /** - * @param Collection $regencies + * @param Collection $regencies */ #[Test] #[Depends('it_should_has_many_regencies')] @@ -71,7 +71,7 @@ public function it_should_belongs_to_province(Collection $regencies) } /** - * @param Collection $regencies + * @param Collection $regencies */ #[Test] #[Depends('it_should_has_many_regencies')] @@ -83,7 +83,7 @@ public function it_should_has_many_districts(Collection $regencies) } /** - * @param Collection $regencies + * @param Collection $regencies */ #[Test] #[Depends('it_should_has_many_regencies')] diff --git a/tests/Models/VillageTest.php b/tests/Models/VillageTest.php index b51579e..cf025e0 100644 --- a/tests/Models/VillageTest.php +++ b/tests/Models/VillageTest.php @@ -21,7 +21,7 @@ class VillageTest extends TestCase { /** - * @param Collection $villages + * @param Collection $villages * @return Collection */ #[Test] @@ -39,7 +39,7 @@ public function it_should_has_many_villages(Collection $villages) } /** - * @param Collection $villages + * @param Collection $villages */ #[Test] #[Depends('it_should_has_many_villages')] @@ -51,7 +51,7 @@ public function it_should_belongs_to_province(Collection $villages) } /** - * @param Collection $villages + * @param Collection $villages */ #[Test] #[Depends('it_should_has_many_villages')] @@ -63,7 +63,7 @@ public function it_should_belongs_to_regency(Collection $villages) } /** - * @param Collection $villages + * @param Collection $villages */ #[Test] #[Depends('it_should_has_many_villages')] diff --git a/tests/NusaTest.php b/tests/NusaTest.php index c6da109..5ebc6d2 100644 --- a/tests/NusaTest.php +++ b/tests/NusaTest.php @@ -18,7 +18,7 @@ class NusaTest extends TestCase use WithFaker; /** - * @param Collection $villages + * @param Collection $villages * @return Collection */ #[Test]