1 | <?php |
||
21 | 1 | class Resource implements IResource |
|
22 | { |
||
23 | /** |
||
24 | * Implement nette smart magic |
||
25 | */ |
||
26 | 1 | use Nette\SmartObject; |
|
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $id; |
||
32 | |||
33 | /** |
||
34 | * @var IResource|NULL |
||
35 | */ |
||
36 | protected $parent; |
||
37 | |||
38 | /** |
||
39 | * @var IResource[] |
||
40 | */ |
||
41 | protected $children; |
||
42 | |||
43 | /** |
||
44 | * @var string|NULL |
||
45 | */ |
||
46 | protected $name; |
||
47 | |||
48 | /** |
||
49 | * @var string|NULL |
||
50 | */ |
||
51 | protected $comment; |
||
52 | |||
53 | public function __construct(string $id) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function setParent(IResource $parent = NULL) : void |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getParent() : ?IResource |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function setChildren(array $resources) : void |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function addChild(IResource $resource) : void |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function getChildren() : array |
||
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | public function getResourceId() : string |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | */ |
||
129 | public function setName(string $name) : void |
||
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | public function getName() : ?string |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function setComment(string $comment) : void |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function getComment() : ?string |
||
157 | |||
158 | /** |
||
159 | * Convert resource object to string |
||
160 | * |
||
161 | * @return string |
||
162 | */ |
||
163 | public function __toString() |
||
167 | } |
||
168 |
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..