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

TrackingUpdate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Logistiq\Tracking\Models;
6
7
use ReliqArts\Logistiq\Tracking\Contracts\TrackingUpdate as TrackingUpdateContract;
8
use ReliqArts\Logistiq\Utility\Eloquent\TrackingUpdate as EloquentTrackingUpdate;
9
10
final class TrackingUpdate extends EloquentTrackingUpdate implements TrackingUpdateContract
11
{
12
    /**
13
     * @param string $trackableIdentifier
14
     * @param string $trackableType
15
     * @param string $statusIdentifier
16
     *
17
     * @return mixed
18
     */
19
    public function log(
20
        string $trackableIdentifier,
21
        string $trackableType,
22
        string $statusIdentifier
23
    ) {
24
        return parent::create([
25
            static::COLUMN_TRACKABLE_IDENTIFIER => $trackableIdentifier,
26
            static::COLUMN_TRACKABLE_TYPE => $trackableType,
27
            static::COLUMN_STATUS_IDENTIFIER => $statusIdentifier,
28
        ]);
29
    }
30
}
31