Payment   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A payable() 0 4 1
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