HasModel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 21
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A model() 0 3 1
A setModel() 0 5 1
1
<?php
2
3
namespace NovaFlexibleContent\Layouts\LayoutTraits;
4
5
use Illuminate\Database\Eloquent\Model;
6
use NovaFlexibleContent\Layouts\Layout;
7
8
/**
9
 * I have no Idea where this used, and why we should keep it?
10
 * @deprecated
11
 */
12
trait HasModel
13
{
14
    /**
15
     * The parent model instance
16
     */
17
    protected Model|Layout|null $model = null;
18
19
    /** @deprecated */
20 1
    public function model(): Layout|Model|null
21
    {
22 1
        return $this->model;
23
    }
24
25
    /**
26
     * @deprecated I have no Idea where this used, and why we should keep it?
27
     */
28 16
    public function setModel(Model|Layout|null $model): static
29
    {
30 16
        $this->model = $model;
31
32 16
        return $this;
33
    }
34
}
35