Passed
Push — develop ( dce829...c223e6 )
by ReliQ
03:41
created

Trackable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A trackingUpdates() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Logistiq\Utility\Eloquent;
6
7
use Illuminate\Database\Eloquent\Relations\HasMany;
8
use Illuminate\Support\Collection;
9
10
/**
11
 * @property Collection $trackingUpdates
12
 */
13
class Trackable extends Model
14
{
15
    /**
16
     * @return HasMany
17
     */
18
    public function trackingUpdates(): HasMany
19
    {
20
        return $this->hasMany(
21
            TrackingUpdate::class,
22
            TrackingUpdate::COLUMN_TRACKABLE_IDENTIFIER
23
        )->where(TrackingUpdate::COLUMN_TRACKABLE_TYPE, static::class);
24
    }
25
}
26