DatabaseConfig::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Koomai\LaravelConfig;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class DatabaseConfig extends Model
8
{
9
    /** @var string */
10
    protected $primaryKey = 'name';
11
    /** @var bool */
12
    public $incrementing = false;
13
    /** @var array */
14
    protected $guarded = [];
15
    /** @var array */
16
    protected $casts = [
17
        'value' => 'array',
18
    ];
19
20 7
    public function __construct($attributes = [])
21
    {
22 7
        parent::__construct($attributes);
23
24 7
        $this->table = config('database-config.table');
25 7
    }
26
}
27