Skip to content

Commit

Permalink
chore: fix code styles
Browse files Browse the repository at this point in the history
Signed-off-by: Fery Wardiyanto <[email protected]>
  • Loading branch information
feryardiant committed Jul 14, 2023
1 parent 31ba02f commit 80fd316
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion config/nusa.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
'villages' => 'villages',
],

'addressable' => Address::class
'addressable' => Address::class,
];
2 changes: 1 addition & 1 deletion scripts/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function import($event): void
$self->query($postalSql);
}

$stmt = $self->query(<<<SQL
$stmt = $self->query(<<<'SQL'
SELECT
w.kode, w.nama,
p.kodepos,
Expand Down
4 changes: 0 additions & 4 deletions src/Console/SyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Models/DistrictTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,7 +21,7 @@
class DistrictTest extends TestCase
{
/**
* @param Collection<int, District> $districts
* @param Collection<int, District> $districts
* @return Collection<int, District>
*/
#[Test]
Expand All @@ -38,7 +38,7 @@ public function it_should_has_many_districts(Collection $districts)
}

/**
* @param Collection<int, District> $districts
* @param Collection<int, District> $districts
*/
#[Test]
#[Depends('it_should_has_many_districts')]
Expand All @@ -50,7 +50,7 @@ public function it_should_belongs_to_province(Collection $districts)
}

/**
* @param Collection<int, District> $districts
* @param Collection<int, District> $districts
*/
#[Test]
#[Depends('it_should_has_many_districts')]
Expand All @@ -62,7 +62,7 @@ public function it_should_belongs_to_regency(Collection $regencies)
}

/**
* @param Collection<int, District> $districts
* @param Collection<int, District> $districts
*/
#[Test]
#[Depends('it_should_has_many_districts')]
Expand Down
10 changes: 4 additions & 6 deletions tests/Models/ProvinceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -71,7 +69,7 @@ public function it_should_be_true()
}

/**
* @param Collection<int, Province> $provinces
* @param Collection<int, Province> $provinces
*/
#[Test]
#[Depends('it_should_be_true')]
Expand All @@ -89,7 +87,7 @@ public function it_should_has_many_regencies(Collection $provinces)
}

/**
* @param Collection<int, Province> $provinces
* @param Collection<int, Province> $provinces
*/
#[Test]
#[Depends('it_should_be_true')]
Expand All @@ -107,7 +105,7 @@ public function it_should_has_many_districts(Collection $provinces)
}

/**
* @param Collection<int, Province> $provinces
* @param Collection<int, Province> $provinces
*/
#[Test]
#[Depends('it_should_be_true')]
Expand Down
10 changes: 5 additions & 5 deletions tests/Models/RegencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -39,7 +39,7 @@ public function it_should_be_able_to_search(string|int $keyword)
}

/**
* @param Collection<int, Regency> $regencies
* @param Collection<int, Regency> $regencies
* @return Collection<int, Regency>
*/
#[Test]
Expand All @@ -59,7 +59,7 @@ public function it_should_has_many_regencies(Collection $regencies)
}

/**
* @param Collection<int, Regency> $regencies
* @param Collection<int, Regency> $regencies
*/
#[Test]
#[Depends('it_should_has_many_regencies')]
Expand All @@ -71,7 +71,7 @@ public function it_should_belongs_to_province(Collection $regencies)
}

/**
* @param Collection<int, Regency> $regencies
* @param Collection<int, Regency> $regencies
*/
#[Test]
#[Depends('it_should_has_many_regencies')]
Expand All @@ -83,7 +83,7 @@ public function it_should_has_many_districts(Collection $regencies)
}

/**
* @param Collection<int, Regency> $regencies
* @param Collection<int, Regency> $regencies
*/
#[Test]
#[Depends('it_should_has_many_regencies')]
Expand Down
8 changes: 4 additions & 4 deletions tests/Models/VillageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class VillageTest extends TestCase
{
/**
* @param Collection<int, Village> $villages
* @param Collection<int, Village> $villages
* @return Collection<int, Village>
*/
#[Test]
Expand All @@ -39,7 +39,7 @@ public function it_should_has_many_villages(Collection $villages)
}

/**
* @param Collection<int, Village> $villages
* @param Collection<int, Village> $villages
*/
#[Test]
#[Depends('it_should_has_many_villages')]
Expand All @@ -51,7 +51,7 @@ public function it_should_belongs_to_province(Collection $villages)
}

/**
* @param Collection<int, Village> $villages
* @param Collection<int, Village> $villages
*/
#[Test]
#[Depends('it_should_has_many_villages')]
Expand All @@ -63,7 +63,7 @@ public function it_should_belongs_to_regency(Collection $villages)
}

/**
* @param Collection<int, Village> $villages
* @param Collection<int, Village> $villages
*/
#[Test]
#[Depends('it_should_has_many_villages')]
Expand Down
2 changes: 1 addition & 1 deletion tests/NusaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class NusaTest extends TestCase
use WithFaker;

/**
* @param Collection<int, Village> $villages
* @param Collection<int, Village> $villages
* @return Collection<int, Village>
*/
#[Test]
Expand Down

0 comments on commit 80fd316

Please sign in to comment.