| Total Complexity | 95 | 
| Total Lines | 718 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
Complex classes like Car often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Car, and based on these observations, apply Extract Interface, too.
| 1 | <?php | ||
| 12 | class Car extends AbstractStructBase | ||
| 13 | { | ||
| 14 | /** | ||
| 15 | * The license_plate | ||
| 16 | * @var string | ||
| 17 | */ | ||
| 18 | public $license_plate; | ||
| 19 | /** | ||
| 20 | * The category | ||
| 21 | * @var string | ||
| 22 | */ | ||
| 23 | public $category; | ||
| 24 | /** | ||
| 25 | * The brand | ||
| 26 | * @var string | ||
| 27 | */ | ||
| 28 | public $brand; | ||
| 29 | /** | ||
| 30 | * The model | ||
| 31 | * @var string | ||
| 32 | */ | ||
| 33 | public $model; | ||
| 34 | /** | ||
| 35 | * The colors | ||
| 36 | * @var string | ||
| 37 | */ | ||
| 38 | public $colors; | ||
| 39 | /** | ||
| 40 | * The fuel_type | ||
| 41 | * @var string | ||
| 42 | */ | ||
| 43 | public $fuel_type; | ||
| 44 | /** | ||
| 45 | * The cylinders | ||
| 46 | * @var int | ||
| 47 | */ | ||
| 48 | public $cylinders; | ||
| 49 | /** | ||
| 50 | * The cylinder_capacity | ||
| 51 | * @var int | ||
| 52 | */ | ||
| 53 | public $cylinder_capacity; | ||
| 54 | /** | ||
| 55 | * The seats | ||
| 56 | * @var int | ||
| 57 | */ | ||
| 58 | public $seats; | ||
| 59 | /** | ||
| 60 | * The standing_room | ||
| 61 | * @var int | ||
| 62 | */ | ||
| 63 | public $standing_room; | ||
| 64 | /** | ||
| 65 | * The unladen_mass | ||
| 66 | * @var int | ||
| 67 | */ | ||
| 68 | public $unladen_mass; | ||
| 69 | /** | ||
| 70 | * The gross_vehicle_mass | ||
| 71 | * @var int | ||
| 72 | */ | ||
| 73 | public $gross_vehicle_mass; | ||
| 74 | /** | ||
| 75 | * The mass_ready | ||
| 76 | * @var int | ||
| 77 | */ | ||
| 78 | public $mass_ready; | ||
| 79 | /** | ||
| 80 | * The maximum_mass_payload | ||
| 81 | * @var int | ||
| 82 | */ | ||
| 83 | public $maximum_mass_payload; | ||
| 84 | /** | ||
| 85 | * The maximum_mass_unbraked | ||
| 86 | * @var int | ||
| 87 | */ | ||
| 88 | public $maximum_mass_unbraked; | ||
| 89 | /** | ||
| 90 | * The maximum_mass_braked | ||
| 91 | * @var int | ||
| 92 | */ | ||
| 93 | public $maximum_mass_braked; | ||
| 94 | /** | ||
| 95 | * The maximum_mass_trailer_braked | ||
| 96 | * @var int | ||
| 97 | */ | ||
| 98 | public $maximum_mass_trailer_braked; | ||
| 99 | /** | ||
| 100 | * The maximum_mass_self_braked | ||
| 101 | * @var int | ||
| 102 | */ | ||
| 103 | public $maximum_mass_self_braked; | ||
| 104 | /** | ||
| 105 | * The maximum_mass_axle_braked | ||
| 106 | * @var int | ||
| 107 | */ | ||
| 108 | public $maximum_mass_axle_braked; | ||
| 109 | /** | ||
| 110 | * The date_first_issuing | ||
| 111 | * @var string | ||
| 112 | */ | ||
| 113 | public $date_first_issuing; | ||
| 114 | /** | ||
| 115 | * The date_first_admission | ||
| 116 | * @var string | ||
| 117 | */ | ||
| 118 | public $date_first_admission; | ||
| 119 | /** | ||
| 120 | * The date_latest_name_registration | ||
| 121 | * @var string | ||
| 122 | */ | ||
| 123 | public $date_latest_name_registration; | ||
| 124 | /** | ||
| 125 | * The apk_due_date | ||
| 126 | * @var string | ||
| 127 | */ | ||
| 128 | public $apk_due_date; | ||
| 129 | /** | ||
| 130 | * Constructor method for Car | ||
| 131 | * @uses Car::setLicense_plate() | ||
| 132 | * @uses Car::setCategory() | ||
| 133 | * @uses Car::setBrand() | ||
| 134 | * @uses Car::setModel() | ||
| 135 | * @uses Car::setColors() | ||
| 136 | * @uses Car::setFuel_type() | ||
| 137 | * @uses Car::setCylinders() | ||
| 138 | * @uses Car::setCylinder_capacity() | ||
| 139 | * @uses Car::setSeats() | ||
| 140 | * @uses Car::setStanding_room() | ||
| 141 | * @uses Car::setUnladen_mass() | ||
| 142 | * @uses Car::setGross_vehicle_mass() | ||
| 143 | * @uses Car::setMass_ready() | ||
| 144 | * @uses Car::setMaximum_mass_payload() | ||
| 145 | * @uses Car::setMaximum_mass_unbraked() | ||
| 146 | * @uses Car::setMaximum_mass_braked() | ||
| 147 | * @uses Car::setMaximum_mass_trailer_braked() | ||
| 148 | * @uses Car::setMaximum_mass_self_braked() | ||
| 149 | * @uses Car::setMaximum_mass_axle_braked() | ||
| 150 | * @uses Car::setDate_first_issuing() | ||
| 151 | * @uses Car::setDate_first_admission() | ||
| 152 | * @uses Car::setDate_latest_name_registration() | ||
| 153 | * @uses Car::setApk_due_date() | ||
| 154 | * @param string $license_plate | ||
| 155 | * @param string $category | ||
| 156 | * @param string $brand | ||
| 157 | * @param string $model | ||
| 158 | * @param string $colors | ||
| 159 | * @param string $fuel_type | ||
| 160 | * @param int $cylinders | ||
| 161 | * @param int $cylinder_capacity | ||
| 162 | * @param int $seats | ||
| 163 | * @param int $standing_room | ||
| 164 | * @param int $unladen_mass | ||
| 165 | * @param int $gross_vehicle_mass | ||
| 166 | * @param int $mass_ready | ||
| 167 | * @param int $maximum_mass_payload | ||
| 168 | * @param int $maximum_mass_unbraked | ||
| 169 | * @param int $maximum_mass_braked | ||
| 170 | * @param int $maximum_mass_trailer_braked | ||
| 171 | * @param int $maximum_mass_self_braked | ||
| 172 | * @param int $maximum_mass_axle_braked | ||
| 173 | * @param string $date_first_issuing | ||
| 174 | * @param string $date_first_admission | ||
| 175 | * @param string $date_latest_name_registration | ||
| 176 | * @param string $apk_due_date | ||
| 177 | */ | ||
| 178 | public function __construct($license_plate = null, $category = null, $brand = null, $model = null, $colors = null, $fuel_type = null, $cylinders = null, $cylinder_capacity = null, $seats = null, $standing_room = null, $unladen_mass = null, $gross_vehicle_mass = null, $mass_ready = null, $maximum_mass_payload = null, $maximum_mass_unbraked = null, $maximum_mass_braked = null, $maximum_mass_trailer_braked = null, $maximum_mass_self_braked = null, $maximum_mass_axle_braked = null, $date_first_issuing = null, $date_first_admission = null, $date_latest_name_registration = null, $apk_due_date = null) | ||
| 179 |     { | ||
| 180 | $this | ||
| 181 | ->setLicense_plate($license_plate) | ||
| 182 | ->setCategory($category) | ||
| 183 | ->setBrand($brand) | ||
| 184 | ->setModel($model) | ||
| 185 | ->setColors($colors) | ||
| 186 | ->setFuel_type($fuel_type) | ||
| 187 | ->setCylinders($cylinders) | ||
| 188 | ->setCylinder_capacity($cylinder_capacity) | ||
| 189 | ->setSeats($seats) | ||
| 190 | ->setStanding_room($standing_room) | ||
| 191 | ->setUnladen_mass($unladen_mass) | ||
| 192 | ->setGross_vehicle_mass($gross_vehicle_mass) | ||
| 193 | ->setMass_ready($mass_ready) | ||
| 194 | ->setMaximum_mass_payload($maximum_mass_payload) | ||
| 195 | ->setMaximum_mass_unbraked($maximum_mass_unbraked) | ||
| 196 | ->setMaximum_mass_braked($maximum_mass_braked) | ||
| 197 | ->setMaximum_mass_trailer_braked($maximum_mass_trailer_braked) | ||
| 198 | ->setMaximum_mass_self_braked($maximum_mass_self_braked) | ||
| 199 | ->setMaximum_mass_axle_braked($maximum_mass_axle_braked) | ||
| 200 | ->setDate_first_issuing($date_first_issuing) | ||
| 201 | ->setDate_first_admission($date_first_admission) | ||
| 202 | ->setDate_latest_name_registration($date_latest_name_registration) | ||
| 203 | ->setApk_due_date($apk_due_date); | ||
| 204 | } | ||
| 205 | /** | ||
| 206 | * Get license_plate value | ||
| 207 | * @return string|null | ||
| 208 | */ | ||
| 209 | public function getLicense_plate() | ||
| 210 |     { | ||
| 211 | return $this->license_plate; | ||
| 212 | } | ||
| 213 | /** | ||
| 214 | * Set license_plate value | ||
| 215 | * @param string $license_plate | ||
| 216 | * @return \Webservices\StructType\Car | ||
| 217 | */ | ||
| 218 | public function setLicense_plate($license_plate = null) | ||
| 219 |     { | ||
| 220 | // validation for constraint: string | ||
| 221 |         if (!is_null($license_plate) && !is_string($license_plate)) { | ||
|  | |||
| 222 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($license_plate)), __LINE__); | ||
| 223 | } | ||
| 224 | $this->license_plate = $license_plate; | ||
| 225 | return $this; | ||
| 226 | } | ||
| 227 | /** | ||
| 228 | * Get category value | ||
| 229 | * @return string|null | ||
| 230 | */ | ||
| 231 | public function getCategory() | ||
| 232 |     { | ||
| 233 | return $this->category; | ||
| 234 | } | ||
| 235 | /** | ||
| 236 | * Set category value | ||
| 237 | * @param string $category | ||
| 238 | * @return \Webservices\StructType\Car | ||
| 239 | */ | ||
| 240 | public function setCategory($category = null) | ||
| 241 |     { | ||
| 242 | // validation for constraint: string | ||
| 243 |         if (!is_null($category) && !is_string($category)) { | ||
| 244 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($category)), __LINE__); | ||
| 245 | } | ||
| 246 | $this->category = $category; | ||
| 247 | return $this; | ||
| 248 | } | ||
| 249 | /** | ||
| 250 | * Get brand value | ||
| 251 | * @return string|null | ||
| 252 | */ | ||
| 253 | public function getBrand() | ||
| 254 |     { | ||
| 255 | return $this->brand; | ||
| 256 | } | ||
| 257 | /** | ||
| 258 | * Set brand value | ||
| 259 | * @param string $brand | ||
| 260 | * @return \Webservices\StructType\Car | ||
| 261 | */ | ||
| 262 | public function setBrand($brand = null) | ||
| 263 |     { | ||
| 264 | // validation for constraint: string | ||
| 265 |         if (!is_null($brand) && !is_string($brand)) { | ||
| 266 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($brand)), __LINE__); | ||
| 267 | } | ||
| 268 | $this->brand = $brand; | ||
| 269 | return $this; | ||
| 270 | } | ||
| 271 | /** | ||
| 272 | * Get model value | ||
| 273 | * @return string|null | ||
| 274 | */ | ||
| 275 | public function getModel() | ||
| 276 |     { | ||
| 277 | return $this->model; | ||
| 278 | } | ||
| 279 | /** | ||
| 280 | * Set model value | ||
| 281 | * @param string $model | ||
| 282 | * @return \Webservices\StructType\Car | ||
| 283 | */ | ||
| 284 | public function setModel($model = null) | ||
| 285 |     { | ||
| 286 | // validation for constraint: string | ||
| 287 |         if (!is_null($model) && !is_string($model)) { | ||
| 288 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($model)), __LINE__); | ||
| 289 | } | ||
| 290 | $this->model = $model; | ||
| 291 | return $this; | ||
| 292 | } | ||
| 293 | /** | ||
| 294 | * Get colors value | ||
| 295 | * @return string|null | ||
| 296 | */ | ||
| 297 | public function getColors() | ||
| 298 |     { | ||
| 299 | return $this->colors; | ||
| 300 | } | ||
| 301 | /** | ||
| 302 | * Set colors value | ||
| 303 | * @param string $colors | ||
| 304 | * @return \Webservices\StructType\Car | ||
| 305 | */ | ||
| 306 | public function setColors($colors = null) | ||
| 307 |     { | ||
| 308 | // validation for constraint: string | ||
| 309 |         if (!is_null($colors) && !is_string($colors)) { | ||
| 310 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($colors)), __LINE__); | ||
| 311 | } | ||
| 312 | $this->colors = $colors; | ||
| 313 | return $this; | ||
| 314 | } | ||
| 315 | /** | ||
| 316 | * Get fuel_type value | ||
| 317 | * @return string|null | ||
| 318 | */ | ||
| 319 | public function getFuel_type() | ||
| 320 |     { | ||
| 321 | return $this->fuel_type; | ||
| 322 | } | ||
| 323 | /** | ||
| 324 | * Set fuel_type value | ||
| 325 | * @param string $fuel_type | ||
| 326 | * @return \Webservices\StructType\Car | ||
| 327 | */ | ||
| 328 | public function setFuel_type($fuel_type = null) | ||
| 329 |     { | ||
| 330 | // validation for constraint: string | ||
| 331 |         if (!is_null($fuel_type) && !is_string($fuel_type)) { | ||
| 332 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($fuel_type)), __LINE__); | ||
| 333 | } | ||
| 334 | $this->fuel_type = $fuel_type; | ||
| 335 | return $this; | ||
| 336 | } | ||
| 337 | /** | ||
| 338 | * Get cylinders value | ||
| 339 | * @return int|null | ||
| 340 | */ | ||
| 341 | public function getCylinders() | ||
| 342 |     { | ||
| 343 | return $this->cylinders; | ||
| 344 | } | ||
| 345 | /** | ||
| 346 | * Set cylinders value | ||
| 347 | * @param int $cylinders | ||
| 348 | * @return \Webservices\StructType\Car | ||
| 349 | */ | ||
| 350 | public function setCylinders($cylinders = null) | ||
| 358 | } | ||
| 359 | /** | ||
| 360 | * Get cylinder_capacity value | ||
| 361 | * @return int|null | ||
| 362 | */ | ||
| 363 | public function getCylinder_capacity() | ||
| 364 |     { | ||
| 365 | return $this->cylinder_capacity; | ||
| 366 | } | ||
| 367 | /** | ||
| 368 | * Set cylinder_capacity value | ||
| 369 | * @param int $cylinder_capacity | ||
| 370 | * @return \Webservices\StructType\Car | ||
| 371 | */ | ||
| 372 | public function setCylinder_capacity($cylinder_capacity = null) | ||
| 373 |     { | ||
| 374 | // validation for constraint: int | ||
| 375 |         if (!is_null($cylinder_capacity) && !is_numeric($cylinder_capacity)) { | ||
| 376 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($cylinder_capacity)), __LINE__); | ||
| 377 | } | ||
| 378 | $this->cylinder_capacity = $cylinder_capacity; | ||
| 379 | return $this; | ||
| 380 | } | ||
| 381 | /** | ||
| 382 | * Get seats value | ||
| 383 | * @return int|null | ||
| 384 | */ | ||
| 385 | public function getSeats() | ||
| 386 |     { | ||
| 387 | return $this->seats; | ||
| 388 | } | ||
| 389 | /** | ||
| 390 | * Set seats value | ||
| 391 | * @param int $seats | ||
| 392 | * @return \Webservices\StructType\Car | ||
| 393 | */ | ||
| 394 | public function setSeats($seats = null) | ||
| 395 |     { | ||
| 396 | // validation for constraint: int | ||
| 397 |         if (!is_null($seats) && !is_numeric($seats)) { | ||
| 398 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($seats)), __LINE__); | ||
| 399 | } | ||
| 400 | $this->seats = $seats; | ||
| 401 | return $this; | ||
| 402 | } | ||
| 403 | /** | ||
| 404 | * Get standing_room value | ||
| 405 | * @return int|null | ||
| 406 | */ | ||
| 407 | public function getStanding_room() | ||
| 408 |     { | ||
| 409 | return $this->standing_room; | ||
| 410 | } | ||
| 411 | /** | ||
| 412 | * Set standing_room value | ||
| 413 | * @param int $standing_room | ||
| 414 | * @return \Webservices\StructType\Car | ||
| 415 | */ | ||
| 416 | public function setStanding_room($standing_room = null) | ||
| 417 |     { | ||
| 418 | // validation for constraint: int | ||
| 419 |         if (!is_null($standing_room) && !is_numeric($standing_room)) { | ||
| 420 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($standing_room)), __LINE__); | ||
| 421 | } | ||
| 422 | $this->standing_room = $standing_room; | ||
| 423 | return $this; | ||
| 424 | } | ||
| 425 | /** | ||
| 426 | * Get unladen_mass value | ||
| 427 | * @return int|null | ||
| 428 | */ | ||
| 429 | public function getUnladen_mass() | ||
| 430 |     { | ||
| 431 | return $this->unladen_mass; | ||
| 432 | } | ||
| 433 | /** | ||
| 434 | * Set unladen_mass value | ||
| 435 | * @param int $unladen_mass | ||
| 436 | * @return \Webservices\StructType\Car | ||
| 437 | */ | ||
| 438 | public function setUnladen_mass($unladen_mass = null) | ||
| 439 |     { | ||
| 440 | // validation for constraint: int | ||
| 441 |         if (!is_null($unladen_mass) && !is_numeric($unladen_mass)) { | ||
| 442 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($unladen_mass)), __LINE__); | ||
| 443 | } | ||
| 444 | $this->unladen_mass = $unladen_mass; | ||
| 445 | return $this; | ||
| 446 | } | ||
| 447 | /** | ||
| 448 | * Get gross_vehicle_mass value | ||
| 449 | * @return int|null | ||
| 450 | */ | ||
| 451 | public function getGross_vehicle_mass() | ||
| 452 |     { | ||
| 453 | return $this->gross_vehicle_mass; | ||
| 454 | } | ||
| 455 | /** | ||
| 456 | * Set gross_vehicle_mass value | ||
| 457 | * @param int $gross_vehicle_mass | ||
| 458 | * @return \Webservices\StructType\Car | ||
| 459 | */ | ||
| 460 | public function setGross_vehicle_mass($gross_vehicle_mass = null) | ||
| 461 |     { | ||
| 462 | // validation for constraint: int | ||
| 463 |         if (!is_null($gross_vehicle_mass) && !is_numeric($gross_vehicle_mass)) { | ||
| 464 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($gross_vehicle_mass)), __LINE__); | ||
| 465 | } | ||
| 466 | $this->gross_vehicle_mass = $gross_vehicle_mass; | ||
| 467 | return $this; | ||
| 468 | } | ||
| 469 | /** | ||
| 470 | * Get mass_ready value | ||
| 471 | * @return int|null | ||
| 472 | */ | ||
| 473 | public function getMass_ready() | ||
| 474 |     { | ||
| 475 | return $this->mass_ready; | ||
| 476 | } | ||
| 477 | /** | ||
| 478 | * Set mass_ready value | ||
| 479 | * @param int $mass_ready | ||
| 480 | * @return \Webservices\StructType\Car | ||
| 481 | */ | ||
| 482 | public function setMass_ready($mass_ready = null) | ||
| 483 |     { | ||
| 484 | // validation for constraint: int | ||
| 485 |         if (!is_null($mass_ready) && !is_numeric($mass_ready)) { | ||
| 486 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($mass_ready)), __LINE__); | ||
| 487 | } | ||
| 488 | $this->mass_ready = $mass_ready; | ||
| 489 | return $this; | ||
| 490 | } | ||
| 491 | /** | ||
| 492 | * Get maximum_mass_payload value | ||
| 493 | * @return int|null | ||
| 494 | */ | ||
| 495 | public function getMaximum_mass_payload() | ||
| 496 |     { | ||
| 497 | return $this->maximum_mass_payload; | ||
| 498 | } | ||
| 499 | /** | ||
| 500 | * Set maximum_mass_payload value | ||
| 501 | * @param int $maximum_mass_payload | ||
| 502 | * @return \Webservices\StructType\Car | ||
| 503 | */ | ||
| 504 | public function setMaximum_mass_payload($maximum_mass_payload = null) | ||
| 505 |     { | ||
| 506 | // validation for constraint: int | ||
| 507 |         if (!is_null($maximum_mass_payload) && !is_numeric($maximum_mass_payload)) { | ||
| 508 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_payload)), __LINE__); | ||
| 509 | } | ||
| 510 | $this->maximum_mass_payload = $maximum_mass_payload; | ||
| 511 | return $this; | ||
| 512 | } | ||
| 513 | /** | ||
| 514 | * Get maximum_mass_unbraked value | ||
| 515 | * @return int|null | ||
| 516 | */ | ||
| 517 | public function getMaximum_mass_unbraked() | ||
| 518 |     { | ||
| 519 | return $this->maximum_mass_unbraked; | ||
| 520 | } | ||
| 521 | /** | ||
| 522 | * Set maximum_mass_unbraked value | ||
| 523 | * @param int $maximum_mass_unbraked | ||
| 524 | * @return \Webservices\StructType\Car | ||
| 525 | */ | ||
| 526 | public function setMaximum_mass_unbraked($maximum_mass_unbraked = null) | ||
| 527 |     { | ||
| 528 | // validation for constraint: int | ||
| 529 |         if (!is_null($maximum_mass_unbraked) && !is_numeric($maximum_mass_unbraked)) { | ||
| 530 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_unbraked)), __LINE__); | ||
| 531 | } | ||
| 532 | $this->maximum_mass_unbraked = $maximum_mass_unbraked; | ||
| 533 | return $this; | ||
| 534 | } | ||
| 535 | /** | ||
| 536 | * Get maximum_mass_braked value | ||
| 537 | * @return int|null | ||
| 538 | */ | ||
| 539 | public function getMaximum_mass_braked() | ||
| 540 |     { | ||
| 541 | return $this->maximum_mass_braked; | ||
| 542 | } | ||
| 543 | /** | ||
| 544 | * Set maximum_mass_braked value | ||
| 545 | * @param int $maximum_mass_braked | ||
| 546 | * @return \Webservices\StructType\Car | ||
| 547 | */ | ||
| 548 | public function setMaximum_mass_braked($maximum_mass_braked = null) | ||
| 549 |     { | ||
| 550 | // validation for constraint: int | ||
| 551 |         if (!is_null($maximum_mass_braked) && !is_numeric($maximum_mass_braked)) { | ||
| 552 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_braked)), __LINE__); | ||
| 553 | } | ||
| 554 | $this->maximum_mass_braked = $maximum_mass_braked; | ||
| 555 | return $this; | ||
| 556 | } | ||
| 557 | /** | ||
| 558 | * Get maximum_mass_trailer_braked value | ||
| 559 | * @return int|null | ||
| 560 | */ | ||
| 561 | public function getMaximum_mass_trailer_braked() | ||
| 562 |     { | ||
| 563 | return $this->maximum_mass_trailer_braked; | ||
| 564 | } | ||
| 565 | /** | ||
| 566 | * Set maximum_mass_trailer_braked value | ||
| 567 | * @param int $maximum_mass_trailer_braked | ||
| 568 | * @return \Webservices\StructType\Car | ||
| 569 | */ | ||
| 570 | public function setMaximum_mass_trailer_braked($maximum_mass_trailer_braked = null) | ||
| 571 |     { | ||
| 572 | // validation for constraint: int | ||
| 573 |         if (!is_null($maximum_mass_trailer_braked) && !is_numeric($maximum_mass_trailer_braked)) { | ||
| 574 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_trailer_braked)), __LINE__); | ||
| 575 | } | ||
| 576 | $this->maximum_mass_trailer_braked = $maximum_mass_trailer_braked; | ||
| 577 | return $this; | ||
| 578 | } | ||
| 579 | /** | ||
| 580 | * Get maximum_mass_self_braked value | ||
| 581 | * @return int|null | ||
| 582 | */ | ||
| 583 | public function getMaximum_mass_self_braked() | ||
| 584 |     { | ||
| 585 | return $this->maximum_mass_self_braked; | ||
| 586 | } | ||
| 587 | /** | ||
| 588 | * Set maximum_mass_self_braked value | ||
| 589 | * @param int $maximum_mass_self_braked | ||
| 590 | * @return \Webservices\StructType\Car | ||
| 591 | */ | ||
| 592 | public function setMaximum_mass_self_braked($maximum_mass_self_braked = null) | ||
| 593 |     { | ||
| 594 | // validation for constraint: int | ||
| 595 |         if (!is_null($maximum_mass_self_braked) && !is_numeric($maximum_mass_self_braked)) { | ||
| 596 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_self_braked)), __LINE__); | ||
| 597 | } | ||
| 598 | $this->maximum_mass_self_braked = $maximum_mass_self_braked; | ||
| 599 | return $this; | ||
| 600 | } | ||
| 601 | /** | ||
| 602 | * Get maximum_mass_axle_braked value | ||
| 603 | * @return int|null | ||
| 604 | */ | ||
| 605 | public function getMaximum_mass_axle_braked() | ||
| 606 |     { | ||
| 607 | return $this->maximum_mass_axle_braked; | ||
| 608 | } | ||
| 609 | /** | ||
| 610 | * Set maximum_mass_axle_braked value | ||
| 611 | * @param int $maximum_mass_axle_braked | ||
| 612 | * @return \Webservices\StructType\Car | ||
| 613 | */ | ||
| 614 | public function setMaximum_mass_axle_braked($maximum_mass_axle_braked = null) | ||
| 615 |     { | ||
| 616 | // validation for constraint: int | ||
| 617 |         if (!is_null($maximum_mass_axle_braked) && !is_numeric($maximum_mass_axle_braked)) { | ||
| 618 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_axle_braked)), __LINE__); | ||
| 619 | } | ||
| 620 | $this->maximum_mass_axle_braked = $maximum_mass_axle_braked; | ||
| 621 | return $this; | ||
| 622 | } | ||
| 623 | /** | ||
| 624 | * Get date_first_issuing value | ||
| 625 | * @return string|null | ||
| 626 | */ | ||
| 627 | public function getDate_first_issuing() | ||
| 628 |     { | ||
| 629 | return $this->date_first_issuing; | ||
| 630 | } | ||
| 631 | /** | ||
| 632 | * Set date_first_issuing value | ||
| 633 | * @param string $date_first_issuing | ||
| 634 | * @return \Webservices\StructType\Car | ||
| 635 | */ | ||
| 636 | public function setDate_first_issuing($date_first_issuing = null) | ||
| 637 |     { | ||
| 638 | // validation for constraint: string | ||
| 639 |         if (!is_null($date_first_issuing) && !is_string($date_first_issuing)) { | ||
| 640 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($date_first_issuing)), __LINE__); | ||
| 641 | } | ||
| 642 | $this->date_first_issuing = $date_first_issuing; | ||
| 643 | return $this; | ||
| 644 | } | ||
| 645 | /** | ||
| 646 | * Get date_first_admission value | ||
| 647 | * @return string|null | ||
| 648 | */ | ||
| 649 | public function getDate_first_admission() | ||
| 650 |     { | ||
| 651 | return $this->date_first_admission; | ||
| 652 | } | ||
| 653 | /** | ||
| 654 | * Set date_first_admission value | ||
| 655 | * @param string $date_first_admission | ||
| 656 | * @return \Webservices\StructType\Car | ||
| 657 | */ | ||
| 658 | public function setDate_first_admission($date_first_admission = null) | ||
| 659 |     { | ||
| 660 | // validation for constraint: string | ||
| 661 |         if (!is_null($date_first_admission) && !is_string($date_first_admission)) { | ||
| 662 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($date_first_admission)), __LINE__); | ||
| 663 | } | ||
| 664 | $this->date_first_admission = $date_first_admission; | ||
| 665 | return $this; | ||
| 666 | } | ||
| 667 | /** | ||
| 668 | * Get date_latest_name_registration value | ||
| 669 | * @return string|null | ||
| 670 | */ | ||
| 671 | public function getDate_latest_name_registration() | ||
| 672 |     { | ||
| 673 | return $this->date_latest_name_registration; | ||
| 674 | } | ||
| 675 | /** | ||
| 676 | * Set date_latest_name_registration value | ||
| 677 | * @param string $date_latest_name_registration | ||
| 678 | * @return \Webservices\StructType\Car | ||
| 679 | */ | ||
| 680 | public function setDate_latest_name_registration($date_latest_name_registration = null) | ||
| 688 | } | ||
| 689 | /** | ||
| 690 | * Get apk_due_date value | ||
| 691 | * @return string|null | ||
| 692 | */ | ||
| 693 | public function getApk_due_date() | ||
| 694 |     { | ||
| 695 | return $this->apk_due_date; | ||
| 696 | } | ||
| 697 | /** | ||
| 698 | * Set apk_due_date value | ||
| 699 | * @param string $apk_due_date | ||
| 700 | * @return \Webservices\StructType\Car | ||
| 701 | */ | ||
| 702 | public function setApk_due_date($apk_due_date = null) | ||
| 703 |     { | ||
| 704 | // validation for constraint: string | ||
| 705 |         if (!is_null($apk_due_date) && !is_string($apk_due_date)) { | ||
| 706 |             throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($apk_due_date)), __LINE__); | ||
| 707 | } | ||
| 708 | $this->apk_due_date = $apk_due_date; | ||
| 709 | return $this; | ||
| 710 | } | ||
| 711 | /** | ||
| 712 | * Method called when an object has been exported with var_export() functions | ||
| 713 | * It allows to return an object instantiated with the values | ||
| 714 | * @see AbstractStructBase::__set_state() | ||
| 715 | * @uses AbstractStructBase::__set_state() | ||
| 716 | * @param array $array the exported values | ||
| 717 | * @return \Webservices\StructType\Car | ||
| 718 | */ | ||
| 719 | public static function __set_state(array $array) | ||
| 720 |     { | ||
| 721 | return parent::__set_state($array); | ||
| 722 | } | ||
| 723 | /** | ||
| 724 | * Method returning the class name | ||
| 725 | * @return string __CLASS__ | ||
| 726 | */ | ||
| 727 | public function __toString() | ||
| 730 | } | ||
| 731 | } | ||
| 732 |