TrackingUpdate::log()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
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