Passed
Push — master ( 7c751b...4c7ed3 )
by Curtis
05:20 queued 11s
created

PersonEvent::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\SoftDeletes;
6
<<<<<<< HEAD
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_SL on line 6 at column 0
Loading history...
7
use LaravelEnso\Tables\Traits\TableCache;
8
use ModularSoftware\LaravelGedcom\Observers\EventActionsObserver;
9
=======
10
use ModularSoftware\LaravelGedcom\Observers\EventActionsObserver;
11
use LaravelEnso\Tables\Traits\TableCache;
12
>>>>>>> parent of a7f00d69... Revert "Merge remote-tracking branch 'origin/master' into jyyblue"
13
14
class PersonEvent extends Event
15
{
16
    use TableCache;
17
    use SoftDeletes;
18
19
    protected $dates = ['deleted_at'];
20
21
    protected $table = 'person_events';
22
23
    protected $fillable = [
24
        'person_id',
25
        'title',
26
        'type',
27
        'attr',
28
        'date',
29
        'plac',
30
        'phon',
31
        'caus',
32
        'age',
33
        'agnc',
34
        'places_id',
35
        'description',
36
        'year',
37
        'month',
38
        'day',
39
    ];
40
41
    protected $gedcom_event_names = [
42
        'BIRT' => 'Birth',
43
        'DEAT' => 'Death',
44
    ];
45
46
    public static function boot()
47
    {
48
        parent::boot();
49
50
        self::observe(new EventActionsObserver);
51
    }
52
53
    public function person()
54
    {
55
        return $this->hasOne(Person::class, 'id', 'person_id');
56
    }
57
}
58