FamilyEvent::family()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace FamilyTree365\LaravelGedcom\Models;
4
5
use FamilyTree365\LaravelGedcom\Observers\EventActionsObserver;
6
use Illuminate\Database\Eloquent\SoftDeletes;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Eloquent\SoftDeletes 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...
7
8
class FamilyEvent extends Event
9
{
10
    use SoftDeletes;
11
12
    /**
13
     * The attributes that should be mutated to dates.
14
     *
15
     * @var array
16
     */
17
    protected $dates = ['deleted_at'];
18
19
    protected $table = 'family_events';
20
21
    protected $fillable = [
22
        'family_id',
23
        'places_id',
24
        'date',
25
        'created_date',
26
        'title',
27
        'description',
28
        'year',
29
        'month',
30
        'day',
31
        'type',
32
        'plac',
33
        'phon',
34
        'caus',
35
        'age',
36
        'husb',
37
        'wife',
38
    ];
39
40
    public static function boot()
41
    {
42
        parent::boot();
43
44
        self::observe(new EventActionsObserver());
45
    }
46
47
    public function family()
48
    {
49
        return $this->hasOne(Family::class, 'id', 'family_id');
50
    }
51
}
52