| Total Complexity | 6 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Transfer extends Model |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $fillable = [ |
||
| 16 | 'deposit_id', |
||
| 17 | 'withdraw_id', |
||
| 18 | 'from_type', |
||
| 19 | 'from_id', |
||
| 20 | 'to_type', |
||
| 21 | 'to_id', |
||
| 22 | 'refund', |
||
| 23 | 'uuid', |
||
| 24 | ]; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | 13 | public function getTable(): string |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return MorphTo |
||
| 40 | */ |
||
| 41 | 1 | public function from(): MorphTo |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return MorphTo |
||
| 48 | */ |
||
| 49 | 1 | public function to(): MorphTo |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return BelongsTo |
||
| 56 | */ |
||
| 57 | 1 | public function deposit(): BelongsTo |
|
| 58 | { |
||
| 59 | 1 | return $this->belongsTo(Transaction::class, 'deposit_id'); |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return BelongsTo |
||
| 64 | */ |
||
| 65 | 1 | public function withdraw(): BelongsTo |
|
| 68 | } |
||
| 69 | |||
| 71 |