phpstan 5 errors fixed
This commit is contained in:
@@ -14,6 +14,21 @@ use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $username
|
||||
* @property string $name
|
||||
* @property string $email
|
||||
* @property string $phone
|
||||
* @property null|\Illuminate\Support\Carbon $email_verified_at
|
||||
* @property null|\Illuminate\Support\Carbon $phone_verified_at
|
||||
* @property string $password
|
||||
* @property string $locale
|
||||
* @property bool $active
|
||||
* @property string $remember_token
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens;
|
||||
@@ -153,7 +168,7 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function ownsLoanOrder(LoanOrder $loanOrder): bool
|
||||
{
|
||||
return $this->id === $loanOrder->user_id;
|
||||
return $this->id === intval($loanOrder->user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,7 +176,7 @@ class User extends Authenticatable
|
||||
*/
|
||||
public function ownsCardOrder(CardOrder $cardOrder): bool
|
||||
{
|
||||
return $this->id === $cardOrder->user_id;
|
||||
return $this->id === intval($cardOrder->user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user