mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
misc improvements - stronger types, exception refactor
This commit is contained in:
parent
ddc7cf49c3
commit
55d0a9ab87
34 changed files with 179 additions and 209 deletions
|
|
@ -157,23 +157,25 @@ class AnotherTenant extends Model implements Contracts\Tenant
|
|||
return 'id';
|
||||
}
|
||||
|
||||
public function getTenantKey()
|
||||
public function getTenantKey(): int|string
|
||||
{
|
||||
return $this->getAttribute('id');
|
||||
}
|
||||
|
||||
public function run(callable $callback)
|
||||
public function run(Closure $callback): mixed
|
||||
{
|
||||
$callback();
|
||||
}
|
||||
|
||||
public function getInternal(string $key)
|
||||
public function getInternal(string $key): mixed
|
||||
{
|
||||
return $this->$key;
|
||||
}
|
||||
|
||||
public function setInternal(string $key, $value)
|
||||
public function setInternal(string $key, mixed $value): static
|
||||
{
|
||||
$this->$key = $value;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue