| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class Setting extends Model |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $fillable = [ |
||
| 15 | 'model_type', |
||
| 16 | 'model_id', |
||
| 17 | 'key', |
||
| 18 | 'cast', |
||
| 19 | 'value', |
||
| 20 | ]; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $casts = [ |
||
| 26 | 'key' => 'string', |
||
| 27 | 'cast' => 'string', |
||
| 28 | 'value' => 'custom', |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return \Illuminate\Config\Repository|mixed|string |
||
| 33 | */ |
||
| 34 | 4 | public function getTable() |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return MorphTo |
||
| 45 | */ |
||
| 46 | 4 | public function model(): MorphTo |
|
| 47 | { |
||
| 48 | 4 | return $this->morphTo(); |
|
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $key |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | 4 | protected function getCastType($key): string |
|
| 62 | } |
||
| 63 | |||
| 65 |