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

TrackingUpdate::getTable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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