1 | <?php |
||
45 | class Zone |
||
46 | { |
||
47 | use RecordsIterateTrait; |
||
48 | |||
49 | /** |
||
50 | * @var String |
||
51 | */ |
||
52 | private $origin; |
||
53 | /** |
||
54 | * @var Node[] $nodes |
||
55 | */ |
||
56 | private $nodes = []; |
||
57 | /** |
||
58 | * @var ErrorsStore |
||
59 | */ |
||
60 | private $errorsStore; |
||
61 | |||
62 | /** |
||
63 | * @param $origin |
||
64 | */ |
||
65 | 1 | public function __construct(string $origin) |
|
70 | |||
71 | /** |
||
72 | * @param string $origin |
||
73 | * @param string $plainData |
||
74 | * @return Zone |
||
75 | */ |
||
76 | 1 | public static function fromString(string $origin, string $plainData) : Zone |
|
80 | |||
81 | /** |
||
82 | * @param string $origin |
||
83 | * @param array $arrayData |
||
84 | * @return Zone |
||
85 | */ |
||
86 | public static function fromArray(string $origin, array $arrayData) : Zone |
||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 1 | public function __toString() : string |
|
104 | |||
105 | /** |
||
106 | * Sort zone by node names and record types |
||
107 | */ |
||
108 | 1 | public function sort() |
|
127 | |||
128 | /** |
||
129 | * @return Node[] |
||
130 | */ |
||
131 | 1 | public function iterateNodes() |
|
137 | |||
138 | /** |
||
139 | * @param eRecordType|null $type |
||
140 | * @return Record[] |
||
141 | */ |
||
142 | 1 | public function iterateRecords(eRecordType $type = NULL) |
|
150 | |||
151 | /** |
||
152 | * @return array |
||
153 | */ |
||
154 | 1 | public function toArray() : array |
|
163 | |||
164 | /** |
||
165 | * @return array |
||
166 | */ |
||
167 | public function getNodeNames() : array |
||
171 | |||
172 | /** |
||
173 | * @param $name |
||
174 | * @return Node |
||
175 | */ |
||
176 | 1 | public function getNode(string $name) : Node |
|
186 | |||
187 | /** |
||
188 | * Check is node by given name already exists |
||
189 | * |
||
190 | * @param $name |
||
191 | * @return bool |
||
192 | */ |
||
193 | 1 | public function isNodeExist($name) : bool |
|
197 | |||
198 | /** |
||
199 | * Full validate zone via build in validators |
||
200 | * |
||
201 | * @return bool |
||
202 | */ |
||
203 | 1 | public function validate() : bool |
|
223 | |||
224 | /** |
||
225 | * @return ErrorsStore |
||
226 | */ |
||
227 | 1 | public function getErrorsStore() |
|
231 | |||
232 | /** |
||
233 | * @return String |
||
234 | */ |
||
235 | 1 | public function getOrigin() : string |
|
239 | } |
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..