Skip to content

Commit

Permalink
phpstan fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilee committed May 14, 2023
1 parent e749a95 commit 0b3b5a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Models/District.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
* @property int $id
* @property string $code
* @property string $name
* @property int $province_id
* @property Province $province
* @property Ward[]|\Illuminate\Database\Eloquent\Collection $wards
* @property \Illuminate\Support\Carbon $updated_at
* @property \Illuminate\Support\Carbon $created_at
*/
class District extends Model
{
Expand All @@ -31,6 +34,7 @@ public function getTable()

public function province()
{
// @phpstan-ignore-next-line
return $this->belongsTo(config('vietnamese-administrative-units.province.model', Province::class))->withTrashed();
}

Expand Down
2 changes: 2 additions & 0 deletions src/Models/Province.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* @property string $code
* @property string $name
* @property District[]|\Illuminate\Database\Eloquent\Collection $districts
* @property \Illuminate\Support\Carbon $updated_at
* @property \Illuminate\Support\Carbon $created_at
*/
class Province extends Model
{
Expand Down
4 changes: 4 additions & 0 deletions src/Models/Ward.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
* @property int $id
* @property string $code
* @property string $name
* @property int $district_id
* @property District $district
* @property \Illuminate\Support\Carbon $updated_at
* @property \Illuminate\Support\Carbon $created_at
*/
class Ward extends Model
{
Expand All @@ -30,6 +33,7 @@ public function getTable()

public function district()
{
// @phpstan-ignore-next-line
return $this->belongsTo(config('vietnamese-administrative-units.district.model', District::class))->withTrashed();
}
}

0 comments on commit 0b3b5a4

Please sign in to comment.