Passed
Push — master ( f5e7b6...f2853f )
by Curtis
14:08 queued 09:01
created

Family   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A person() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
use LaravelEnso\Tables\App\Traits\TableCache;
7
use LaravelEnso\People\App\Models\Person;
8
9
class Family extends Model
10
{
11
	use TableCache;
12
 protected $fillable = ['description', 'is_active', 'father_id', 'mother_id', 'type_id'];
13
14
    protected $attributes = ['is_active' => false];
15
16
    protected $casts = ['is_active' => 'boolean'];
17
18
    public function person()
19
    {
20
        return $this->belongsToMany(Person::class);
21
22
    }
23
}
24