Passed
Push — master ( 6758f1...14e78e )
by Curtis
05:20
created

PersonEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 19
c 1
b 0
f 0
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A person() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Asdfx\LaravelGedcom\Observers\EventActionsObserver;
0 ignored issues
show
Bug introduced by
The type Asdfx\LaravelGedcom\Observers\EventActionsObserver was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class PersonEvent extends Event
9
{
10
    use SoftDeletes;
11
12
    protected $dates = ['deleted_at'];
13
14
    protected $table = 'person_events';
15
16
    protected $fillable = [
17
        'person_id',
18
        'places_id',
19
        'date',
20
        'title',
21
        'description',
22
        'year',
23
        'month',
24
        'day'
25
    ];
26
27
    protected $gedcom_event_names = [
28
        'BIRT' => "Birth",
29
        'DEAT' => "Death",
30
    ];
31
32
    public static function boot()
33
    {
34
        parent::boot();
35
36
        PersonEvent::observe(new EventActionsObserver);
37
    }
38
39
    public function person()
40
    {
41
        return $this->hasOne(Person::class, 'id', 'person_id');
42
    }
43
}
44