Skip to content

Commit

Permalink
Merge pull request #858 from gkmk/patch-1
Browse files Browse the repository at this point in the history
Update Transfer Model
  • Loading branch information
rez1dent3 authored Jan 23, 2024
2 parents 5f30995 + c4cad87 commit db0014f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Models/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,30 @@ public function getTable(): string
*/
public function from(): BelongsTo

Check warning on line 82 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
{
return $this->belongsTo(Wallet::class, 'from_id');
return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'from_id');

Check failure on line 84 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $related of method Illuminate\Database\Eloquent\Model::belongsTo() expects string, mixed given.

Check warning on line 84 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined function

Undefined function 'config'

Check warning on line 84 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined method

Method 'belongsTo' is undefined
}

/**
* @return BelongsTo<Wallet, self>

Check warning on line 88 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
*/
public function to(): BelongsTo

Check warning on line 90 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
{
return $this->belongsTo(Wallet::class, 'to_id');
return $this->belongsTo(config('wallet.wallet.model', Wallet::class), 'to_id');

Check failure on line 92 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $related of method Illuminate\Database\Eloquent\Model::belongsTo() expects string, mixed given.

Check warning on line 92 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined function

Undefined function 'config'

Check warning on line 92 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined method

Method 'belongsTo' is undefined
}

/**
* @return BelongsTo<Transaction, self>

Check warning on line 96 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
*/
public function deposit(): BelongsTo

Check warning on line 98 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
{
return $this->belongsTo(Transaction::class, 'deposit_id');
return $this->belongsTo(config('wallet.transaction.model', Transaction::class), 'deposit_id');

Check failure on line 100 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $related of method Illuminate\Database\Eloquent\Model::belongsTo() expects string, mixed given.

Check warning on line 100 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined function

Undefined function 'config'

Check warning on line 100 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined method

Method 'belongsTo' is undefined
}

/**
* @return BelongsTo<Transaction, self>

Check warning on line 104 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
*/
public function withdraw(): BelongsTo

Check warning on line 106 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined class

Undefined class 'BelongsTo'
{
return $this->belongsTo(Transaction::class, 'withdraw_id');
return $this->belongsTo(config('wallet.transaction.model', Transaction::class), 'withdraw_id');

Check failure on line 108 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $related of method Illuminate\Database\Eloquent\Model::belongsTo() expects string, mixed given.

Check warning on line 108 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined function

Undefined function 'config'

Check warning on line 108 in src/Models/Transfer.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Undefined method

Method 'belongsTo' is undefined
}
}

0 comments on commit db0014f

Please sign in to comment.