phpstan 5 errors fixed

This commit is contained in:
2024-11-25 15:34:09 +05:00
parent 2e0cc45e99
commit 0d875acc4e
28 changed files with 463 additions and 248 deletions

View File

@@ -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);
}
/**