Property   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 45
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A owner() 0 3 1
A casts() 0 4 1
1
<?php
2
3
namespace Siak\Tontine\Model;
4
5
class Property extends Base
6
{
7
    /**
8
     * Indicates if the model should be timestamped.
9
     *
10
     * @var bool
11
     */
12
    public $timestamps = false;
13
14
    /**
15
     * The attributes that are mass assignable.
16
     *
17
     * @var array
18
     */
19
    protected $fillable = [
20
        'content',
21
    ];
22
23
    /**
24
     * The model's default values for attributes.
25
     *
26
     * @var array
27
     */
28
    protected $attributes = [
29
        'content' => '{}',
30
    ];
31
32
    /**
33
     * Get the attributes that should be cast.
34
     *
35
     * @return array<string, string>
36
     */
37
    protected function casts(): array
38
    {
39
        return [
40
            'content' => 'array',
41
        ];
42
    }
43
44
    /**
45
     * Get the parent owner model.
46
     */
47
    public function owner()
48
    {
49
        return $this->morphTo();
50
    }
51
}
52