Skip to content

Commit 4fa82d3

Browse files
committed
docs: update PHPDoc for tenant() and domains() methods to include full model type hints
1 parent d19947f commit 4fa82d3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Database/Concerns/BelongsToTenant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ trait BelongsToTenant
1818
use FillsCurrentTenant;
1919

2020
/**
21-
* @return BelongsTo<\Stancl\Tenancy\Contracts\Tenant, $this>
21+
* @return BelongsTo<\Illuminate\Database\Eloquent\Model&\Stancl\Tenancy\Contracts\Tenant, $this>
2222
*/
2323
public function tenant(): BelongsTo
2424
{

src/Database/Concerns/HasDomains.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Stancl\Tenancy\Database\Concerns;
66

7+
use Illuminate\Database\Eloquent\Relations\HasMany;
78
use Stancl\Tenancy\Contracts\Domain;
89
use Stancl\Tenancy\Tenancy;
910

@@ -15,9 +16,9 @@
1516
trait HasDomains
1617
{
1718
/**
18-
* @return \Illuminate\Database\Eloquent\Relations\HasMany<Domain, $this>
19+
* @return HasMany<\Illuminate\Database\Eloquent\Model&\Stancl\Tenancy\Contracts\Domain, $this>
1920
*/
20-
public function domains()
21+
public function domains(): HasMany
2122
{
2223
return $this->hasMany(config('tenancy.models.domain'), Tenancy::tenantKeyColumn());
2324
}

src/ResourceSyncing/ResourceSyncing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function shouldSync(): bool
106106
}
107107

108108
/**
109-
* @return BelongsToMany<\Stancl\Tenancy\Database\Contracts\TenantWithDatabase, $this>
109+
* @return BelongsToMany<\Illuminate\Database\Eloquent\Model&\Stancl\Tenancy\Database\Contracts\TenantWithDatabase, $this>
110110
*/
111111
public function tenants(): BelongsToMany
112112
{

0 commit comments

Comments
 (0)