Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | trait HasManagerTrait |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var RecordManager |
||
20 | */ |
||
21 | protected $manager = null; |
||
22 | |||
23 | /** |
||
24 | * @return RecordManager|\Nip\Records\RecordManager |
||
25 | */ |
||
26 | 8 | public function getManager() |
|
27 | { |
||
28 | 8 | if ($this->manager == null) { |
|
29 | 2 | $this->initManager(); |
|
30 | } |
||
31 | |||
32 | 8 | return $this->manager; |
|
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param HasRelationsRecordsTrait $manager |
||
37 | */ |
||
38 | 18 | public function setManager($manager) |
|
39 | { |
||
40 | 18 | $this->manager = $manager; |
|
|
|||
41 | 18 | } |
|
42 | |||
43 | /** |
||
44 | * @return void |
||
45 | */ |
||
46 | 2 | public function initManager() |
|
49 | 2 | } |
|
50 | |||
51 | /** |
||
52 | * @return bool |
||
53 | */ |
||
54 | 7 | public function hasManager() |
|
57 | } |
||
58 | } |
||
59 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..