BaseModel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 16
ccs 4
cts 4
cp 1
rs 10
c 2
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Helldar\Roles\Models;
4
5
use Helldar\Roles\Facades\Config;
6
use Helldar\Roles\Traits\Searchable;
7
use Helldar\Roles\Traits\SetAttribute;
8
use Illuminate\Database\Eloquent\Model;
9
10
/**
11
 * @property int $id
12
 * @property string $slug
13
 * @property string $title
14
 *
15
 * @method static Model|self create(array $values)
16
 */
17
abstract class BaseModel extends Model
18
{
19
    use SetAttribute;
20
    use Searchable;
21
22
    public $timestamps = false;
23
24
    protected $fillable = ['slug', 'title'];
25
26 138
    public function __construct(array $attributes = [])
27
    {
28 138
        $this->setConnection(
29 138
            Config::connection()
30
        );
31
32 138
        parent::__construct($attributes);
33 138
    }
34
}
35