@@ -6,413 +6,413 @@ |
||
| 6 | 6 | |
| 7 | 7 | trait TypePart |
| 8 | 8 | { |
| 9 | - /** @var string */ |
|
| 10 | - private $type; |
|
| 11 | - |
|
| 12 | - /** @var string */ |
|
| 13 | - private $format; |
|
| 14 | - |
|
| 15 | - /** @var string */ |
|
| 16 | - private $collectionFormat; |
|
| 17 | - |
|
| 18 | - /** @var mixed */ |
|
| 19 | - private $default; |
|
| 20 | - |
|
| 21 | - /** @var float */ |
|
| 22 | - private $maximum; |
|
| 23 | - |
|
| 24 | - /** @var bool */ |
|
| 25 | - private $exclusiveMaximum = false; |
|
| 26 | - |
|
| 27 | - /** @var float */ |
|
| 28 | - private $minimum; |
|
| 29 | - |
|
| 30 | - /** @var bool */ |
|
| 31 | - private $exclusiveMinimum = false; |
|
| 32 | - |
|
| 33 | - /** @var int */ |
|
| 34 | - private $maxLength; |
|
| 35 | - |
|
| 36 | - /** @var int */ |
|
| 37 | - private $minLength; |
|
| 38 | - |
|
| 39 | - /** @var string */ |
|
| 40 | - private $pattern; |
|
| 41 | - |
|
| 42 | - /** @var int */ |
|
| 43 | - private $maxItems; |
|
| 44 | - |
|
| 45 | - /** @var int */ |
|
| 46 | - private $minItems; |
|
| 47 | - |
|
| 48 | - /** @var bool */ |
|
| 49 | - private $uniqueItems; |
|
| 50 | - |
|
| 51 | - /** @var mixed */ |
|
| 52 | - private $enum; |
|
| 53 | - |
|
| 54 | - /** @var float */ |
|
| 55 | - private $multipleOf; |
|
| 56 | - |
|
| 57 | - private function parseType(Map $data) |
|
| 58 | - { |
|
| 59 | - $this->type = $data->get('type'); |
|
| 60 | - $this->format = $data->get('format'); |
|
| 61 | - $this->collectionFormat = $data->get('collectionFormat'); |
|
| 62 | - $this->default = $data->get('default'); |
|
| 63 | - $this->maximum = $data->get('maximum'); |
|
| 64 | - $this->exclusiveMaximum = $data->has('exclusiveMaximum') && $data->get('exclusiveMaximum'); |
|
| 65 | - $this->minimum = $data->get('minimum'); |
|
| 66 | - $this->exclusiveMinimum = $data->has('exclusiveMinimum') && $data->get('exclusiveMinimum'); |
|
| 67 | - $this->maxLength = $data->get('maxLength'); |
|
| 68 | - $this->minLength = $data->get('minLength'); |
|
| 69 | - $this->pattern = $data->get('pattern'); |
|
| 70 | - $this->maxItems = $data->get('maxItems'); |
|
| 71 | - $this->minItems = $data->get('minItems'); |
|
| 72 | - $this->uniqueItems = $data->has('uniqueItems') && $data->get('uniqueItems'); |
|
| 73 | - $this->enum = $data->get('enum'); |
|
| 74 | - $this->multipleOf = $data->get('multipleOf'); |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - private function getTypeExportFields() |
|
| 78 | - { |
|
| 79 | - return ['type', 'format', 'collectionFormat', 'default', 'maximum', 'exclusiveMaximum', |
|
| 80 | - 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'maxItems', |
|
| 81 | - 'minItems', 'uniqueItems', 'enum', 'multipleOf', |
|
| 82 | - ]; |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - /** |
|
| 86 | - * @return string |
|
| 87 | - */ |
|
| 88 | - public function getType() |
|
| 89 | - { |
|
| 90 | - return $this->type; |
|
| 91 | - } |
|
| 92 | - |
|
| 93 | - /** |
|
| 94 | - * @param string $type |
|
| 95 | - * |
|
| 96 | - * @return $this |
|
| 97 | - */ |
|
| 98 | - public function setType($type) |
|
| 99 | - { |
|
| 100 | - $this->type = $type; |
|
| 101 | - |
|
| 102 | - return $this; |
|
| 103 | - } |
|
| 104 | - |
|
| 105 | - /** |
|
| 106 | - * @return string |
|
| 107 | - */ |
|
| 108 | - public function getFormat() |
|
| 109 | - { |
|
| 110 | - return $this->format; |
|
| 111 | - } |
|
| 112 | - |
|
| 113 | - /** |
|
| 114 | - * Sets the extending format for the type. |
|
| 115 | - * |
|
| 116 | - * @param string $format |
|
| 117 | - * |
|
| 118 | - * @return $this |
|
| 119 | - */ |
|
| 120 | - public function setFormat($format) |
|
| 121 | - { |
|
| 122 | - $this->format = $format; |
|
| 123 | - |
|
| 124 | - return $this; |
|
| 125 | - } |
|
| 126 | - |
|
| 127 | - /** |
|
| 128 | - * @return string |
|
| 129 | - */ |
|
| 130 | - public function getCollectionFormat() |
|
| 131 | - { |
|
| 132 | - return $this->collectionFormat; |
|
| 133 | - } |
|
| 134 | - |
|
| 135 | - /** |
|
| 136 | - * Determines the format of the array if type array is used. Possible values are:. |
|
| 137 | - * |
|
| 138 | - * - `csv` - comma separated values `foo,bar`. |
|
| 139 | - * - `ssv` - space separated values `foo bar`. |
|
| 140 | - * - `tsv` - tab separated values `foo\tbar`. |
|
| 141 | - * - `pipes` - pipe separated values `foo|bar`. |
|
| 142 | - * - `multi` - corresponds to multiple parameter instances instead of multiple values for a |
|
| 143 | - * single instance `foo=bar&foo=baz`. This is valid only for parameters in "query" or "formData". |
|
| 144 | - * |
|
| 145 | - * Default value is `csv`. |
|
| 146 | - * |
|
| 147 | - * |
|
| 148 | - * @param string $collectionFormat |
|
| 149 | - * |
|
| 150 | - * @return $this |
|
| 151 | - */ |
|
| 152 | - public function setCollectionFormat($collectionFormat) |
|
| 153 | - { |
|
| 154 | - $this->collectionFormat = $collectionFormat; |
|
| 155 | - |
|
| 156 | - return $this; |
|
| 157 | - } |
|
| 158 | - |
|
| 159 | - /** |
|
| 160 | - * @return mixed |
|
| 161 | - */ |
|
| 162 | - public function getDefault() |
|
| 163 | - { |
|
| 164 | - return $this->default; |
|
| 165 | - } |
|
| 166 | - |
|
| 167 | - /** |
|
| 168 | - * @param mixed $default |
|
| 169 | - * |
|
| 170 | - * @return $this |
|
| 171 | - */ |
|
| 172 | - public function setDefault($default) |
|
| 173 | - { |
|
| 174 | - $this->default = $default; |
|
| 175 | - |
|
| 176 | - return $this; |
|
| 177 | - } |
|
| 178 | - |
|
| 179 | - /** |
|
| 180 | - * @return float |
|
| 181 | - */ |
|
| 182 | - public function getMaximum() |
|
| 183 | - { |
|
| 184 | - return $this->maximum; |
|
| 185 | - } |
|
| 186 | - |
|
| 187 | - /** |
|
| 188 | - * @param float $maximum |
|
| 189 | - * |
|
| 190 | - * @return $this |
|
| 191 | - */ |
|
| 192 | - public function setMaximum($maximum) |
|
| 193 | - { |
|
| 194 | - $this->maximum = $maximum; |
|
| 195 | - |
|
| 196 | - return $this; |
|
| 197 | - } |
|
| 198 | - |
|
| 199 | - /** |
|
| 200 | - * @return bool |
|
| 201 | - */ |
|
| 202 | - public function isExclusiveMaximum() |
|
| 203 | - { |
|
| 204 | - return $this->exclusiveMaximum; |
|
| 205 | - } |
|
| 206 | - |
|
| 207 | - /** |
|
| 208 | - * @param bool $exclusiveMaximum |
|
| 209 | - * |
|
| 210 | - * @return $this |
|
| 211 | - */ |
|
| 212 | - public function setExclusiveMaximum($exclusiveMaximum) |
|
| 213 | - { |
|
| 214 | - $this->exclusiveMaximum = $exclusiveMaximum; |
|
| 215 | - |
|
| 216 | - return $this; |
|
| 217 | - } |
|
| 218 | - |
|
| 219 | - /** |
|
| 220 | - * @return float |
|
| 221 | - */ |
|
| 222 | - public function getMinimum() |
|
| 223 | - { |
|
| 224 | - return $this->minimum; |
|
| 225 | - } |
|
| 226 | - |
|
| 227 | - /** |
|
| 228 | - * @param float $minimum |
|
| 229 | - * |
|
| 230 | - * @return $this |
|
| 231 | - */ |
|
| 232 | - public function setMinimum($minimum) |
|
| 233 | - { |
|
| 234 | - $this->minimum = $minimum; |
|
| 235 | - |
|
| 236 | - return $this; |
|
| 237 | - } |
|
| 238 | - |
|
| 239 | - /** |
|
| 240 | - * @return bool |
|
| 241 | - */ |
|
| 242 | - public function isExclusiveMinimum() |
|
| 243 | - { |
|
| 244 | - return $this->exclusiveMinimum; |
|
| 245 | - } |
|
| 246 | - |
|
| 247 | - /** |
|
| 248 | - * @param bool $exclusiveMinimum |
|
| 249 | - * |
|
| 250 | - * @return $this |
|
| 251 | - */ |
|
| 252 | - public function setExclusiveMinimum($exclusiveMinimum) |
|
| 253 | - { |
|
| 254 | - $this->exclusiveMinimum = $exclusiveMinimum; |
|
| 255 | - |
|
| 256 | - return $this; |
|
| 257 | - } |
|
| 258 | - |
|
| 259 | - /** |
|
| 260 | - * @return int |
|
| 261 | - */ |
|
| 262 | - public function getMaxLength() |
|
| 263 | - { |
|
| 264 | - return $this->maxLength; |
|
| 265 | - } |
|
| 266 | - |
|
| 267 | - /** |
|
| 268 | - * @param int $maxLength |
|
| 269 | - * |
|
| 270 | - * @return $this |
|
| 271 | - */ |
|
| 272 | - public function setMaxLength($maxLength) |
|
| 273 | - { |
|
| 274 | - $this->maxLength = $maxLength; |
|
| 275 | - |
|
| 276 | - return $this; |
|
| 277 | - } |
|
| 278 | - |
|
| 279 | - /** |
|
| 280 | - * @return int |
|
| 281 | - */ |
|
| 282 | - public function getMinLength() |
|
| 283 | - { |
|
| 284 | - return $this->minLength; |
|
| 285 | - } |
|
| 286 | - |
|
| 287 | - /** |
|
| 288 | - * @param int $minLength |
|
| 289 | - * |
|
| 290 | - * @return $this |
|
| 291 | - */ |
|
| 292 | - public function setMinLength($minLength) |
|
| 293 | - { |
|
| 294 | - $this->minLength = $minLength; |
|
| 295 | - |
|
| 296 | - return $this; |
|
| 297 | - } |
|
| 298 | - |
|
| 299 | - /** |
|
| 300 | - * @return string |
|
| 301 | - */ |
|
| 302 | - public function getPattern() |
|
| 303 | - { |
|
| 304 | - return $this->pattern; |
|
| 305 | - } |
|
| 306 | - |
|
| 307 | - /** |
|
| 308 | - * @param string $pattern |
|
| 309 | - * |
|
| 310 | - * @return $thi |
|
| 311 | - */ |
|
| 312 | - public function setPattern($pattern) |
|
| 313 | - { |
|
| 314 | - $this->pattern = $pattern; |
|
| 315 | - |
|
| 316 | - return $this; |
|
| 317 | - } |
|
| 318 | - |
|
| 319 | - /** |
|
| 320 | - * @return int |
|
| 321 | - */ |
|
| 322 | - public function getMaxItems() |
|
| 323 | - { |
|
| 324 | - return $this->maxItems; |
|
| 325 | - } |
|
| 326 | - |
|
| 327 | - /** |
|
| 328 | - * @param int $maxItems |
|
| 329 | - * |
|
| 330 | - * @return $this |
|
| 331 | - */ |
|
| 332 | - public function setMaxItems($maxItems) |
|
| 333 | - { |
|
| 334 | - $this->maxItems = $maxItems; |
|
| 335 | - |
|
| 336 | - return $this; |
|
| 337 | - } |
|
| 338 | - |
|
| 339 | - /** |
|
| 340 | - * @return int |
|
| 341 | - */ |
|
| 342 | - public function getMinItems() |
|
| 343 | - { |
|
| 344 | - return $this->minItems; |
|
| 345 | - } |
|
| 346 | - |
|
| 347 | - /** |
|
| 348 | - * @param int $minItems |
|
| 349 | - * |
|
| 350 | - * @return $this |
|
| 351 | - */ |
|
| 352 | - public function setMinItems($minItems) |
|
| 353 | - { |
|
| 354 | - $this->minItems = $minItems; |
|
| 355 | - |
|
| 356 | - return $this; |
|
| 357 | - } |
|
| 358 | - |
|
| 359 | - /** |
|
| 360 | - * @return bool |
|
| 361 | - */ |
|
| 362 | - public function hasUniqueItems() |
|
| 363 | - { |
|
| 364 | - return $this->uniqueItems; |
|
| 365 | - } |
|
| 366 | - |
|
| 367 | - /** |
|
| 368 | - * @param bool $uniqueItems |
|
| 369 | - * |
|
| 370 | - * @return $this |
|
| 371 | - */ |
|
| 372 | - public function setUniqueItems($uniqueItems) |
|
| 373 | - { |
|
| 374 | - $this->uniqueItems = $uniqueItems; |
|
| 375 | - |
|
| 376 | - return $this; |
|
| 377 | - } |
|
| 378 | - |
|
| 379 | - /** |
|
| 380 | - * @return mixed |
|
| 381 | - */ |
|
| 382 | - public function getEnum() |
|
| 383 | - { |
|
| 384 | - return $this->enum; |
|
| 385 | - } |
|
| 386 | - |
|
| 387 | - /** |
|
| 388 | - * @param mixed $enum |
|
| 389 | - * |
|
| 390 | - * @return $this |
|
| 391 | - */ |
|
| 392 | - public function setEnum($enum) |
|
| 393 | - { |
|
| 394 | - $this->enum = $enum; |
|
| 395 | - |
|
| 396 | - return $this; |
|
| 397 | - } |
|
| 398 | - |
|
| 399 | - /** |
|
| 400 | - * @return float |
|
| 401 | - */ |
|
| 402 | - public function getMultipleOf() |
|
| 403 | - { |
|
| 404 | - return $this->multipleOf; |
|
| 405 | - } |
|
| 406 | - |
|
| 407 | - /** |
|
| 408 | - * @param float $multipleOf |
|
| 409 | - * |
|
| 410 | - * @return $this |
|
| 411 | - */ |
|
| 412 | - public function setMultipleOf($multipleOf) |
|
| 413 | - { |
|
| 414 | - $this->multipleOf = $multipleOf; |
|
| 415 | - |
|
| 416 | - return $this; |
|
| 417 | - } |
|
| 9 | + /** @var string */ |
|
| 10 | + private $type; |
|
| 11 | + |
|
| 12 | + /** @var string */ |
|
| 13 | + private $format; |
|
| 14 | + |
|
| 15 | + /** @var string */ |
|
| 16 | + private $collectionFormat; |
|
| 17 | + |
|
| 18 | + /** @var mixed */ |
|
| 19 | + private $default; |
|
| 20 | + |
|
| 21 | + /** @var float */ |
|
| 22 | + private $maximum; |
|
| 23 | + |
|
| 24 | + /** @var bool */ |
|
| 25 | + private $exclusiveMaximum = false; |
|
| 26 | + |
|
| 27 | + /** @var float */ |
|
| 28 | + private $minimum; |
|
| 29 | + |
|
| 30 | + /** @var bool */ |
|
| 31 | + private $exclusiveMinimum = false; |
|
| 32 | + |
|
| 33 | + /** @var int */ |
|
| 34 | + private $maxLength; |
|
| 35 | + |
|
| 36 | + /** @var int */ |
|
| 37 | + private $minLength; |
|
| 38 | + |
|
| 39 | + /** @var string */ |
|
| 40 | + private $pattern; |
|
| 41 | + |
|
| 42 | + /** @var int */ |
|
| 43 | + private $maxItems; |
|
| 44 | + |
|
| 45 | + /** @var int */ |
|
| 46 | + private $minItems; |
|
| 47 | + |
|
| 48 | + /** @var bool */ |
|
| 49 | + private $uniqueItems; |
|
| 50 | + |
|
| 51 | + /** @var mixed */ |
|
| 52 | + private $enum; |
|
| 53 | + |
|
| 54 | + /** @var float */ |
|
| 55 | + private $multipleOf; |
|
| 56 | + |
|
| 57 | + private function parseType(Map $data) |
|
| 58 | + { |
|
| 59 | + $this->type = $data->get('type'); |
|
| 60 | + $this->format = $data->get('format'); |
|
| 61 | + $this->collectionFormat = $data->get('collectionFormat'); |
|
| 62 | + $this->default = $data->get('default'); |
|
| 63 | + $this->maximum = $data->get('maximum'); |
|
| 64 | + $this->exclusiveMaximum = $data->has('exclusiveMaximum') && $data->get('exclusiveMaximum'); |
|
| 65 | + $this->minimum = $data->get('minimum'); |
|
| 66 | + $this->exclusiveMinimum = $data->has('exclusiveMinimum') && $data->get('exclusiveMinimum'); |
|
| 67 | + $this->maxLength = $data->get('maxLength'); |
|
| 68 | + $this->minLength = $data->get('minLength'); |
|
| 69 | + $this->pattern = $data->get('pattern'); |
|
| 70 | + $this->maxItems = $data->get('maxItems'); |
|
| 71 | + $this->minItems = $data->get('minItems'); |
|
| 72 | + $this->uniqueItems = $data->has('uniqueItems') && $data->get('uniqueItems'); |
|
| 73 | + $this->enum = $data->get('enum'); |
|
| 74 | + $this->multipleOf = $data->get('multipleOf'); |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + private function getTypeExportFields() |
|
| 78 | + { |
|
| 79 | + return ['type', 'format', 'collectionFormat', 'default', 'maximum', 'exclusiveMaximum', |
|
| 80 | + 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'maxItems', |
|
| 81 | + 'minItems', 'uniqueItems', 'enum', 'multipleOf', |
|
| 82 | + ]; |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + /** |
|
| 86 | + * @return string |
|
| 87 | + */ |
|
| 88 | + public function getType() |
|
| 89 | + { |
|
| 90 | + return $this->type; |
|
| 91 | + } |
|
| 92 | + |
|
| 93 | + /** |
|
| 94 | + * @param string $type |
|
| 95 | + * |
|
| 96 | + * @return $this |
|
| 97 | + */ |
|
| 98 | + public function setType($type) |
|
| 99 | + { |
|
| 100 | + $this->type = $type; |
|
| 101 | + |
|
| 102 | + return $this; |
|
| 103 | + } |
|
| 104 | + |
|
| 105 | + /** |
|
| 106 | + * @return string |
|
| 107 | + */ |
|
| 108 | + public function getFormat() |
|
| 109 | + { |
|
| 110 | + return $this->format; |
|
| 111 | + } |
|
| 112 | + |
|
| 113 | + /** |
|
| 114 | + * Sets the extending format for the type. |
|
| 115 | + * |
|
| 116 | + * @param string $format |
|
| 117 | + * |
|
| 118 | + * @return $this |
|
| 119 | + */ |
|
| 120 | + public function setFormat($format) |
|
| 121 | + { |
|
| 122 | + $this->format = $format; |
|
| 123 | + |
|
| 124 | + return $this; |
|
| 125 | + } |
|
| 126 | + |
|
| 127 | + /** |
|
| 128 | + * @return string |
|
| 129 | + */ |
|
| 130 | + public function getCollectionFormat() |
|
| 131 | + { |
|
| 132 | + return $this->collectionFormat; |
|
| 133 | + } |
|
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * Determines the format of the array if type array is used. Possible values are:. |
|
| 137 | + * |
|
| 138 | + * - `csv` - comma separated values `foo,bar`. |
|
| 139 | + * - `ssv` - space separated values `foo bar`. |
|
| 140 | + * - `tsv` - tab separated values `foo\tbar`. |
|
| 141 | + * - `pipes` - pipe separated values `foo|bar`. |
|
| 142 | + * - `multi` - corresponds to multiple parameter instances instead of multiple values for a |
|
| 143 | + * single instance `foo=bar&foo=baz`. This is valid only for parameters in "query" or "formData". |
|
| 144 | + * |
|
| 145 | + * Default value is `csv`. |
|
| 146 | + * |
|
| 147 | + * |
|
| 148 | + * @param string $collectionFormat |
|
| 149 | + * |
|
| 150 | + * @return $this |
|
| 151 | + */ |
|
| 152 | + public function setCollectionFormat($collectionFormat) |
|
| 153 | + { |
|
| 154 | + $this->collectionFormat = $collectionFormat; |
|
| 155 | + |
|
| 156 | + return $this; |
|
| 157 | + } |
|
| 158 | + |
|
| 159 | + /** |
|
| 160 | + * @return mixed |
|
| 161 | + */ |
|
| 162 | + public function getDefault() |
|
| 163 | + { |
|
| 164 | + return $this->default; |
|
| 165 | + } |
|
| 166 | + |
|
| 167 | + /** |
|
| 168 | + * @param mixed $default |
|
| 169 | + * |
|
| 170 | + * @return $this |
|
| 171 | + */ |
|
| 172 | + public function setDefault($default) |
|
| 173 | + { |
|
| 174 | + $this->default = $default; |
|
| 175 | + |
|
| 176 | + return $this; |
|
| 177 | + } |
|
| 178 | + |
|
| 179 | + /** |
|
| 180 | + * @return float |
|
| 181 | + */ |
|
| 182 | + public function getMaximum() |
|
| 183 | + { |
|
| 184 | + return $this->maximum; |
|
| 185 | + } |
|
| 186 | + |
|
| 187 | + /** |
|
| 188 | + * @param float $maximum |
|
| 189 | + * |
|
| 190 | + * @return $this |
|
| 191 | + */ |
|
| 192 | + public function setMaximum($maximum) |
|
| 193 | + { |
|
| 194 | + $this->maximum = $maximum; |
|
| 195 | + |
|
| 196 | + return $this; |
|
| 197 | + } |
|
| 198 | + |
|
| 199 | + /** |
|
| 200 | + * @return bool |
|
| 201 | + */ |
|
| 202 | + public function isExclusiveMaximum() |
|
| 203 | + { |
|
| 204 | + return $this->exclusiveMaximum; |
|
| 205 | + } |
|
| 206 | + |
|
| 207 | + /** |
|
| 208 | + * @param bool $exclusiveMaximum |
|
| 209 | + * |
|
| 210 | + * @return $this |
|
| 211 | + */ |
|
| 212 | + public function setExclusiveMaximum($exclusiveMaximum) |
|
| 213 | + { |
|
| 214 | + $this->exclusiveMaximum = $exclusiveMaximum; |
|
| 215 | + |
|
| 216 | + return $this; |
|
| 217 | + } |
|
| 218 | + |
|
| 219 | + /** |
|
| 220 | + * @return float |
|
| 221 | + */ |
|
| 222 | + public function getMinimum() |
|
| 223 | + { |
|
| 224 | + return $this->minimum; |
|
| 225 | + } |
|
| 226 | + |
|
| 227 | + /** |
|
| 228 | + * @param float $minimum |
|
| 229 | + * |
|
| 230 | + * @return $this |
|
| 231 | + */ |
|
| 232 | + public function setMinimum($minimum) |
|
| 233 | + { |
|
| 234 | + $this->minimum = $minimum; |
|
| 235 | + |
|
| 236 | + return $this; |
|
| 237 | + } |
|
| 238 | + |
|
| 239 | + /** |
|
| 240 | + * @return bool |
|
| 241 | + */ |
|
| 242 | + public function isExclusiveMinimum() |
|
| 243 | + { |
|
| 244 | + return $this->exclusiveMinimum; |
|
| 245 | + } |
|
| 246 | + |
|
| 247 | + /** |
|
| 248 | + * @param bool $exclusiveMinimum |
|
| 249 | + * |
|
| 250 | + * @return $this |
|
| 251 | + */ |
|
| 252 | + public function setExclusiveMinimum($exclusiveMinimum) |
|
| 253 | + { |
|
| 254 | + $this->exclusiveMinimum = $exclusiveMinimum; |
|
| 255 | + |
|
| 256 | + return $this; |
|
| 257 | + } |
|
| 258 | + |
|
| 259 | + /** |
|
| 260 | + * @return int |
|
| 261 | + */ |
|
| 262 | + public function getMaxLength() |
|
| 263 | + { |
|
| 264 | + return $this->maxLength; |
|
| 265 | + } |
|
| 266 | + |
|
| 267 | + /** |
|
| 268 | + * @param int $maxLength |
|
| 269 | + * |
|
| 270 | + * @return $this |
|
| 271 | + */ |
|
| 272 | + public function setMaxLength($maxLength) |
|
| 273 | + { |
|
| 274 | + $this->maxLength = $maxLength; |
|
| 275 | + |
|
| 276 | + return $this; |
|
| 277 | + } |
|
| 278 | + |
|
| 279 | + /** |
|
| 280 | + * @return int |
|
| 281 | + */ |
|
| 282 | + public function getMinLength() |
|
| 283 | + { |
|
| 284 | + return $this->minLength; |
|
| 285 | + } |
|
| 286 | + |
|
| 287 | + /** |
|
| 288 | + * @param int $minLength |
|
| 289 | + * |
|
| 290 | + * @return $this |
|
| 291 | + */ |
|
| 292 | + public function setMinLength($minLength) |
|
| 293 | + { |
|
| 294 | + $this->minLength = $minLength; |
|
| 295 | + |
|
| 296 | + return $this; |
|
| 297 | + } |
|
| 298 | + |
|
| 299 | + /** |
|
| 300 | + * @return string |
|
| 301 | + */ |
|
| 302 | + public function getPattern() |
|
| 303 | + { |
|
| 304 | + return $this->pattern; |
|
| 305 | + } |
|
| 306 | + |
|
| 307 | + /** |
|
| 308 | + * @param string $pattern |
|
| 309 | + * |
|
| 310 | + * @return $thi |
|
| 311 | + */ |
|
| 312 | + public function setPattern($pattern) |
|
| 313 | + { |
|
| 314 | + $this->pattern = $pattern; |
|
| 315 | + |
|
| 316 | + return $this; |
|
| 317 | + } |
|
| 318 | + |
|
| 319 | + /** |
|
| 320 | + * @return int |
|
| 321 | + */ |
|
| 322 | + public function getMaxItems() |
|
| 323 | + { |
|
| 324 | + return $this->maxItems; |
|
| 325 | + } |
|
| 326 | + |
|
| 327 | + /** |
|
| 328 | + * @param int $maxItems |
|
| 329 | + * |
|
| 330 | + * @return $this |
|
| 331 | + */ |
|
| 332 | + public function setMaxItems($maxItems) |
|
| 333 | + { |
|
| 334 | + $this->maxItems = $maxItems; |
|
| 335 | + |
|
| 336 | + return $this; |
|
| 337 | + } |
|
| 338 | + |
|
| 339 | + /** |
|
| 340 | + * @return int |
|
| 341 | + */ |
|
| 342 | + public function getMinItems() |
|
| 343 | + { |
|
| 344 | + return $this->minItems; |
|
| 345 | + } |
|
| 346 | + |
|
| 347 | + /** |
|
| 348 | + * @param int $minItems |
|
| 349 | + * |
|
| 350 | + * @return $this |
|
| 351 | + */ |
|
| 352 | + public function setMinItems($minItems) |
|
| 353 | + { |
|
| 354 | + $this->minItems = $minItems; |
|
| 355 | + |
|
| 356 | + return $this; |
|
| 357 | + } |
|
| 358 | + |
|
| 359 | + /** |
|
| 360 | + * @return bool |
|
| 361 | + */ |
|
| 362 | + public function hasUniqueItems() |
|
| 363 | + { |
|
| 364 | + return $this->uniqueItems; |
|
| 365 | + } |
|
| 366 | + |
|
| 367 | + /** |
|
| 368 | + * @param bool $uniqueItems |
|
| 369 | + * |
|
| 370 | + * @return $this |
|
| 371 | + */ |
|
| 372 | + public function setUniqueItems($uniqueItems) |
|
| 373 | + { |
|
| 374 | + $this->uniqueItems = $uniqueItems; |
|
| 375 | + |
|
| 376 | + return $this; |
|
| 377 | + } |
|
| 378 | + |
|
| 379 | + /** |
|
| 380 | + * @return mixed |
|
| 381 | + */ |
|
| 382 | + public function getEnum() |
|
| 383 | + { |
|
| 384 | + return $this->enum; |
|
| 385 | + } |
|
| 386 | + |
|
| 387 | + /** |
|
| 388 | + * @param mixed $enum |
|
| 389 | + * |
|
| 390 | + * @return $this |
|
| 391 | + */ |
|
| 392 | + public function setEnum($enum) |
|
| 393 | + { |
|
| 394 | + $this->enum = $enum; |
|
| 395 | + |
|
| 396 | + return $this; |
|
| 397 | + } |
|
| 398 | + |
|
| 399 | + /** |
|
| 400 | + * @return float |
|
| 401 | + */ |
|
| 402 | + public function getMultipleOf() |
|
| 403 | + { |
|
| 404 | + return $this->multipleOf; |
|
| 405 | + } |
|
| 406 | + |
|
| 407 | + /** |
|
| 408 | + * @param float $multipleOf |
|
| 409 | + * |
|
| 410 | + * @return $this |
|
| 411 | + */ |
|
| 412 | + public function setMultipleOf($multipleOf) |
|
| 413 | + { |
|
| 414 | + $this->multipleOf = $multipleOf; |
|
| 415 | + |
|
| 416 | + return $this; |
|
| 417 | + } |
|
| 418 | 418 | } |
@@ -4,8 +4,7 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | |
| 7 | -trait TypePart |
|
| 8 | -{ |
|
| 7 | +trait TypePart { |
|
| 9 | 8 | /** @var string */ |
| 10 | 9 | private $type; |
| 11 | 10 | |
@@ -54,8 +53,7 @@ discard block |
||
| 54 | 53 | /** @var float */ |
| 55 | 54 | private $multipleOf; |
| 56 | 55 | |
| 57 | - private function parseType(Map $data) |
|
| 58 | - { |
|
| 56 | + private function parseType(Map $data) { |
|
| 59 | 57 | $this->type = $data->get('type'); |
| 60 | 58 | $this->format = $data->get('format'); |
| 61 | 59 | $this->collectionFormat = $data->get('collectionFormat'); |
@@ -74,8 +72,7 @@ discard block |
||
| 74 | 72 | $this->multipleOf = $data->get('multipleOf'); |
| 75 | 73 | } |
| 76 | 74 | |
| 77 | - private function getTypeExportFields() |
|
| 78 | - { |
|
| 75 | + private function getTypeExportFields() { |
|
| 79 | 76 | return ['type', 'format', 'collectionFormat', 'default', 'maximum', 'exclusiveMaximum', |
| 80 | 77 | 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern', 'maxItems', |
| 81 | 78 | 'minItems', 'uniqueItems', 'enum', 'multipleOf', |
@@ -85,8 +82,7 @@ discard block |
||
| 85 | 82 | /** |
| 86 | 83 | * @return string |
| 87 | 84 | */ |
| 88 | - public function getType() |
|
| 89 | - { |
|
| 85 | + public function getType() { |
|
| 90 | 86 | return $this->type; |
| 91 | 87 | } |
| 92 | 88 | |
@@ -95,8 +91,7 @@ discard block |
||
| 95 | 91 | * |
| 96 | 92 | * @return $this |
| 97 | 93 | */ |
| 98 | - public function setType($type) |
|
| 99 | - { |
|
| 94 | + public function setType($type) { |
|
| 100 | 95 | $this->type = $type; |
| 101 | 96 | |
| 102 | 97 | return $this; |
@@ -105,8 +100,7 @@ discard block |
||
| 105 | 100 | /** |
| 106 | 101 | * @return string |
| 107 | 102 | */ |
| 108 | - public function getFormat() |
|
| 109 | - { |
|
| 103 | + public function getFormat() { |
|
| 110 | 104 | return $this->format; |
| 111 | 105 | } |
| 112 | 106 | |
@@ -117,8 +111,7 @@ discard block |
||
| 117 | 111 | * |
| 118 | 112 | * @return $this |
| 119 | 113 | */ |
| 120 | - public function setFormat($format) |
|
| 121 | - { |
|
| 114 | + public function setFormat($format) { |
|
| 122 | 115 | $this->format = $format; |
| 123 | 116 | |
| 124 | 117 | return $this; |
@@ -127,8 +120,7 @@ discard block |
||
| 127 | 120 | /** |
| 128 | 121 | * @return string |
| 129 | 122 | */ |
| 130 | - public function getCollectionFormat() |
|
| 131 | - { |
|
| 123 | + public function getCollectionFormat() { |
|
| 132 | 124 | return $this->collectionFormat; |
| 133 | 125 | } |
| 134 | 126 | |
@@ -149,8 +141,7 @@ discard block |
||
| 149 | 141 | * |
| 150 | 142 | * @return $this |
| 151 | 143 | */ |
| 152 | - public function setCollectionFormat($collectionFormat) |
|
| 153 | - { |
|
| 144 | + public function setCollectionFormat($collectionFormat) { |
|
| 154 | 145 | $this->collectionFormat = $collectionFormat; |
| 155 | 146 | |
| 156 | 147 | return $this; |
@@ -159,8 +150,7 @@ discard block |
||
| 159 | 150 | /** |
| 160 | 151 | * @return mixed |
| 161 | 152 | */ |
| 162 | - public function getDefault() |
|
| 163 | - { |
|
| 153 | + public function getDefault() { |
|
| 164 | 154 | return $this->default; |
| 165 | 155 | } |
| 166 | 156 | |
@@ -169,8 +159,7 @@ discard block |
||
| 169 | 159 | * |
| 170 | 160 | * @return $this |
| 171 | 161 | */ |
| 172 | - public function setDefault($default) |
|
| 173 | - { |
|
| 162 | + public function setDefault($default) { |
|
| 174 | 163 | $this->default = $default; |
| 175 | 164 | |
| 176 | 165 | return $this; |
@@ -179,8 +168,7 @@ discard block |
||
| 179 | 168 | /** |
| 180 | 169 | * @return float |
| 181 | 170 | */ |
| 182 | - public function getMaximum() |
|
| 183 | - { |
|
| 171 | + public function getMaximum() { |
|
| 184 | 172 | return $this->maximum; |
| 185 | 173 | } |
| 186 | 174 | |
@@ -189,8 +177,7 @@ discard block |
||
| 189 | 177 | * |
| 190 | 178 | * @return $this |
| 191 | 179 | */ |
| 192 | - public function setMaximum($maximum) |
|
| 193 | - { |
|
| 180 | + public function setMaximum($maximum) { |
|
| 194 | 181 | $this->maximum = $maximum; |
| 195 | 182 | |
| 196 | 183 | return $this; |
@@ -199,8 +186,7 @@ discard block |
||
| 199 | 186 | /** |
| 200 | 187 | * @return bool |
| 201 | 188 | */ |
| 202 | - public function isExclusiveMaximum() |
|
| 203 | - { |
|
| 189 | + public function isExclusiveMaximum() { |
|
| 204 | 190 | return $this->exclusiveMaximum; |
| 205 | 191 | } |
| 206 | 192 | |
@@ -209,8 +195,7 @@ discard block |
||
| 209 | 195 | * |
| 210 | 196 | * @return $this |
| 211 | 197 | */ |
| 212 | - public function setExclusiveMaximum($exclusiveMaximum) |
|
| 213 | - { |
|
| 198 | + public function setExclusiveMaximum($exclusiveMaximum) { |
|
| 214 | 199 | $this->exclusiveMaximum = $exclusiveMaximum; |
| 215 | 200 | |
| 216 | 201 | return $this; |
@@ -219,8 +204,7 @@ discard block |
||
| 219 | 204 | /** |
| 220 | 205 | * @return float |
| 221 | 206 | */ |
| 222 | - public function getMinimum() |
|
| 223 | - { |
|
| 207 | + public function getMinimum() { |
|
| 224 | 208 | return $this->minimum; |
| 225 | 209 | } |
| 226 | 210 | |
@@ -229,8 +213,7 @@ discard block |
||
| 229 | 213 | * |
| 230 | 214 | * @return $this |
| 231 | 215 | */ |
| 232 | - public function setMinimum($minimum) |
|
| 233 | - { |
|
| 216 | + public function setMinimum($minimum) { |
|
| 234 | 217 | $this->minimum = $minimum; |
| 235 | 218 | |
| 236 | 219 | return $this; |
@@ -239,8 +222,7 @@ discard block |
||
| 239 | 222 | /** |
| 240 | 223 | * @return bool |
| 241 | 224 | */ |
| 242 | - public function isExclusiveMinimum() |
|
| 243 | - { |
|
| 225 | + public function isExclusiveMinimum() { |
|
| 244 | 226 | return $this->exclusiveMinimum; |
| 245 | 227 | } |
| 246 | 228 | |
@@ -249,8 +231,7 @@ discard block |
||
| 249 | 231 | * |
| 250 | 232 | * @return $this |
| 251 | 233 | */ |
| 252 | - public function setExclusiveMinimum($exclusiveMinimum) |
|
| 253 | - { |
|
| 234 | + public function setExclusiveMinimum($exclusiveMinimum) { |
|
| 254 | 235 | $this->exclusiveMinimum = $exclusiveMinimum; |
| 255 | 236 | |
| 256 | 237 | return $this; |
@@ -259,8 +240,7 @@ discard block |
||
| 259 | 240 | /** |
| 260 | 241 | * @return int |
| 261 | 242 | */ |
| 262 | - public function getMaxLength() |
|
| 263 | - { |
|
| 243 | + public function getMaxLength() { |
|
| 264 | 244 | return $this->maxLength; |
| 265 | 245 | } |
| 266 | 246 | |
@@ -269,8 +249,7 @@ discard block |
||
| 269 | 249 | * |
| 270 | 250 | * @return $this |
| 271 | 251 | */ |
| 272 | - public function setMaxLength($maxLength) |
|
| 273 | - { |
|
| 252 | + public function setMaxLength($maxLength) { |
|
| 274 | 253 | $this->maxLength = $maxLength; |
| 275 | 254 | |
| 276 | 255 | return $this; |
@@ -279,8 +258,7 @@ discard block |
||
| 279 | 258 | /** |
| 280 | 259 | * @return int |
| 281 | 260 | */ |
| 282 | - public function getMinLength() |
|
| 283 | - { |
|
| 261 | + public function getMinLength() { |
|
| 284 | 262 | return $this->minLength; |
| 285 | 263 | } |
| 286 | 264 | |
@@ -289,8 +267,7 @@ discard block |
||
| 289 | 267 | * |
| 290 | 268 | * @return $this |
| 291 | 269 | */ |
| 292 | - public function setMinLength($minLength) |
|
| 293 | - { |
|
| 270 | + public function setMinLength($minLength) { |
|
| 294 | 271 | $this->minLength = $minLength; |
| 295 | 272 | |
| 296 | 273 | return $this; |
@@ -299,8 +276,7 @@ discard block |
||
| 299 | 276 | /** |
| 300 | 277 | * @return string |
| 301 | 278 | */ |
| 302 | - public function getPattern() |
|
| 303 | - { |
|
| 279 | + public function getPattern() { |
|
| 304 | 280 | return $this->pattern; |
| 305 | 281 | } |
| 306 | 282 | |
@@ -309,8 +285,7 @@ discard block |
||
| 309 | 285 | * |
| 310 | 286 | * @return $thi |
| 311 | 287 | */ |
| 312 | - public function setPattern($pattern) |
|
| 313 | - { |
|
| 288 | + public function setPattern($pattern) { |
|
| 314 | 289 | $this->pattern = $pattern; |
| 315 | 290 | |
| 316 | 291 | return $this; |
@@ -319,8 +294,7 @@ discard block |
||
| 319 | 294 | /** |
| 320 | 295 | * @return int |
| 321 | 296 | */ |
| 322 | - public function getMaxItems() |
|
| 323 | - { |
|
| 297 | + public function getMaxItems() { |
|
| 324 | 298 | return $this->maxItems; |
| 325 | 299 | } |
| 326 | 300 | |
@@ -329,8 +303,7 @@ discard block |
||
| 329 | 303 | * |
| 330 | 304 | * @return $this |
| 331 | 305 | */ |
| 332 | - public function setMaxItems($maxItems) |
|
| 333 | - { |
|
| 306 | + public function setMaxItems($maxItems) { |
|
| 334 | 307 | $this->maxItems = $maxItems; |
| 335 | 308 | |
| 336 | 309 | return $this; |
@@ -339,8 +312,7 @@ discard block |
||
| 339 | 312 | /** |
| 340 | 313 | * @return int |
| 341 | 314 | */ |
| 342 | - public function getMinItems() |
|
| 343 | - { |
|
| 315 | + public function getMinItems() { |
|
| 344 | 316 | return $this->minItems; |
| 345 | 317 | } |
| 346 | 318 | |
@@ -349,8 +321,7 @@ discard block |
||
| 349 | 321 | * |
| 350 | 322 | * @return $this |
| 351 | 323 | */ |
| 352 | - public function setMinItems($minItems) |
|
| 353 | - { |
|
| 324 | + public function setMinItems($minItems) { |
|
| 354 | 325 | $this->minItems = $minItems; |
| 355 | 326 | |
| 356 | 327 | return $this; |
@@ -359,8 +330,7 @@ discard block |
||
| 359 | 330 | /** |
| 360 | 331 | * @return bool |
| 361 | 332 | */ |
| 362 | - public function hasUniqueItems() |
|
| 363 | - { |
|
| 333 | + public function hasUniqueItems() { |
|
| 364 | 334 | return $this->uniqueItems; |
| 365 | 335 | } |
| 366 | 336 | |
@@ -369,8 +339,7 @@ discard block |
||
| 369 | 339 | * |
| 370 | 340 | * @return $this |
| 371 | 341 | */ |
| 372 | - public function setUniqueItems($uniqueItems) |
|
| 373 | - { |
|
| 342 | + public function setUniqueItems($uniqueItems) { |
|
| 374 | 343 | $this->uniqueItems = $uniqueItems; |
| 375 | 344 | |
| 376 | 345 | return $this; |
@@ -379,8 +348,7 @@ discard block |
||
| 379 | 348 | /** |
| 380 | 349 | * @return mixed |
| 381 | 350 | */ |
| 382 | - public function getEnum() |
|
| 383 | - { |
|
| 351 | + public function getEnum() { |
|
| 384 | 352 | return $this->enum; |
| 385 | 353 | } |
| 386 | 354 | |
@@ -389,8 +357,7 @@ discard block |
||
| 389 | 357 | * |
| 390 | 358 | * @return $this |
| 391 | 359 | */ |
| 392 | - public function setEnum($enum) |
|
| 393 | - { |
|
| 360 | + public function setEnum($enum) { |
|
| 394 | 361 | $this->enum = $enum; |
| 395 | 362 | |
| 396 | 363 | return $this; |
@@ -399,8 +366,7 @@ discard block |
||
| 399 | 366 | /** |
| 400 | 367 | * @return float |
| 401 | 368 | */ |
| 402 | - public function getMultipleOf() |
|
| 403 | - { |
|
| 369 | + public function getMultipleOf() { |
|
| 404 | 370 | return $this->multipleOf; |
| 405 | 371 | } |
| 406 | 372 | |
@@ -409,8 +375,7 @@ discard block |
||
| 409 | 375 | * |
| 410 | 376 | * @return $this |
| 411 | 377 | */ |
| 412 | - public function setMultipleOf($multipleOf) |
|
| 413 | - { |
|
| 378 | + public function setMultipleOf($multipleOf) { |
|
| 414 | 379 | $this->multipleOf = $multipleOf; |
| 415 | 380 | |
| 416 | 381 | return $this; |
@@ -7,30 +7,30 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait ExternalDocsPart |
| 9 | 9 | { |
| 10 | - private $externalDocs; |
|
| 10 | + private $externalDocs; |
|
| 11 | 11 | |
| 12 | - private function parseExternalDocs(Map $data) |
|
| 13 | - { |
|
| 14 | - $this->externalDocs = new ExternalDocs($data->get('externalDocs', new Map())); |
|
| 15 | - } |
|
| 12 | + private function parseExternalDocs(Map $data) |
|
| 13 | + { |
|
| 14 | + $this->externalDocs = new ExternalDocs($data->get('externalDocs', new Map())); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * @return ExternalDocs |
|
| 19 | - */ |
|
| 20 | - public function getExternalDocs() |
|
| 21 | - { |
|
| 22 | - return $this->externalDocs; |
|
| 23 | - } |
|
| 17 | + /** |
|
| 18 | + * @return ExternalDocs |
|
| 19 | + */ |
|
| 20 | + public function getExternalDocs() |
|
| 21 | + { |
|
| 22 | + return $this->externalDocs; |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @param ExternalDocs $externalDocs |
|
| 27 | - * |
|
| 28 | - * @return $this |
|
| 29 | - */ |
|
| 30 | - public function setExternalDocs(ExternalDocs $externalDocs) |
|
| 31 | - { |
|
| 32 | - $this->externalDocs = $externalDocs; |
|
| 25 | + /** |
|
| 26 | + * @param ExternalDocs $externalDocs |
|
| 27 | + * |
|
| 28 | + * @return $this |
|
| 29 | + */ |
|
| 30 | + public function setExternalDocs(ExternalDocs $externalDocs) |
|
| 31 | + { |
|
| 32 | + $this->externalDocs = $externalDocs; |
|
| 33 | 33 | |
| 34 | - return $this; |
|
| 35 | - } |
|
| 34 | + return $this; |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -5,20 +5,17 @@ discard block |
||
| 5 | 5 | use gossi\swagger\ExternalDocs; |
| 6 | 6 | use phootwork\collection\Map; |
| 7 | 7 | |
| 8 | -trait ExternalDocsPart |
|
| 9 | -{ |
|
| 8 | +trait ExternalDocsPart { |
|
| 10 | 9 | private $externalDocs; |
| 11 | 10 | |
| 12 | - private function parseExternalDocs(Map $data) |
|
| 13 | - { |
|
| 11 | + private function parseExternalDocs(Map $data) { |
|
| 14 | 12 | $this->externalDocs = new ExternalDocs($data->get('externalDocs', new Map())); |
| 15 | 13 | } |
| 16 | 14 | |
| 17 | 15 | /** |
| 18 | 16 | * @return ExternalDocs |
| 19 | 17 | */ |
| 20 | - public function getExternalDocs() |
|
| 21 | - { |
|
| 18 | + public function getExternalDocs() { |
|
| 22 | 19 | return $this->externalDocs; |
| 23 | 20 | } |
| 24 | 21 | |
@@ -27,8 +24,7 @@ discard block |
||
| 27 | 24 | * |
| 28 | 25 | * @return $this |
| 29 | 26 | */ |
| 30 | - public function setExternalDocs(ExternalDocs $externalDocs) |
|
| 31 | - { |
|
| 27 | + public function setExternalDocs(ExternalDocs $externalDocs) { |
|
| 32 | 28 | $this->externalDocs = $externalDocs; |
| 33 | 29 | |
| 34 | 30 | return $this; |
@@ -6,40 +6,40 @@ |
||
| 6 | 6 | |
| 7 | 7 | trait RefPart |
| 8 | 8 | { |
| 9 | - /** @var string */ |
|
| 10 | - private $ref; |
|
| 11 | - |
|
| 12 | - /** @var bool */ |
|
| 13 | - private $hasRef = false; |
|
| 14 | - |
|
| 15 | - private function parseRef(Map $data) |
|
| 16 | - { |
|
| 17 | - $this->ref = $data->get('$ref'); |
|
| 18 | - $this->hasRef = $data->has('$ref'); |
|
| 19 | - } |
|
| 20 | - |
|
| 21 | - /** |
|
| 22 | - * @return the string |
|
| 23 | - */ |
|
| 24 | - public function getRef() |
|
| 25 | - { |
|
| 26 | - return $this->ref; |
|
| 27 | - } |
|
| 28 | - |
|
| 29 | - /** |
|
| 30 | - * @param |
|
| 31 | - * $ref |
|
| 32 | - */ |
|
| 33 | - public function setRef($ref) |
|
| 34 | - { |
|
| 35 | - $this->ref = $ref; |
|
| 36 | - $this->hasRef = $ref !== null; |
|
| 37 | - |
|
| 38 | - return $this; |
|
| 39 | - } |
|
| 40 | - |
|
| 41 | - public function hasRef() |
|
| 42 | - { |
|
| 43 | - return $this->hasRef; |
|
| 44 | - } |
|
| 9 | + /** @var string */ |
|
| 10 | + private $ref; |
|
| 11 | + |
|
| 12 | + /** @var bool */ |
|
| 13 | + private $hasRef = false; |
|
| 14 | + |
|
| 15 | + private function parseRef(Map $data) |
|
| 16 | + { |
|
| 17 | + $this->ref = $data->get('$ref'); |
|
| 18 | + $this->hasRef = $data->has('$ref'); |
|
| 19 | + } |
|
| 20 | + |
|
| 21 | + /** |
|
| 22 | + * @return the string |
|
| 23 | + */ |
|
| 24 | + public function getRef() |
|
| 25 | + { |
|
| 26 | + return $this->ref; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | + /** |
|
| 30 | + * @param |
|
| 31 | + * $ref |
|
| 32 | + */ |
|
| 33 | + public function setRef($ref) |
|
| 34 | + { |
|
| 35 | + $this->ref = $ref; |
|
| 36 | + $this->hasRef = $ref !== null; |
|
| 37 | + |
|
| 38 | + return $this; |
|
| 39 | + } |
|
| 40 | + |
|
| 41 | + public function hasRef() |
|
| 42 | + { |
|
| 43 | + return $this->hasRef; |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -4,16 +4,14 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | |
| 7 | -trait RefPart |
|
| 8 | -{ |
|
| 7 | +trait RefPart { |
|
| 9 | 8 | /** @var string */ |
| 10 | 9 | private $ref; |
| 11 | 10 | |
| 12 | 11 | /** @var bool */ |
| 13 | 12 | private $hasRef = false; |
| 14 | 13 | |
| 15 | - private function parseRef(Map $data) |
|
| 16 | - { |
|
| 14 | + private function parseRef(Map $data) { |
|
| 17 | 15 | $this->ref = $data->get('$ref'); |
| 18 | 16 | $this->hasRef = $data->has('$ref'); |
| 19 | 17 | } |
@@ -21,8 +19,7 @@ discard block |
||
| 21 | 19 | /** |
| 22 | 20 | * @return the string |
| 23 | 21 | */ |
| 24 | - public function getRef() |
|
| 25 | - { |
|
| 22 | + public function getRef() { |
|
| 26 | 23 | return $this->ref; |
| 27 | 24 | } |
| 28 | 25 | |
@@ -30,16 +27,14 @@ discard block |
||
| 30 | 27 | * @param |
| 31 | 28 | * $ref |
| 32 | 29 | */ |
| 33 | - public function setRef($ref) |
|
| 34 | - { |
|
| 30 | + public function setRef($ref) { |
|
| 35 | 31 | $this->ref = $ref; |
| 36 | 32 | $this->hasRef = $ref !== null; |
| 37 | 33 | |
| 38 | 34 | return $this; |
| 39 | 35 | } |
| 40 | 36 | |
| 41 | - public function hasRef() |
|
| 42 | - { |
|
| 37 | + public function hasRef() { |
|
| 43 | 38 | return $this->hasRef; |
| 44 | 39 | } |
| 45 | 40 | } |
@@ -7,19 +7,19 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait SchemaPart |
| 9 | 9 | { |
| 10 | - /** @var Schema */ |
|
| 11 | - private $schema; |
|
| 10 | + /** @var Schema */ |
|
| 11 | + private $schema; |
|
| 12 | 12 | |
| 13 | - private function parseSchema(Map $data) |
|
| 14 | - { |
|
| 15 | - $this->schema = new Schema($data->get('schema')); |
|
| 16 | - } |
|
| 13 | + private function parseSchema(Map $data) |
|
| 14 | + { |
|
| 15 | + $this->schema = new Schema($data->get('schema')); |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * @return Schema |
|
| 20 | - */ |
|
| 21 | - public function getSchema() |
|
| 22 | - { |
|
| 23 | - return $this->schema; |
|
| 24 | - } |
|
| 18 | + /** |
|
| 19 | + * @return Schema |
|
| 20 | + */ |
|
| 21 | + public function getSchema() |
|
| 22 | + { |
|
| 23 | + return $this->schema; |
|
| 24 | + } |
|
| 25 | 25 | } |
@@ -5,21 +5,18 @@ |
||
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | use gossi\swagger\Schema; |
| 7 | 7 | |
| 8 | -trait SchemaPart |
|
| 9 | -{ |
|
| 8 | +trait SchemaPart { |
|
| 10 | 9 | /** @var Schema */ |
| 11 | 10 | private $schema; |
| 12 | 11 | |
| 13 | - private function parseSchema(Map $data) |
|
| 14 | - { |
|
| 12 | + private function parseSchema(Map $data) { |
|
| 15 | 13 | $this->schema = new Schema($data->get('schema')); |
| 16 | 14 | } |
| 17 | 15 | |
| 18 | 16 | /** |
| 19 | 17 | * @return Schema |
| 20 | 18 | */ |
| 21 | - public function getSchema() |
|
| 22 | - { |
|
| 19 | + public function getSchema() { |
|
| 23 | 20 | return $this->schema; |
| 24 | 21 | } |
| 25 | 22 | } |
@@ -7,21 +7,21 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait ParametersPart |
| 9 | 9 | { |
| 10 | - /** @var Parameters */ |
|
| 11 | - private $parameters; |
|
| 10 | + /** @var Parameters */ |
|
| 11 | + private $parameters; |
|
| 12 | 12 | |
| 13 | - private function parseParameters(Map $data) |
|
| 14 | - { |
|
| 15 | - $this->parameters = new Parameters($data->get('parameters', new Map())); |
|
| 16 | - } |
|
| 13 | + private function parseParameters(Map $data) |
|
| 14 | + { |
|
| 15 | + $this->parameters = new Parameters($data->get('parameters', new Map())); |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Return parameters. |
|
| 20 | - * |
|
| 21 | - * @return Parameters |
|
| 22 | - */ |
|
| 23 | - public function getParameters() |
|
| 24 | - { |
|
| 25 | - return $this->parameters; |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Return parameters. |
|
| 20 | + * |
|
| 21 | + * @return Parameters |
|
| 22 | + */ |
|
| 23 | + public function getParameters() |
|
| 24 | + { |
|
| 25 | + return $this->parameters; |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -5,13 +5,11 @@ discard block |
||
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | use gossi\swagger\collections\Parameters; |
| 7 | 7 | |
| 8 | -trait ParametersPart |
|
| 9 | -{ |
|
| 8 | +trait ParametersPart { |
|
| 10 | 9 | /** @var Parameters */ |
| 11 | 10 | private $parameters; |
| 12 | 11 | |
| 13 | - private function parseParameters(Map $data) |
|
| 14 | - { |
|
| 12 | + private function parseParameters(Map $data) { |
|
| 15 | 13 | $this->parameters = new Parameters($data->get('parameters', new Map())); |
| 16 | 14 | } |
| 17 | 15 | |
@@ -20,8 +18,7 @@ discard block |
||
| 20 | 18 | * |
| 21 | 19 | * @return Parameters |
| 22 | 20 | */ |
| 23 | - public function getParameters() |
|
| 24 | - { |
|
| 21 | + public function getParameters() { |
|
| 25 | 22 | return $this->parameters; |
| 26 | 23 | } |
| 27 | 24 | } |
@@ -7,21 +7,21 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait ResponsesPart |
| 9 | 9 | { |
| 10 | - /** @var Responses */ |
|
| 11 | - private $responses; |
|
| 10 | + /** @var Responses */ |
|
| 11 | + private $responses; |
|
| 12 | 12 | |
| 13 | - private function parseResponses(Map $data) |
|
| 14 | - { |
|
| 15 | - $this->responses = new Responses($data->get('responses', new Map())); |
|
| 16 | - } |
|
| 13 | + private function parseResponses(Map $data) |
|
| 14 | + { |
|
| 15 | + $this->responses = new Responses($data->get('responses', new Map())); |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Return responses. |
|
| 20 | - * |
|
| 21 | - * @return Responses |
|
| 22 | - */ |
|
| 23 | - public function getResponses() |
|
| 24 | - { |
|
| 25 | - return $this->responses; |
|
| 26 | - } |
|
| 18 | + /** |
|
| 19 | + * Return responses. |
|
| 20 | + * |
|
| 21 | + * @return Responses |
|
| 22 | + */ |
|
| 23 | + public function getResponses() |
|
| 24 | + { |
|
| 25 | + return $this->responses; |
|
| 26 | + } |
|
| 27 | 27 | } |
@@ -5,13 +5,11 @@ discard block |
||
| 5 | 5 | use gossi\swagger\collections\Responses; |
| 6 | 6 | use phootwork\collection\Map; |
| 7 | 7 | |
| 8 | -trait ResponsesPart |
|
| 9 | -{ |
|
| 8 | +trait ResponsesPart { |
|
| 10 | 9 | /** @var Responses */ |
| 11 | 10 | private $responses; |
| 12 | 11 | |
| 13 | - private function parseResponses(Map $data) |
|
| 14 | - { |
|
| 12 | + private function parseResponses(Map $data) { |
|
| 15 | 13 | $this->responses = new Responses($data->get('responses', new Map())); |
| 16 | 14 | } |
| 17 | 15 | |
@@ -20,8 +18,7 @@ discard block |
||
| 20 | 18 | * |
| 21 | 19 | * @return Responses |
| 22 | 20 | */ |
| 23 | - public function getResponses() |
|
| 24 | - { |
|
| 21 | + public function getResponses() { |
|
| 25 | 22 | return $this->responses; |
| 26 | 23 | } |
| 27 | 24 | } |
@@ -6,31 +6,31 @@ |
||
| 6 | 6 | |
| 7 | 7 | trait DescriptionPart |
| 8 | 8 | { |
| 9 | - /** @var string */ |
|
| 10 | - private $description = false; |
|
| 9 | + /** @var string */ |
|
| 10 | + private $description = false; |
|
| 11 | 11 | |
| 12 | - private function parseDescription(Map $data) |
|
| 13 | - { |
|
| 14 | - $this->description = $data->get('description'); |
|
| 15 | - } |
|
| 12 | + private function parseDescription(Map $data) |
|
| 13 | + { |
|
| 14 | + $this->description = $data->get('description'); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * @return string |
|
| 19 | - */ |
|
| 20 | - public function getDescription() |
|
| 21 | - { |
|
| 22 | - return $this->description; |
|
| 23 | - } |
|
| 17 | + /** |
|
| 18 | + * @return string |
|
| 19 | + */ |
|
| 20 | + public function getDescription() |
|
| 21 | + { |
|
| 22 | + return $this->description; |
|
| 23 | + } |
|
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * @param string $description |
|
| 27 | - * |
|
| 28 | - * @return $this |
|
| 29 | - */ |
|
| 30 | - public function setDescription($description) |
|
| 31 | - { |
|
| 32 | - $this->description = $description; |
|
| 25 | + /** |
|
| 26 | + * @param string $description |
|
| 27 | + * |
|
| 28 | + * @return $this |
|
| 29 | + */ |
|
| 30 | + public function setDescription($description) |
|
| 31 | + { |
|
| 32 | + $this->description = $description; |
|
| 33 | 33 | |
| 34 | - return $this; |
|
| 35 | - } |
|
| 34 | + return $this; |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -4,21 +4,18 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | |
| 7 | -trait DescriptionPart |
|
| 8 | -{ |
|
| 7 | +trait DescriptionPart { |
|
| 9 | 8 | /** @var string */ |
| 10 | 9 | private $description = false; |
| 11 | 10 | |
| 12 | - private function parseDescription(Map $data) |
|
| 13 | - { |
|
| 11 | + private function parseDescription(Map $data) { |
|
| 14 | 12 | $this->description = $data->get('description'); |
| 15 | 13 | } |
| 16 | 14 | |
| 17 | 15 | /** |
| 18 | 16 | * @return string |
| 19 | 17 | */ |
| 20 | - public function getDescription() |
|
| 21 | - { |
|
| 18 | + public function getDescription() { |
|
| 22 | 19 | return $this->description; |
| 23 | 20 | } |
| 24 | 21 | |
@@ -27,8 +24,7 @@ discard block |
||
| 27 | 24 | * |
| 28 | 25 | * @return $this |
| 29 | 26 | */ |
| 30 | - public function setDescription($description) |
|
| 31 | - { |
|
| 27 | + public function setDescription($description) { |
|
| 32 | 28 | $this->description = $description; |
| 33 | 29 | |
| 34 | 30 | return $this; |
@@ -7,27 +7,27 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait ItemsPart |
| 9 | 9 | { |
| 10 | - /** @var */ |
|
| 11 | - private $items; |
|
| 10 | + /** @var */ |
|
| 11 | + private $items; |
|
| 12 | 12 | |
| 13 | - private function parseItems(Map $data) |
|
| 14 | - { |
|
| 15 | - if ($data->has('items')) { |
|
| 16 | - $this->items = new Items($data->get('items')); |
|
| 17 | - } |
|
| 18 | - } |
|
| 13 | + private function parseItems(Map $data) |
|
| 14 | + { |
|
| 15 | + if ($data->has('items')) { |
|
| 16 | + $this->items = new Items($data->get('items')); |
|
| 17 | + } |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * Returns the items. |
|
| 22 | - * |
|
| 23 | - * @return Items |
|
| 24 | - */ |
|
| 25 | - public function getItems() |
|
| 26 | - { |
|
| 27 | - if ($this->items === null) { |
|
| 28 | - $this->items = new Items(); |
|
| 29 | - } |
|
| 20 | + /** |
|
| 21 | + * Returns the items. |
|
| 22 | + * |
|
| 23 | + * @return Items |
|
| 24 | + */ |
|
| 25 | + public function getItems() |
|
| 26 | + { |
|
| 27 | + if ($this->items === null) { |
|
| 28 | + $this->items = new Items(); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | - return $this->items; |
|
| 32 | - } |
|
| 31 | + return $this->items; |
|
| 32 | + } |
|
| 33 | 33 | } |
@@ -5,13 +5,11 @@ discard block |
||
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | use gossi\swagger\Items; |
| 7 | 7 | |
| 8 | -trait ItemsPart |
|
| 9 | -{ |
|
| 8 | +trait ItemsPart { |
|
| 10 | 9 | /** @var */ |
| 11 | 10 | private $items; |
| 12 | 11 | |
| 13 | - private function parseItems(Map $data) |
|
| 14 | - { |
|
| 12 | + private function parseItems(Map $data) { |
|
| 15 | 13 | if ($data->has('items')) { |
| 16 | 14 | $this->items = new Items($data->get('items')); |
| 17 | 15 | } |
@@ -22,8 +20,7 @@ discard block |
||
| 22 | 20 | * |
| 23 | 21 | * @return Items |
| 24 | 22 | */ |
| 25 | - public function getItems() |
|
| 26 | - { |
|
| 23 | + public function getItems() { |
|
| 27 | 24 | if ($this->items === null) { |
| 28 | 25 | $this->items = new Items(); |
| 29 | 26 | } |
@@ -7,20 +7,20 @@ |
||
| 7 | 7 | |
| 8 | 8 | trait ConsumesPart |
| 9 | 9 | { |
| 10 | - private $consumes; |
|
| 10 | + private $consumes; |
|
| 11 | 11 | |
| 12 | - private function parseConsumes(Map $data) |
|
| 13 | - { |
|
| 14 | - $this->consumes = $data->get('consumes', new Set()); |
|
| 15 | - } |
|
| 12 | + private function parseConsumes(Map $data) |
|
| 13 | + { |
|
| 14 | + $this->consumes = $data->get('consumes', new Set()); |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Return consumes. |
|
| 19 | - * |
|
| 20 | - * @return Set |
|
| 21 | - */ |
|
| 22 | - public function getConsumes() |
|
| 23 | - { |
|
| 24 | - return $this->consumes; |
|
| 25 | - } |
|
| 17 | + /** |
|
| 18 | + * Return consumes. |
|
| 19 | + * |
|
| 20 | + * @return Set |
|
| 21 | + */ |
|
| 22 | + public function getConsumes() |
|
| 23 | + { |
|
| 24 | + return $this->consumes; |
|
| 25 | + } |
|
| 26 | 26 | } |
@@ -5,12 +5,10 @@ discard block |
||
| 5 | 5 | use phootwork\collection\Map; |
| 6 | 6 | use phootwork\collection\Set; |
| 7 | 7 | |
| 8 | -trait ConsumesPart |
|
| 9 | -{ |
|
| 8 | +trait ConsumesPart { |
|
| 10 | 9 | private $consumes; |
| 11 | 10 | |
| 12 | - private function parseConsumes(Map $data) |
|
| 13 | - { |
|
| 11 | + private function parseConsumes(Map $data) { |
|
| 14 | 12 | $this->consumes = $data->get('consumes', new Set()); |
| 15 | 13 | } |
| 16 | 14 | |
@@ -19,8 +17,7 @@ discard block |
||
| 19 | 17 | * |
| 20 | 18 | * @return Set |
| 21 | 19 | */ |
| 22 | - public function getConsumes() |
|
| 23 | - { |
|
| 20 | + public function getConsumes() { |
|
| 24 | 21 | return $this->consumes; |
| 25 | 22 | } |
| 26 | 23 | } |