Passed
Push — master ( 3a3605...2e332d )
by Quentin
06:36 queued 10s
created

Setting   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 25
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTranslationModelNameDefault() 0 3 1
A getTable() 0 3 1
1
<?php
2
3
namespace A17\Twill\Models;
4
5
use A17\Twill\Models\Behaviors\HasMedias;
6
use A17\Twill\Models\Behaviors\HasTranslation;
7
8
class Setting extends Model
9
{
10
    use HasTranslation, HasMedias;
0 ignored issues
show
introduced by
The trait A17\Twill\Models\Behaviors\HasMedias requires some properties which are not provided by A17\Twill\Models\Setting: $medias, $role, $pivot, $metadatas, $uuid, $height, $lqip_data, $crop_h, $locale, $video, $crop, $crop_w, $width
Loading history...
introduced by
The trait A17\Twill\Models\Behaviors\HasTranslation requires some properties which are not provided by A17\Twill\Models\Setting: $each, $locale, $active
Loading history...
11
12
    public $useTranslationFallback = true;
13
14
    protected $fillable = [
15
        'key',
16
        'section',
17
    ];
18
19
    public $translatedAttributes = [
20
        'value',
21
        'locale',
22
        'active',
23
    ];
24
25
    public function getTranslationModelNameDefault()
26
    {
27
        return "A17\Twill\Models\Translations\SettingTranslation";
28
    }
29
30
    public function getTable()
31
    {
32
        return config('twill.settings_table', 'twill_settings');
33
    }
34
}
35