Translation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace LaTevaWeb\Translatable\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Translation extends Model
8
{
9
    protected $casts = [
10
        'content' => 'array',
11
    ];
12
    protected $fillable = ['content', 'field', 'locale'];
13
    protected $guarded = ['id'];
14
    public $timestamps = false;
15
16
    /**
17
     * Override default constructor to set table using config file.
18
     * @param array $attributes [fields]
19
     */
20 9
    public function __construct(array $attributes = [])
21
    {
22 9
        parent::__construct($attributes);
23 9
        $this->setTable(config('latevaweb-translatable.table_names.translations'));
24 9
    }
25
}
26