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

Setting::getTranslationModelNameDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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