1 | <?php |
||
21 | class Resource implements IResource |
||
22 | { |
||
23 | /** |
||
24 | * Implement nette smart magic |
||
25 | */ |
||
26 | 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) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getParent() |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function setChildren(array $resources) |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function addChild(IResource $resource) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function getChildren() |
||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getResourceId() : string |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function setName(string $name) |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | public function getName() |
||
131 | |||
132 | /** |
||
133 | * {@inheritdoc} |
||
134 | */ |
||
135 | public function setComment(string $comment) |
||
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | public function getComment() |
||
147 | |||
148 | /** |
||
149 | * Convert resource object to string |
||
150 | * |
||
151 | * @return string |
||
152 | */ |
||
153 | public function __toString() |
||
157 | } |
||
158 |
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..