Payment::payable()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SanderVanHooft\PayableRedirect;
4
5
use Illuminate\Database\Eloquent\Model;
6
use SanderVanHooft\PayableRedirect\PaymentGateway;
7
use SanderVanHooft\PayableRedirect\Events\PaymentOpened;
8
use SanderVanHooft\PayableRedirect\Events\PaymentUpdated;
9
10
/**
11
 * @property string $status
12
 */
13
class Payment extends Model
14
{
15
    protected $guarded = [];
16
17
    /**
18
     * The event map for the model.
19
     *
20
     * @var array
21
     */
22
    protected $events = [
23
        'updated' => PaymentUpdated::class,
24
        'created' => PaymentOpened::class,
25
    ];
26
27
    /**
28
     * Get all of the owning payable models.
29
     */
30
    public function payable()
31
    {
32
        return $this->morphTo();
33
    }
34
}
35