HasModel::setModel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
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