| Total Complexity | 99 |
| Total Lines | 748 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like CarV3 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 CarV3, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 12 | class CarV3 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 | * The co2_emission |
||
| 131 | * @var int |
||
| 132 | */ |
||
| 133 | public $co2_emission; |
||
| 134 | /** |
||
| 135 | * Constructor method for CarV3 |
||
| 136 | * @uses CarV3::setLicense_plate() |
||
| 137 | * @uses CarV3::setCategory() |
||
| 138 | * @uses CarV3::setBrand() |
||
| 139 | * @uses CarV3::setModel() |
||
| 140 | * @uses CarV3::setColors() |
||
| 141 | * @uses CarV3::setFuel_type() |
||
| 142 | * @uses CarV3::setCylinders() |
||
| 143 | * @uses CarV3::setCylinder_capacity() |
||
| 144 | * @uses CarV3::setSeats() |
||
| 145 | * @uses CarV3::setStanding_room() |
||
| 146 | * @uses CarV3::setUnladen_mass() |
||
| 147 | * @uses CarV3::setGross_vehicle_mass() |
||
| 148 | * @uses CarV3::setMass_ready() |
||
| 149 | * @uses CarV3::setMaximum_mass_payload() |
||
| 150 | * @uses CarV3::setMaximum_mass_unbraked() |
||
| 151 | * @uses CarV3::setMaximum_mass_braked() |
||
| 152 | * @uses CarV3::setMaximum_mass_trailer_braked() |
||
| 153 | * @uses CarV3::setMaximum_mass_self_braked() |
||
| 154 | * @uses CarV3::setMaximum_mass_axle_braked() |
||
| 155 | * @uses CarV3::setDate_first_issuing() |
||
| 156 | * @uses CarV3::setDate_first_admission() |
||
| 157 | * @uses CarV3::setDate_latest_name_registration() |
||
| 158 | * @uses CarV3::setApk_due_date() |
||
| 159 | * @uses CarV3::setCo2_emission() |
||
| 160 | * @param string $license_plate |
||
| 161 | * @param string $category |
||
| 162 | * @param string $brand |
||
| 163 | * @param string $model |
||
| 164 | * @param string $colors |
||
| 165 | * @param string $fuel_type |
||
| 166 | * @param int $cylinders |
||
| 167 | * @param int $cylinder_capacity |
||
| 168 | * @param int $seats |
||
| 169 | * @param int $standing_room |
||
| 170 | * @param int $unladen_mass |
||
| 171 | * @param int $gross_vehicle_mass |
||
| 172 | * @param int $mass_ready |
||
| 173 | * @param int $maximum_mass_payload |
||
| 174 | * @param int $maximum_mass_unbraked |
||
| 175 | * @param int $maximum_mass_braked |
||
| 176 | * @param int $maximum_mass_trailer_braked |
||
| 177 | * @param int $maximum_mass_self_braked |
||
| 178 | * @param int $maximum_mass_axle_braked |
||
| 179 | * @param string $date_first_issuing |
||
| 180 | * @param string $date_first_admission |
||
| 181 | * @param string $date_latest_name_registration |
||
| 182 | * @param string $apk_due_date |
||
| 183 | * @param int $co2_emission |
||
| 184 | */ |
||
| 185 | 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, $co2_emission = null) |
||
| 186 | { |
||
| 187 | $this |
||
| 188 | ->setLicense_plate($license_plate) |
||
| 189 | ->setCategory($category) |
||
| 190 | ->setBrand($brand) |
||
| 191 | ->setModel($model) |
||
| 192 | ->setColors($colors) |
||
| 193 | ->setFuel_type($fuel_type) |
||
| 194 | ->setCylinders($cylinders) |
||
| 195 | ->setCylinder_capacity($cylinder_capacity) |
||
| 196 | ->setSeats($seats) |
||
| 197 | ->setStanding_room($standing_room) |
||
| 198 | ->setUnladen_mass($unladen_mass) |
||
| 199 | ->setGross_vehicle_mass($gross_vehicle_mass) |
||
| 200 | ->setMass_ready($mass_ready) |
||
| 201 | ->setMaximum_mass_payload($maximum_mass_payload) |
||
| 202 | ->setMaximum_mass_unbraked($maximum_mass_unbraked) |
||
| 203 | ->setMaximum_mass_braked($maximum_mass_braked) |
||
| 204 | ->setMaximum_mass_trailer_braked($maximum_mass_trailer_braked) |
||
| 205 | ->setMaximum_mass_self_braked($maximum_mass_self_braked) |
||
| 206 | ->setMaximum_mass_axle_braked($maximum_mass_axle_braked) |
||
| 207 | ->setDate_first_issuing($date_first_issuing) |
||
| 208 | ->setDate_first_admission($date_first_admission) |
||
| 209 | ->setDate_latest_name_registration($date_latest_name_registration) |
||
| 210 | ->setApk_due_date($apk_due_date) |
||
| 211 | ->setCo2_emission($co2_emission); |
||
| 212 | } |
||
| 213 | /** |
||
| 214 | * Get license_plate value |
||
| 215 | * @return string|null |
||
| 216 | */ |
||
| 217 | public function getLicense_plate() |
||
| 218 | { |
||
| 219 | return $this->license_plate; |
||
| 220 | } |
||
| 221 | /** |
||
| 222 | * Set license_plate value |
||
| 223 | * @param string $license_plate |
||
| 224 | * @return \Webservices\StructType\CarV3 |
||
| 225 | */ |
||
| 226 | public function setLicense_plate($license_plate = null) |
||
| 227 | { |
||
| 228 | // validation for constraint: string |
||
| 229 | if (!is_null($license_plate) && !is_string($license_plate)) { |
||
|
|
|||
| 230 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($license_plate)), __LINE__); |
||
| 231 | } |
||
| 232 | $this->license_plate = $license_plate; |
||
| 233 | return $this; |
||
| 234 | } |
||
| 235 | /** |
||
| 236 | * Get category value |
||
| 237 | * @return string|null |
||
| 238 | */ |
||
| 239 | public function getCategory() |
||
| 240 | { |
||
| 241 | return $this->category; |
||
| 242 | } |
||
| 243 | /** |
||
| 244 | * Set category value |
||
| 245 | * @param string $category |
||
| 246 | * @return \Webservices\StructType\CarV3 |
||
| 247 | */ |
||
| 248 | public function setCategory($category = null) |
||
| 249 | { |
||
| 250 | // validation for constraint: string |
||
| 251 | if (!is_null($category) && !is_string($category)) { |
||
| 252 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($category)), __LINE__); |
||
| 253 | } |
||
| 254 | $this->category = $category; |
||
| 255 | return $this; |
||
| 256 | } |
||
| 257 | /** |
||
| 258 | * Get brand value |
||
| 259 | * @return string|null |
||
| 260 | */ |
||
| 261 | public function getBrand() |
||
| 264 | } |
||
| 265 | /** |
||
| 266 | * Set brand value |
||
| 267 | * @param string $brand |
||
| 268 | * @return \Webservices\StructType\CarV3 |
||
| 269 | */ |
||
| 270 | public function setBrand($brand = null) |
||
| 271 | { |
||
| 272 | // validation for constraint: string |
||
| 273 | if (!is_null($brand) && !is_string($brand)) { |
||
| 274 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($brand)), __LINE__); |
||
| 275 | } |
||
| 276 | $this->brand = $brand; |
||
| 277 | return $this; |
||
| 278 | } |
||
| 279 | /** |
||
| 280 | * Get model value |
||
| 281 | * @return string|null |
||
| 282 | */ |
||
| 283 | public function getModel() |
||
| 284 | { |
||
| 285 | return $this->model; |
||
| 286 | } |
||
| 287 | /** |
||
| 288 | * Set model value |
||
| 289 | * @param string $model |
||
| 290 | * @return \Webservices\StructType\CarV3 |
||
| 291 | */ |
||
| 292 | public function setModel($model = null) |
||
| 293 | { |
||
| 294 | // validation for constraint: string |
||
| 295 | if (!is_null($model) && !is_string($model)) { |
||
| 296 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($model)), __LINE__); |
||
| 297 | } |
||
| 298 | $this->model = $model; |
||
| 299 | return $this; |
||
| 300 | } |
||
| 301 | /** |
||
| 302 | * Get colors value |
||
| 303 | * @return string|null |
||
| 304 | */ |
||
| 305 | public function getColors() |
||
| 306 | { |
||
| 307 | return $this->colors; |
||
| 308 | } |
||
| 309 | /** |
||
| 310 | * Set colors value |
||
| 311 | * @param string $colors |
||
| 312 | * @return \Webservices\StructType\CarV3 |
||
| 313 | */ |
||
| 314 | public function setColors($colors = null) |
||
| 315 | { |
||
| 316 | // validation for constraint: string |
||
| 317 | if (!is_null($colors) && !is_string($colors)) { |
||
| 318 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($colors)), __LINE__); |
||
| 319 | } |
||
| 320 | $this->colors = $colors; |
||
| 321 | return $this; |
||
| 322 | } |
||
| 323 | /** |
||
| 324 | * Get fuel_type value |
||
| 325 | * @return string|null |
||
| 326 | */ |
||
| 327 | public function getFuel_type() |
||
| 328 | { |
||
| 329 | return $this->fuel_type; |
||
| 330 | } |
||
| 331 | /** |
||
| 332 | * Set fuel_type value |
||
| 333 | * @param string $fuel_type |
||
| 334 | * @return \Webservices\StructType\CarV3 |
||
| 335 | */ |
||
| 336 | public function setFuel_type($fuel_type = null) |
||
| 337 | { |
||
| 338 | // validation for constraint: string |
||
| 339 | if (!is_null($fuel_type) && !is_string($fuel_type)) { |
||
| 340 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($fuel_type)), __LINE__); |
||
| 341 | } |
||
| 342 | $this->fuel_type = $fuel_type; |
||
| 343 | return $this; |
||
| 344 | } |
||
| 345 | /** |
||
| 346 | * Get cylinders value |
||
| 347 | * @return int|null |
||
| 348 | */ |
||
| 349 | public function getCylinders() |
||
| 350 | { |
||
| 351 | return $this->cylinders; |
||
| 352 | } |
||
| 353 | /** |
||
| 354 | * Set cylinders value |
||
| 355 | * @param int $cylinders |
||
| 356 | * @return \Webservices\StructType\CarV3 |
||
| 357 | */ |
||
| 358 | public function setCylinders($cylinders = null) |
||
| 359 | { |
||
| 360 | // validation for constraint: int |
||
| 361 | if (!is_null($cylinders) && !is_numeric($cylinders)) { |
||
| 362 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($cylinders)), __LINE__); |
||
| 363 | } |
||
| 364 | $this->cylinders = $cylinders; |
||
| 365 | return $this; |
||
| 366 | } |
||
| 367 | /** |
||
| 368 | * Get cylinder_capacity value |
||
| 369 | * @return int|null |
||
| 370 | */ |
||
| 371 | public function getCylinder_capacity() |
||
| 372 | { |
||
| 373 | return $this->cylinder_capacity; |
||
| 374 | } |
||
| 375 | /** |
||
| 376 | * Set cylinder_capacity value |
||
| 377 | * @param int $cylinder_capacity |
||
| 378 | * @return \Webservices\StructType\CarV3 |
||
| 379 | */ |
||
| 380 | public function setCylinder_capacity($cylinder_capacity = null) |
||
| 381 | { |
||
| 382 | // validation for constraint: int |
||
| 383 | if (!is_null($cylinder_capacity) && !is_numeric($cylinder_capacity)) { |
||
| 384 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($cylinder_capacity)), __LINE__); |
||
| 385 | } |
||
| 386 | $this->cylinder_capacity = $cylinder_capacity; |
||
| 387 | return $this; |
||
| 388 | } |
||
| 389 | /** |
||
| 390 | * Get seats value |
||
| 391 | * @return int|null |
||
| 392 | */ |
||
| 393 | public function getSeats() |
||
| 394 | { |
||
| 395 | return $this->seats; |
||
| 396 | } |
||
| 397 | /** |
||
| 398 | * Set seats value |
||
| 399 | * @param int $seats |
||
| 400 | * @return \Webservices\StructType\CarV3 |
||
| 401 | */ |
||
| 402 | public function setSeats($seats = null) |
||
| 403 | { |
||
| 404 | // validation for constraint: int |
||
| 405 | if (!is_null($seats) && !is_numeric($seats)) { |
||
| 406 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($seats)), __LINE__); |
||
| 407 | } |
||
| 408 | $this->seats = $seats; |
||
| 409 | return $this; |
||
| 410 | } |
||
| 411 | /** |
||
| 412 | * Get standing_room value |
||
| 413 | * @return int|null |
||
| 414 | */ |
||
| 415 | public function getStanding_room() |
||
| 416 | { |
||
| 417 | return $this->standing_room; |
||
| 418 | } |
||
| 419 | /** |
||
| 420 | * Set standing_room value |
||
| 421 | * @param int $standing_room |
||
| 422 | * @return \Webservices\StructType\CarV3 |
||
| 423 | */ |
||
| 424 | public function setStanding_room($standing_room = null) |
||
| 425 | { |
||
| 426 | // validation for constraint: int |
||
| 427 | if (!is_null($standing_room) && !is_numeric($standing_room)) { |
||
| 428 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($standing_room)), __LINE__); |
||
| 429 | } |
||
| 430 | $this->standing_room = $standing_room; |
||
| 431 | return $this; |
||
| 432 | } |
||
| 433 | /** |
||
| 434 | * Get unladen_mass value |
||
| 435 | * @return int|null |
||
| 436 | */ |
||
| 437 | public function getUnladen_mass() |
||
| 438 | { |
||
| 439 | return $this->unladen_mass; |
||
| 440 | } |
||
| 441 | /** |
||
| 442 | * Set unladen_mass value |
||
| 443 | * @param int $unladen_mass |
||
| 444 | * @return \Webservices\StructType\CarV3 |
||
| 445 | */ |
||
| 446 | public function setUnladen_mass($unladen_mass = null) |
||
| 447 | { |
||
| 448 | // validation for constraint: int |
||
| 449 | if (!is_null($unladen_mass) && !is_numeric($unladen_mass)) { |
||
| 450 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($unladen_mass)), __LINE__); |
||
| 451 | } |
||
| 452 | $this->unladen_mass = $unladen_mass; |
||
| 453 | return $this; |
||
| 454 | } |
||
| 455 | /** |
||
| 456 | * Get gross_vehicle_mass value |
||
| 457 | * @return int|null |
||
| 458 | */ |
||
| 459 | public function getGross_vehicle_mass() |
||
| 460 | { |
||
| 461 | return $this->gross_vehicle_mass; |
||
| 462 | } |
||
| 463 | /** |
||
| 464 | * Set gross_vehicle_mass value |
||
| 465 | * @param int $gross_vehicle_mass |
||
| 466 | * @return \Webservices\StructType\CarV3 |
||
| 467 | */ |
||
| 468 | public function setGross_vehicle_mass($gross_vehicle_mass = null) |
||
| 469 | { |
||
| 470 | // validation for constraint: int |
||
| 471 | if (!is_null($gross_vehicle_mass) && !is_numeric($gross_vehicle_mass)) { |
||
| 472 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($gross_vehicle_mass)), __LINE__); |
||
| 473 | } |
||
| 474 | $this->gross_vehicle_mass = $gross_vehicle_mass; |
||
| 475 | return $this; |
||
| 476 | } |
||
| 477 | /** |
||
| 478 | * Get mass_ready value |
||
| 479 | * @return int|null |
||
| 480 | */ |
||
| 481 | public function getMass_ready() |
||
| 482 | { |
||
| 483 | return $this->mass_ready; |
||
| 484 | } |
||
| 485 | /** |
||
| 486 | * Set mass_ready value |
||
| 487 | * @param int $mass_ready |
||
| 488 | * @return \Webservices\StructType\CarV3 |
||
| 489 | */ |
||
| 490 | public function setMass_ready($mass_ready = null) |
||
| 491 | { |
||
| 492 | // validation for constraint: int |
||
| 493 | if (!is_null($mass_ready) && !is_numeric($mass_ready)) { |
||
| 494 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($mass_ready)), __LINE__); |
||
| 495 | } |
||
| 496 | $this->mass_ready = $mass_ready; |
||
| 497 | return $this; |
||
| 498 | } |
||
| 499 | /** |
||
| 500 | * Get maximum_mass_payload value |
||
| 501 | * @return int|null |
||
| 502 | */ |
||
| 503 | public function getMaximum_mass_payload() |
||
| 504 | { |
||
| 505 | return $this->maximum_mass_payload; |
||
| 506 | } |
||
| 507 | /** |
||
| 508 | * Set maximum_mass_payload value |
||
| 509 | * @param int $maximum_mass_payload |
||
| 510 | * @return \Webservices\StructType\CarV3 |
||
| 511 | */ |
||
| 512 | public function setMaximum_mass_payload($maximum_mass_payload = null) |
||
| 513 | { |
||
| 514 | // validation for constraint: int |
||
| 515 | if (!is_null($maximum_mass_payload) && !is_numeric($maximum_mass_payload)) { |
||
| 516 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_payload)), __LINE__); |
||
| 517 | } |
||
| 518 | $this->maximum_mass_payload = $maximum_mass_payload; |
||
| 519 | return $this; |
||
| 520 | } |
||
| 521 | /** |
||
| 522 | * Get maximum_mass_unbraked value |
||
| 523 | * @return int|null |
||
| 524 | */ |
||
| 525 | public function getMaximum_mass_unbraked() |
||
| 528 | } |
||
| 529 | /** |
||
| 530 | * Set maximum_mass_unbraked value |
||
| 531 | * @param int $maximum_mass_unbraked |
||
| 532 | * @return \Webservices\StructType\CarV3 |
||
| 533 | */ |
||
| 534 | public function setMaximum_mass_unbraked($maximum_mass_unbraked = null) |
||
| 535 | { |
||
| 536 | // validation for constraint: int |
||
| 537 | if (!is_null($maximum_mass_unbraked) && !is_numeric($maximum_mass_unbraked)) { |
||
| 538 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_unbraked)), __LINE__); |
||
| 539 | } |
||
| 540 | $this->maximum_mass_unbraked = $maximum_mass_unbraked; |
||
| 541 | return $this; |
||
| 542 | } |
||
| 543 | /** |
||
| 544 | * Get maximum_mass_braked value |
||
| 545 | * @return int|null |
||
| 546 | */ |
||
| 547 | public function getMaximum_mass_braked() |
||
| 548 | { |
||
| 549 | return $this->maximum_mass_braked; |
||
| 550 | } |
||
| 551 | /** |
||
| 552 | * Set maximum_mass_braked value |
||
| 553 | * @param int $maximum_mass_braked |
||
| 554 | * @return \Webservices\StructType\CarV3 |
||
| 555 | */ |
||
| 556 | public function setMaximum_mass_braked($maximum_mass_braked = null) |
||
| 557 | { |
||
| 558 | // validation for constraint: int |
||
| 559 | if (!is_null($maximum_mass_braked) && !is_numeric($maximum_mass_braked)) { |
||
| 560 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_braked)), __LINE__); |
||
| 561 | } |
||
| 562 | $this->maximum_mass_braked = $maximum_mass_braked; |
||
| 563 | return $this; |
||
| 564 | } |
||
| 565 | /** |
||
| 566 | * Get maximum_mass_trailer_braked value |
||
| 567 | * @return int|null |
||
| 568 | */ |
||
| 569 | public function getMaximum_mass_trailer_braked() |
||
| 570 | { |
||
| 571 | return $this->maximum_mass_trailer_braked; |
||
| 572 | } |
||
| 573 | /** |
||
| 574 | * Set maximum_mass_trailer_braked value |
||
| 575 | * @param int $maximum_mass_trailer_braked |
||
| 576 | * @return \Webservices\StructType\CarV3 |
||
| 577 | */ |
||
| 578 | public function setMaximum_mass_trailer_braked($maximum_mass_trailer_braked = null) |
||
| 579 | { |
||
| 580 | // validation for constraint: int |
||
| 581 | if (!is_null($maximum_mass_trailer_braked) && !is_numeric($maximum_mass_trailer_braked)) { |
||
| 582 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_trailer_braked)), __LINE__); |
||
| 583 | } |
||
| 584 | $this->maximum_mass_trailer_braked = $maximum_mass_trailer_braked; |
||
| 585 | return $this; |
||
| 586 | } |
||
| 587 | /** |
||
| 588 | * Get maximum_mass_self_braked value |
||
| 589 | * @return int|null |
||
| 590 | */ |
||
| 591 | public function getMaximum_mass_self_braked() |
||
| 592 | { |
||
| 593 | return $this->maximum_mass_self_braked; |
||
| 594 | } |
||
| 595 | /** |
||
| 596 | * Set maximum_mass_self_braked value |
||
| 597 | * @param int $maximum_mass_self_braked |
||
| 598 | * @return \Webservices\StructType\CarV3 |
||
| 599 | */ |
||
| 600 | public function setMaximum_mass_self_braked($maximum_mass_self_braked = null) |
||
| 601 | { |
||
| 602 | // validation for constraint: int |
||
| 603 | if (!is_null($maximum_mass_self_braked) && !is_numeric($maximum_mass_self_braked)) { |
||
| 604 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_self_braked)), __LINE__); |
||
| 605 | } |
||
| 606 | $this->maximum_mass_self_braked = $maximum_mass_self_braked; |
||
| 607 | return $this; |
||
| 608 | } |
||
| 609 | /** |
||
| 610 | * Get maximum_mass_axle_braked value |
||
| 611 | * @return int|null |
||
| 612 | */ |
||
| 613 | public function getMaximum_mass_axle_braked() |
||
| 614 | { |
||
| 615 | return $this->maximum_mass_axle_braked; |
||
| 616 | } |
||
| 617 | /** |
||
| 618 | * Set maximum_mass_axle_braked value |
||
| 619 | * @param int $maximum_mass_axle_braked |
||
| 620 | * @return \Webservices\StructType\CarV3 |
||
| 621 | */ |
||
| 622 | public function setMaximum_mass_axle_braked($maximum_mass_axle_braked = null) |
||
| 623 | { |
||
| 624 | // validation for constraint: int |
||
| 625 | if (!is_null($maximum_mass_axle_braked) && !is_numeric($maximum_mass_axle_braked)) { |
||
| 626 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maximum_mass_axle_braked)), __LINE__); |
||
| 627 | } |
||
| 628 | $this->maximum_mass_axle_braked = $maximum_mass_axle_braked; |
||
| 629 | return $this; |
||
| 630 | } |
||
| 631 | /** |
||
| 632 | * Get date_first_issuing value |
||
| 633 | * @return string|null |
||
| 634 | */ |
||
| 635 | public function getDate_first_issuing() |
||
| 636 | { |
||
| 637 | return $this->date_first_issuing; |
||
| 638 | } |
||
| 639 | /** |
||
| 640 | * Set date_first_issuing value |
||
| 641 | * @param string $date_first_issuing |
||
| 642 | * @return \Webservices\StructType\CarV3 |
||
| 643 | */ |
||
| 644 | public function setDate_first_issuing($date_first_issuing = null) |
||
| 645 | { |
||
| 646 | // validation for constraint: string |
||
| 647 | if (!is_null($date_first_issuing) && !is_string($date_first_issuing)) { |
||
| 648 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($date_first_issuing)), __LINE__); |
||
| 649 | } |
||
| 650 | $this->date_first_issuing = $date_first_issuing; |
||
| 651 | return $this; |
||
| 652 | } |
||
| 653 | /** |
||
| 654 | * Get date_first_admission value |
||
| 655 | * @return string|null |
||
| 656 | */ |
||
| 657 | public function getDate_first_admission() |
||
| 658 | { |
||
| 659 | return $this->date_first_admission; |
||
| 660 | } |
||
| 661 | /** |
||
| 662 | * Set date_first_admission value |
||
| 663 | * @param string $date_first_admission |
||
| 664 | * @return \Webservices\StructType\CarV3 |
||
| 665 | */ |
||
| 666 | public function setDate_first_admission($date_first_admission = null) |
||
| 667 | { |
||
| 668 | // validation for constraint: string |
||
| 669 | if (!is_null($date_first_admission) && !is_string($date_first_admission)) { |
||
| 670 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($date_first_admission)), __LINE__); |
||
| 671 | } |
||
| 672 | $this->date_first_admission = $date_first_admission; |
||
| 673 | return $this; |
||
| 674 | } |
||
| 675 | /** |
||
| 676 | * Get date_latest_name_registration value |
||
| 677 | * @return string|null |
||
| 678 | */ |
||
| 679 | public function getDate_latest_name_registration() |
||
| 680 | { |
||
| 681 | return $this->date_latest_name_registration; |
||
| 682 | } |
||
| 683 | /** |
||
| 684 | * Set date_latest_name_registration value |
||
| 685 | * @param string $date_latest_name_registration |
||
| 686 | * @return \Webservices\StructType\CarV3 |
||
| 687 | */ |
||
| 688 | public function setDate_latest_name_registration($date_latest_name_registration = null) |
||
| 696 | } |
||
| 697 | /** |
||
| 698 | * Get apk_due_date value |
||
| 699 | * @return string|null |
||
| 700 | */ |
||
| 701 | public function getApk_due_date() |
||
| 702 | { |
||
| 703 | return $this->apk_due_date; |
||
| 704 | } |
||
| 705 | /** |
||
| 706 | * Set apk_due_date value |
||
| 707 | * @param string $apk_due_date |
||
| 708 | * @return \Webservices\StructType\CarV3 |
||
| 709 | */ |
||
| 710 | public function setApk_due_date($apk_due_date = null) |
||
| 711 | { |
||
| 712 | // validation for constraint: string |
||
| 713 | if (!is_null($apk_due_date) && !is_string($apk_due_date)) { |
||
| 714 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($apk_due_date)), __LINE__); |
||
| 715 | } |
||
| 716 | $this->apk_due_date = $apk_due_date; |
||
| 717 | return $this; |
||
| 718 | } |
||
| 719 | /** |
||
| 720 | * Get co2_emission value |
||
| 721 | * @return int|null |
||
| 722 | */ |
||
| 723 | public function getCo2_emission() |
||
| 724 | { |
||
| 725 | return $this->co2_emission; |
||
| 726 | } |
||
| 727 | /** |
||
| 728 | * Set co2_emission value |
||
| 729 | * @param int $co2_emission |
||
| 730 | * @return \Webservices\StructType\CarV3 |
||
| 731 | */ |
||
| 732 | public function setCo2_emission($co2_emission = null) |
||
| 733 | { |
||
| 734 | // validation for constraint: int |
||
| 735 | if (!is_null($co2_emission) && !is_numeric($co2_emission)) { |
||
| 736 | throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($co2_emission)), __LINE__); |
||
| 737 | } |
||
| 738 | $this->co2_emission = $co2_emission; |
||
| 739 | return $this; |
||
| 740 | } |
||
| 741 | /** |
||
| 742 | * Method called when an object has been exported with var_export() functions |
||
| 743 | * It allows to return an object instantiated with the values |
||
| 744 | * @see AbstractStructBase::__set_state() |
||
| 745 | * @uses AbstractStructBase::__set_state() |
||
| 746 | * @param array $array the exported values |
||
| 747 | * @return \Webservices\StructType\CarV3 |
||
| 748 | */ |
||
| 749 | public static function __set_state(array $array) |
||
| 750 | { |
||
| 751 | return parent::__set_state($array); |
||
| 752 | } |
||
| 753 | /** |
||
| 754 | * Method returning the class name |
||
| 755 | * @return string __CLASS__ |
||
| 756 | */ |
||
| 757 | public function __toString() |
||
| 760 | } |
||
| 761 | } |
||
| 762 |