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

TrackingUpdate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getTable() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\Logistiq\Utility\Eloquent;
6
7
use ReliqArts\Logistiq\Utility\Contracts\ConfigProvider;
8
9
class TrackingUpdate extends Model
10
{
11
    public const TABLE_KEY = 'tracking_updates';
12
    public const COLUMN_TRACKABLE_IDENTIFIER = 'trackable_identifier';
13
    public const COLUMN_TRACKABLE_TYPE = 'trackable_type';
14
    public const COLUMN_STATUS_IDENTIFIER = 'status_identifier';
15
16
    protected $guarded = [];
17
18
    /**
19
     * @return string
20
     */
21
    public function getTable()
22
    {
23
        return with(resolve(ConfigProvider::class))
24
            ->getTableNameByKey(self::TABLE_KEY);
25
    }
26
}
27