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

@@ -5,6 +5,14 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $currency_from
* @property string $currency_to
* @property string $value
* @property \Illuminate\Support\Carbon $created_at
* @property \Illuminate\Support\Carbon $updated_at
*/
class CurrencyRate extends Model
{
use HasFactory;

View File

@@ -12,6 +12,78 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Laravel\Nova\Actions\Actionable;
/**
* @property int $id
* @property string $unique_id
* @property int $loan_type
* @property string $region
* @property int $branch_id
* @property string $customer_name
* @property string $customer_surname
* @property string $customer_patronic_name
* @property string $passport_address
* @property string $real_address
* @property string $passport_serie
* @property string $passport_id
* @property string $passport_given_at
* @property string $passport_given_by
* @property string $born_place
* @property string $born_at
* @property string $email
* @property string $phone
* @property string $phone_additional
* @property string $phone_home
* @property string $work_region
* @property int $work_province_id
* @property string $work_company
* @property string $work_company_accountant_number
* @property string $work_started_at
* @property string $work_salary
* @property string $work_position
* @property string $education
* @property string $marriage_status
* @property string $passport_one
* @property string $passport_two
* @property string $passport_three
* @property string $passport_four
* @property string $user_id
* @property string $status
* @property string $notes
* @property string $created_at
* @property string $updated_at
* @property string $deleted_at
* @property string $loan_amount
* @property string $card_number
* @property string $card_name
* @property string $card_month
* @property string $card_year
* @property string $guarantor_name
* @property string $guarantor_surname
* @property string $guarantor_patronic_name
* @property string $guarantor_card_number
* @property string $guarantor_card_name
* @property string $guarantor_card_month
* @property string $guarantor_card_year
* @property string $guarantor_2_name
* @property string $guarantor_2_surname
* @property string $guarantor_2_patronic_name
* @property string $guarantor_2_card_number
* @property string $guarantor_2_card_name
* @property string $guarantor_2_card_month
* @property string $guarantor_2_card_year
* @property string $source
* @property string $guarantor_note
* @property string $guarantor_2_note
* @property string $satisfiable
* @property string $guarantor_passport_serie
* @property string $guarantor_passport_id
* @property string $guarantor_2_passport_serie
* @property string $guarantor_2_passport_id
* @property string $loan_card_number
* @property string $loan_card_name
* @property string $loan_card_month
* @property string $loan_card_yea
*/
class LoanOrder extends Model
{
use Actionable;

View File

@@ -15,11 +15,4 @@ class OnlinePaymentHistory extends Model
* @var string
*/
protected $table = 'online_payment_histories';
/**
* Guarded attributes
*
* @var array
*/
protected $guarded = [];
}

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