CaseAccessor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCase() 0 5 1
A getCase() 0 3 1
1
<?php
2
3
namespace App\Entity\Attribute\Accessor;
4
5
use App\Entity\CaseEntity;
6
7
/**
8
 * Trait CaseAccessor
9
 */
10
trait CaseAccessor
11
{
12
    /**
13
     * Set scenario
14
     *
15
     * @param \App\Entity\CaseEntity $case
16
     * @return object
17
     */
18
    public function setCase(CaseEntity $case = null)
19
    {
20
        $this->case = $case;
0 ignored issues
show
Bug Best Practice introduced by
The property case does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
21
22
        return $this;
23
    }
24
25
    /**
26
     * Get case
27
     *
28
     * @return \App\Entity\CaseEntity
29
     */
30
    public function getCase()
31
    {
32
        return $this->case;
33
    }
34
}
35