| Total Complexity | 88 |
| Total Lines | 728 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like EwsTaskType 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 EwsTaskType, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 16 | class EwsTaskType extends EwsItemType |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * The ActualWork |
||
| 20 | * Meta information extracted from the WSDL |
||
| 21 | * - minOccurs: 0 |
||
| 22 | * @var int|null |
||
| 23 | */ |
||
| 24 | protected ?int $ActualWork = null; |
||
| 25 | /** |
||
| 26 | * The AssignedTime |
||
| 27 | * Meta information extracted from the WSDL |
||
| 28 | * - minOccurs: 0 |
||
| 29 | * @var string|null |
||
| 30 | */ |
||
| 31 | protected ?string $AssignedTime = null; |
||
| 32 | /** |
||
| 33 | * The BillingInformation |
||
| 34 | * Meta information extracted from the WSDL |
||
| 35 | * - minOccurs: 0 |
||
| 36 | * @var string|null |
||
| 37 | */ |
||
| 38 | protected ?string $BillingInformation = null; |
||
| 39 | /** |
||
| 40 | * The ChangeCount |
||
| 41 | * Meta information extracted from the WSDL |
||
| 42 | * - minOccurs: 0 |
||
| 43 | * @var int|null |
||
| 44 | */ |
||
| 45 | protected ?int $ChangeCount = null; |
||
| 46 | /** |
||
| 47 | * The Companies |
||
| 48 | * Meta information extracted from the WSDL |
||
| 49 | * - minOccurs: 0 |
||
| 50 | * @var \ArrayType\EwsArrayOfStringsType|null |
||
| 51 | */ |
||
| 52 | protected ?\ArrayType\EwsArrayOfStringsType $Companies = null; |
||
| 53 | /** |
||
| 54 | * The CompleteDate |
||
| 55 | * Meta information extracted from the WSDL |
||
| 56 | * - minOccurs: 0 |
||
| 57 | * @var string|null |
||
| 58 | */ |
||
| 59 | protected ?string $CompleteDate = null; |
||
| 60 | /** |
||
| 61 | * The Contacts |
||
| 62 | * Meta information extracted from the WSDL |
||
| 63 | * - minOccurs: 0 |
||
| 64 | * @var \ArrayType\EwsArrayOfStringsType|null |
||
| 65 | */ |
||
| 66 | protected ?\ArrayType\EwsArrayOfStringsType $Contacts = null; |
||
| 67 | /** |
||
| 68 | * The DelegationState |
||
| 69 | * Meta information extracted from the WSDL |
||
| 70 | * - minOccurs: 0 |
||
| 71 | * @var string|null |
||
| 72 | */ |
||
| 73 | protected ?string $DelegationState = null; |
||
| 74 | /** |
||
| 75 | * The Delegator |
||
| 76 | * Meta information extracted from the WSDL |
||
| 77 | * - minOccurs: 0 |
||
| 78 | * @var string|null |
||
| 79 | */ |
||
| 80 | protected ?string $Delegator = null; |
||
| 81 | /** |
||
| 82 | * The DueDate |
||
| 83 | * Meta information extracted from the WSDL |
||
| 84 | * - minOccurs: 0 |
||
| 85 | * @var string|null |
||
| 86 | */ |
||
| 87 | protected ?string $DueDate = null; |
||
| 88 | /** |
||
| 89 | * The IsAssignmentEditable |
||
| 90 | * Meta information extracted from the WSDL |
||
| 91 | * - minOccurs: 0 |
||
| 92 | * @var int|null |
||
| 93 | */ |
||
| 94 | protected ?int $IsAssignmentEditable = null; |
||
| 95 | /** |
||
| 96 | * The IsComplete |
||
| 97 | * Meta information extracted from the WSDL |
||
| 98 | * - minOccurs: 0 |
||
| 99 | * @var bool|null |
||
| 100 | */ |
||
| 101 | protected ?bool $IsComplete = null; |
||
| 102 | /** |
||
| 103 | * The IsRecurring |
||
| 104 | * Meta information extracted from the WSDL |
||
| 105 | * - minOccurs: 0 |
||
| 106 | * @var bool|null |
||
| 107 | */ |
||
| 108 | protected ?bool $IsRecurring = null; |
||
| 109 | /** |
||
| 110 | * The IsTeamTask |
||
| 111 | * Meta information extracted from the WSDL |
||
| 112 | * - minOccurs: 0 |
||
| 113 | * @var bool|null |
||
| 114 | */ |
||
| 115 | protected ?bool $IsTeamTask = null; |
||
| 116 | /** |
||
| 117 | * The Mileage |
||
| 118 | * Meta information extracted from the WSDL |
||
| 119 | * - minOccurs: 0 |
||
| 120 | * @var string|null |
||
| 121 | */ |
||
| 122 | protected ?string $Mileage = null; |
||
| 123 | /** |
||
| 124 | * The Owner |
||
| 125 | * Meta information extracted from the WSDL |
||
| 126 | * - minOccurs: 0 |
||
| 127 | * @var string|null |
||
| 128 | */ |
||
| 129 | protected ?string $Owner = null; |
||
| 130 | /** |
||
| 131 | * The PercentComplete |
||
| 132 | * Meta information extracted from the WSDL |
||
| 133 | * - minOccurs: 0 |
||
| 134 | * @var float|null |
||
| 135 | */ |
||
| 136 | protected ?float $PercentComplete = null; |
||
| 137 | /** |
||
| 138 | * The Recurrence |
||
| 139 | * Meta information extracted from the WSDL |
||
| 140 | * - minOccurs: 0 |
||
| 141 | * @var \StructType\EwsTaskRecurrenceType|null |
||
| 142 | */ |
||
| 143 | protected ?\StructType\EwsTaskRecurrenceType $Recurrence = null; |
||
| 144 | /** |
||
| 145 | * The StartDate |
||
| 146 | * Meta information extracted from the WSDL |
||
| 147 | * - minOccurs: 0 |
||
| 148 | * @var string|null |
||
| 149 | */ |
||
| 150 | protected ?string $StartDate = null; |
||
| 151 | /** |
||
| 152 | * The Status |
||
| 153 | * Meta information extracted from the WSDL |
||
| 154 | * - minOccurs: 0 |
||
| 155 | * @var string|null |
||
| 156 | */ |
||
| 157 | protected ?string $Status = null; |
||
| 158 | /** |
||
| 159 | * The StatusDescription |
||
| 160 | * Meta information extracted from the WSDL |
||
| 161 | * - minOccurs: 0 |
||
| 162 | * @var string|null |
||
| 163 | */ |
||
| 164 | protected ?string $StatusDescription = null; |
||
| 165 | /** |
||
| 166 | * The TotalWork |
||
| 167 | * Meta information extracted from the WSDL |
||
| 168 | * - minOccurs: 0 |
||
| 169 | * @var int|null |
||
| 170 | */ |
||
| 171 | protected ?int $TotalWork = null; |
||
| 172 | /** |
||
| 173 | * Constructor method for TaskType |
||
| 174 | * @uses EwsTaskType::setActualWork() |
||
| 175 | * @uses EwsTaskType::setAssignedTime() |
||
| 176 | * @uses EwsTaskType::setBillingInformation() |
||
| 177 | * @uses EwsTaskType::setChangeCount() |
||
| 178 | * @uses EwsTaskType::setCompanies() |
||
| 179 | * @uses EwsTaskType::setCompleteDate() |
||
| 180 | * @uses EwsTaskType::setContacts() |
||
| 181 | * @uses EwsTaskType::setDelegationState() |
||
| 182 | * @uses EwsTaskType::setDelegator() |
||
| 183 | * @uses EwsTaskType::setDueDate() |
||
| 184 | * @uses EwsTaskType::setIsAssignmentEditable() |
||
| 185 | * @uses EwsTaskType::setIsComplete() |
||
| 186 | * @uses EwsTaskType::setIsRecurring() |
||
| 187 | * @uses EwsTaskType::setIsTeamTask() |
||
| 188 | * @uses EwsTaskType::setMileage() |
||
| 189 | * @uses EwsTaskType::setOwner() |
||
| 190 | * @uses EwsTaskType::setPercentComplete() |
||
| 191 | * @uses EwsTaskType::setRecurrence() |
||
| 192 | * @uses EwsTaskType::setStartDate() |
||
| 193 | * @uses EwsTaskType::setStatus() |
||
| 194 | * @uses EwsTaskType::setStatusDescription() |
||
| 195 | * @uses EwsTaskType::setTotalWork() |
||
| 196 | * @param int $actualWork |
||
| 197 | * @param string $assignedTime |
||
| 198 | * @param string $billingInformation |
||
| 199 | * @param int $changeCount |
||
| 200 | * @param \ArrayType\EwsArrayOfStringsType $companies |
||
| 201 | * @param string $completeDate |
||
| 202 | * @param \ArrayType\EwsArrayOfStringsType $contacts |
||
| 203 | * @param string $delegationState |
||
| 204 | * @param string $delegator |
||
| 205 | * @param string $dueDate |
||
| 206 | * @param int $isAssignmentEditable |
||
| 207 | * @param bool $isComplete |
||
| 208 | * @param bool $isRecurring |
||
| 209 | * @param bool $isTeamTask |
||
| 210 | * @param string $mileage |
||
| 211 | * @param string $owner |
||
| 212 | * @param float $percentComplete |
||
| 213 | * @param \StructType\EwsTaskRecurrenceType $recurrence |
||
| 214 | * @param string $startDate |
||
| 215 | * @param string $status |
||
| 216 | * @param string $statusDescription |
||
| 217 | * @param int $totalWork |
||
| 218 | */ |
||
| 219 | public function __construct(?int $actualWork = null, ?string $assignedTime = null, ?string $billingInformation = null, ?int $changeCount = null, ?\ArrayType\EwsArrayOfStringsType $companies = null, ?string $completeDate = null, ?\ArrayType\EwsArrayOfStringsType $contacts = null, ?string $delegationState = null, ?string $delegator = null, ?string $dueDate = null, ?int $isAssignmentEditable = null, ?bool $isComplete = null, ?bool $isRecurring = null, ?bool $isTeamTask = null, ?string $mileage = null, ?string $owner = null, ?float $percentComplete = null, ?\StructType\EwsTaskRecurrenceType $recurrence = null, ?string $startDate = null, ?string $status = null, ?string $statusDescription = null, ?int $totalWork = null) |
||
| 220 | { |
||
| 221 | $this |
||
| 222 | ->setActualWork($actualWork) |
||
| 223 | ->setAssignedTime($assignedTime) |
||
| 224 | ->setBillingInformation($billingInformation) |
||
| 225 | ->setChangeCount($changeCount) |
||
| 226 | ->setCompanies($companies) |
||
| 227 | ->setCompleteDate($completeDate) |
||
| 228 | ->setContacts($contacts) |
||
| 229 | ->setDelegationState($delegationState) |
||
| 230 | ->setDelegator($delegator) |
||
| 231 | ->setDueDate($dueDate) |
||
| 232 | ->setIsAssignmentEditable($isAssignmentEditable) |
||
| 233 | ->setIsComplete($isComplete) |
||
| 234 | ->setIsRecurring($isRecurring) |
||
| 235 | ->setIsTeamTask($isTeamTask) |
||
| 236 | ->setMileage($mileage) |
||
| 237 | ->setOwner($owner) |
||
| 238 | ->setPercentComplete($percentComplete) |
||
| 239 | ->setRecurrence($recurrence) |
||
| 240 | ->setStartDate($startDate) |
||
| 241 | ->setStatus($status) |
||
| 242 | ->setStatusDescription($statusDescription) |
||
| 243 | ->setTotalWork($totalWork); |
||
| 244 | } |
||
| 245 | /** |
||
| 246 | * Get ActualWork value |
||
| 247 | * @return int|null |
||
| 248 | */ |
||
| 249 | public function getActualWork(): ?int |
||
| 250 | { |
||
| 251 | return $this->ActualWork; |
||
| 252 | } |
||
| 253 | /** |
||
| 254 | * Set ActualWork value |
||
| 255 | * @param int $actualWork |
||
| 256 | * @return \StructType\EwsTaskType |
||
| 257 | */ |
||
| 258 | public function setActualWork(?int $actualWork = null): self |
||
| 259 | { |
||
| 260 | // validation for constraint: int |
||
| 261 | if (!is_null($actualWork) && !(is_int($actualWork) || ctype_digit($actualWork))) { |
||
|
|
|||
| 262 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($actualWork, true), gettype($actualWork)), __LINE__); |
||
| 263 | } |
||
| 264 | $this->ActualWork = $actualWork; |
||
| 265 | |||
| 266 | return $this; |
||
| 267 | } |
||
| 268 | /** |
||
| 269 | * Get AssignedTime value |
||
| 270 | * @return string|null |
||
| 271 | */ |
||
| 272 | public function getAssignedTime(): ?string |
||
| 273 | { |
||
| 274 | return $this->AssignedTime; |
||
| 275 | } |
||
| 276 | /** |
||
| 277 | * Set AssignedTime value |
||
| 278 | * @param string $assignedTime |
||
| 279 | * @return \StructType\EwsTaskType |
||
| 280 | */ |
||
| 281 | public function setAssignedTime(?string $assignedTime = null): self |
||
| 282 | { |
||
| 283 | // validation for constraint: string |
||
| 284 | if (!is_null($assignedTime) && !is_string($assignedTime)) { |
||
| 285 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($assignedTime, true), gettype($assignedTime)), __LINE__); |
||
| 286 | } |
||
| 287 | $this->AssignedTime = $assignedTime; |
||
| 288 | |||
| 289 | return $this; |
||
| 290 | } |
||
| 291 | /** |
||
| 292 | * Get BillingInformation value |
||
| 293 | * @return string|null |
||
| 294 | */ |
||
| 295 | public function getBillingInformation(): ?string |
||
| 296 | { |
||
| 297 | return $this->BillingInformation; |
||
| 298 | } |
||
| 299 | /** |
||
| 300 | * Set BillingInformation value |
||
| 301 | * @param string $billingInformation |
||
| 302 | * @return \StructType\EwsTaskType |
||
| 303 | */ |
||
| 304 | public function setBillingInformation(?string $billingInformation = null): self |
||
| 305 | { |
||
| 306 | // validation for constraint: string |
||
| 307 | if (!is_null($billingInformation) && !is_string($billingInformation)) { |
||
| 308 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($billingInformation, true), gettype($billingInformation)), __LINE__); |
||
| 309 | } |
||
| 310 | $this->BillingInformation = $billingInformation; |
||
| 311 | |||
| 312 | return $this; |
||
| 313 | } |
||
| 314 | /** |
||
| 315 | * Get ChangeCount value |
||
| 316 | * @return int|null |
||
| 317 | */ |
||
| 318 | public function getChangeCount(): ?int |
||
| 319 | { |
||
| 320 | return $this->ChangeCount; |
||
| 321 | } |
||
| 322 | /** |
||
| 323 | * Set ChangeCount value |
||
| 324 | * @param int $changeCount |
||
| 325 | * @return \StructType\EwsTaskType |
||
| 326 | */ |
||
| 327 | public function setChangeCount(?int $changeCount = null): self |
||
| 328 | { |
||
| 329 | // validation for constraint: int |
||
| 330 | if (!is_null($changeCount) && !(is_int($changeCount) || ctype_digit($changeCount))) { |
||
| 331 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($changeCount, true), gettype($changeCount)), __LINE__); |
||
| 332 | } |
||
| 333 | $this->ChangeCount = $changeCount; |
||
| 334 | |||
| 335 | return $this; |
||
| 336 | } |
||
| 337 | /** |
||
| 338 | * Get Companies value |
||
| 339 | * @return \ArrayType\EwsArrayOfStringsType|null |
||
| 340 | */ |
||
| 341 | public function getCompanies(): ?\ArrayType\EwsArrayOfStringsType |
||
| 342 | { |
||
| 343 | return $this->Companies; |
||
| 344 | } |
||
| 345 | /** |
||
| 346 | * Set Companies value |
||
| 347 | * @param \ArrayType\EwsArrayOfStringsType $companies |
||
| 348 | * @return \StructType\EwsTaskType |
||
| 349 | */ |
||
| 350 | public function setCompanies(?\ArrayType\EwsArrayOfStringsType $companies = null): self |
||
| 351 | { |
||
| 352 | $this->Companies = $companies; |
||
| 353 | |||
| 354 | return $this; |
||
| 355 | } |
||
| 356 | /** |
||
| 357 | * Get CompleteDate value |
||
| 358 | * @return string|null |
||
| 359 | */ |
||
| 360 | public function getCompleteDate(): ?string |
||
| 361 | { |
||
| 362 | return $this->CompleteDate; |
||
| 363 | } |
||
| 364 | /** |
||
| 365 | * Set CompleteDate value |
||
| 366 | * @param string $completeDate |
||
| 367 | * @return \StructType\EwsTaskType |
||
| 368 | */ |
||
| 369 | public function setCompleteDate(?string $completeDate = null): self |
||
| 370 | { |
||
| 371 | // validation for constraint: string |
||
| 372 | if (!is_null($completeDate) && !is_string($completeDate)) { |
||
| 373 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($completeDate, true), gettype($completeDate)), __LINE__); |
||
| 374 | } |
||
| 375 | $this->CompleteDate = $completeDate; |
||
| 376 | |||
| 377 | return $this; |
||
| 378 | } |
||
| 379 | /** |
||
| 380 | * Get Contacts value |
||
| 381 | * @return \ArrayType\EwsArrayOfStringsType|null |
||
| 382 | */ |
||
| 383 | public function getContacts(): ?\ArrayType\EwsArrayOfStringsType |
||
| 384 | { |
||
| 385 | return $this->Contacts; |
||
| 386 | } |
||
| 387 | /** |
||
| 388 | * Set Contacts value |
||
| 389 | * @param \ArrayType\EwsArrayOfStringsType $contacts |
||
| 390 | * @return \StructType\EwsTaskType |
||
| 391 | */ |
||
| 392 | public function setContacts(?\ArrayType\EwsArrayOfStringsType $contacts = null): self |
||
| 393 | { |
||
| 394 | $this->Contacts = $contacts; |
||
| 395 | |||
| 396 | return $this; |
||
| 397 | } |
||
| 398 | /** |
||
| 399 | * Get DelegationState value |
||
| 400 | * @return string|null |
||
| 401 | */ |
||
| 402 | public function getDelegationState(): ?string |
||
| 403 | { |
||
| 404 | return $this->DelegationState; |
||
| 405 | } |
||
| 406 | /** |
||
| 407 | * Set DelegationState value |
||
| 408 | * @uses \EnumType\EwsTaskDelegateStateType::valueIsValid() |
||
| 409 | * @uses \EnumType\EwsTaskDelegateStateType::getValidValues() |
||
| 410 | * @throws InvalidArgumentException |
||
| 411 | * @param string $delegationState |
||
| 412 | * @return \StructType\EwsTaskType |
||
| 413 | */ |
||
| 414 | public function setDelegationState(?string $delegationState = null): self |
||
| 415 | { |
||
| 416 | // validation for constraint: enumeration |
||
| 417 | if (!\EnumType\EwsTaskDelegateStateType::valueIsValid($delegationState)) { |
||
| 418 | throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EwsTaskDelegateStateType', is_array($delegationState) ? implode(', ', $delegationState) : var_export($delegationState, true), implode(', ', \EnumType\EwsTaskDelegateStateType::getValidValues())), __LINE__); |
||
| 419 | } |
||
| 420 | $this->DelegationState = $delegationState; |
||
| 421 | |||
| 422 | return $this; |
||
| 423 | } |
||
| 424 | /** |
||
| 425 | * Get Delegator value |
||
| 426 | * @return string|null |
||
| 427 | */ |
||
| 428 | public function getDelegator(): ?string |
||
| 429 | { |
||
| 430 | return $this->Delegator; |
||
| 431 | } |
||
| 432 | /** |
||
| 433 | * Set Delegator value |
||
| 434 | * @param string $delegator |
||
| 435 | * @return \StructType\EwsTaskType |
||
| 436 | */ |
||
| 437 | public function setDelegator(?string $delegator = null): self |
||
| 438 | { |
||
| 439 | // validation for constraint: string |
||
| 440 | if (!is_null($delegator) && !is_string($delegator)) { |
||
| 441 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($delegator, true), gettype($delegator)), __LINE__); |
||
| 442 | } |
||
| 443 | $this->Delegator = $delegator; |
||
| 444 | |||
| 445 | return $this; |
||
| 446 | } |
||
| 447 | /** |
||
| 448 | * Get DueDate value |
||
| 449 | * @return string|null |
||
| 450 | */ |
||
| 451 | public function getDueDate(): ?string |
||
| 452 | { |
||
| 453 | return $this->DueDate; |
||
| 454 | } |
||
| 455 | /** |
||
| 456 | * Set DueDate value |
||
| 457 | * @param string $dueDate |
||
| 458 | * @return \StructType\EwsTaskType |
||
| 459 | */ |
||
| 460 | public function setDueDate(?string $dueDate = null): self |
||
| 461 | { |
||
| 462 | // validation for constraint: string |
||
| 463 | if (!is_null($dueDate) && !is_string($dueDate)) { |
||
| 464 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dueDate, true), gettype($dueDate)), __LINE__); |
||
| 465 | } |
||
| 466 | $this->DueDate = $dueDate; |
||
| 467 | |||
| 468 | return $this; |
||
| 469 | } |
||
| 470 | /** |
||
| 471 | * Get IsAssignmentEditable value |
||
| 472 | * @return int|null |
||
| 473 | */ |
||
| 474 | public function getIsAssignmentEditable(): ?int |
||
| 475 | { |
||
| 476 | return $this->IsAssignmentEditable; |
||
| 477 | } |
||
| 478 | /** |
||
| 479 | * Set IsAssignmentEditable value |
||
| 480 | * @param int $isAssignmentEditable |
||
| 481 | * @return \StructType\EwsTaskType |
||
| 482 | */ |
||
| 483 | public function setIsAssignmentEditable(?int $isAssignmentEditable = null): self |
||
| 484 | { |
||
| 485 | // validation for constraint: int |
||
| 486 | if (!is_null($isAssignmentEditable) && !(is_int($isAssignmentEditable) || ctype_digit($isAssignmentEditable))) { |
||
| 487 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($isAssignmentEditable, true), gettype($isAssignmentEditable)), __LINE__); |
||
| 488 | } |
||
| 489 | $this->IsAssignmentEditable = $isAssignmentEditable; |
||
| 490 | |||
| 491 | return $this; |
||
| 492 | } |
||
| 493 | /** |
||
| 494 | * Get IsComplete value |
||
| 495 | * @return bool|null |
||
| 496 | */ |
||
| 497 | public function getIsComplete(): ?bool |
||
| 498 | { |
||
| 499 | return $this->IsComplete; |
||
| 500 | } |
||
| 501 | /** |
||
| 502 | * Set IsComplete value |
||
| 503 | * @param bool $isComplete |
||
| 504 | * @return \StructType\EwsTaskType |
||
| 505 | */ |
||
| 506 | public function setIsComplete(?bool $isComplete = null): self |
||
| 507 | { |
||
| 508 | // validation for constraint: boolean |
||
| 509 | if (!is_null($isComplete) && !is_bool($isComplete)) { |
||
| 510 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isComplete, true), gettype($isComplete)), __LINE__); |
||
| 511 | } |
||
| 512 | $this->IsComplete = $isComplete; |
||
| 513 | |||
| 514 | return $this; |
||
| 515 | } |
||
| 516 | /** |
||
| 517 | * Get IsRecurring value |
||
| 518 | * @return bool|null |
||
| 519 | */ |
||
| 520 | public function getIsRecurring(): ?bool |
||
| 521 | { |
||
| 522 | return $this->IsRecurring; |
||
| 523 | } |
||
| 524 | /** |
||
| 525 | * Set IsRecurring value |
||
| 526 | * @param bool $isRecurring |
||
| 527 | * @return \StructType\EwsTaskType |
||
| 528 | */ |
||
| 529 | public function setIsRecurring(?bool $isRecurring = null): self |
||
| 530 | { |
||
| 531 | // validation for constraint: boolean |
||
| 532 | if (!is_null($isRecurring) && !is_bool($isRecurring)) { |
||
| 533 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isRecurring, true), gettype($isRecurring)), __LINE__); |
||
| 534 | } |
||
| 535 | $this->IsRecurring = $isRecurring; |
||
| 536 | |||
| 537 | return $this; |
||
| 538 | } |
||
| 539 | /** |
||
| 540 | * Get IsTeamTask value |
||
| 541 | * @return bool|null |
||
| 542 | */ |
||
| 543 | public function getIsTeamTask(): ?bool |
||
| 544 | { |
||
| 545 | return $this->IsTeamTask; |
||
| 546 | } |
||
| 547 | /** |
||
| 548 | * Set IsTeamTask value |
||
| 549 | * @param bool $isTeamTask |
||
| 550 | * @return \StructType\EwsTaskType |
||
| 551 | */ |
||
| 552 | public function setIsTeamTask(?bool $isTeamTask = null): self |
||
| 553 | { |
||
| 554 | // validation for constraint: boolean |
||
| 555 | if (!is_null($isTeamTask) && !is_bool($isTeamTask)) { |
||
| 556 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isTeamTask, true), gettype($isTeamTask)), __LINE__); |
||
| 557 | } |
||
| 558 | $this->IsTeamTask = $isTeamTask; |
||
| 559 | |||
| 560 | return $this; |
||
| 561 | } |
||
| 562 | /** |
||
| 563 | * Get Mileage value |
||
| 564 | * @return string|null |
||
| 565 | */ |
||
| 566 | public function getMileage(): ?string |
||
| 567 | { |
||
| 568 | return $this->Mileage; |
||
| 569 | } |
||
| 570 | /** |
||
| 571 | * Set Mileage value |
||
| 572 | * @param string $mileage |
||
| 573 | * @return \StructType\EwsTaskType |
||
| 574 | */ |
||
| 575 | public function setMileage(?string $mileage = null): self |
||
| 576 | { |
||
| 577 | // validation for constraint: string |
||
| 578 | if (!is_null($mileage) && !is_string($mileage)) { |
||
| 579 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($mileage, true), gettype($mileage)), __LINE__); |
||
| 580 | } |
||
| 581 | $this->Mileage = $mileage; |
||
| 582 | |||
| 583 | return $this; |
||
| 584 | } |
||
| 585 | /** |
||
| 586 | * Get Owner value |
||
| 587 | * @return string|null |
||
| 588 | */ |
||
| 589 | public function getOwner(): ?string |
||
| 590 | { |
||
| 591 | return $this->Owner; |
||
| 592 | } |
||
| 593 | /** |
||
| 594 | * Set Owner value |
||
| 595 | * @param string $owner |
||
| 596 | * @return \StructType\EwsTaskType |
||
| 597 | */ |
||
| 598 | public function setOwner(?string $owner = null): self |
||
| 599 | { |
||
| 600 | // validation for constraint: string |
||
| 601 | if (!is_null($owner) && !is_string($owner)) { |
||
| 602 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($owner, true), gettype($owner)), __LINE__); |
||
| 603 | } |
||
| 604 | $this->Owner = $owner; |
||
| 605 | |||
| 606 | return $this; |
||
| 607 | } |
||
| 608 | /** |
||
| 609 | * Get PercentComplete value |
||
| 610 | * @return float|null |
||
| 611 | */ |
||
| 612 | public function getPercentComplete(): ?float |
||
| 613 | { |
||
| 614 | return $this->PercentComplete; |
||
| 615 | } |
||
| 616 | /** |
||
| 617 | * Set PercentComplete value |
||
| 618 | * @param float $percentComplete |
||
| 619 | * @return \StructType\EwsTaskType |
||
| 620 | */ |
||
| 621 | public function setPercentComplete(?float $percentComplete = null): self |
||
| 622 | { |
||
| 623 | // validation for constraint: float |
||
| 624 | if (!is_null($percentComplete) && !(is_float($percentComplete) || is_numeric($percentComplete))) { |
||
| 625 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($percentComplete, true), gettype($percentComplete)), __LINE__); |
||
| 626 | } |
||
| 627 | $this->PercentComplete = $percentComplete; |
||
| 628 | |||
| 629 | return $this; |
||
| 630 | } |
||
| 631 | /** |
||
| 632 | * Get Recurrence value |
||
| 633 | * @return \StructType\EwsTaskRecurrenceType|null |
||
| 634 | */ |
||
| 635 | public function getRecurrence(): ?\StructType\EwsTaskRecurrenceType |
||
| 636 | { |
||
| 637 | return $this->Recurrence; |
||
| 638 | } |
||
| 639 | /** |
||
| 640 | * Set Recurrence value |
||
| 641 | * @param \StructType\EwsTaskRecurrenceType $recurrence |
||
| 642 | * @return \StructType\EwsTaskType |
||
| 643 | */ |
||
| 644 | public function setRecurrence(?\StructType\EwsTaskRecurrenceType $recurrence = null): self |
||
| 649 | } |
||
| 650 | /** |
||
| 651 | * Get StartDate value |
||
| 652 | * @return string|null |
||
| 653 | */ |
||
| 654 | public function getStartDate(): ?string |
||
| 655 | { |
||
| 656 | return $this->StartDate; |
||
| 657 | } |
||
| 658 | /** |
||
| 659 | * Set StartDate value |
||
| 660 | * @param string $startDate |
||
| 661 | * @return \StructType\EwsTaskType |
||
| 662 | */ |
||
| 663 | public function setStartDate(?string $startDate = null): self |
||
| 664 | { |
||
| 665 | // validation for constraint: string |
||
| 666 | if (!is_null($startDate) && !is_string($startDate)) { |
||
| 667 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($startDate, true), gettype($startDate)), __LINE__); |
||
| 668 | } |
||
| 669 | $this->StartDate = $startDate; |
||
| 670 | |||
| 671 | return $this; |
||
| 672 | } |
||
| 673 | /** |
||
| 674 | * Get Status value |
||
| 675 | * @return string|null |
||
| 676 | */ |
||
| 677 | public function getStatus(): ?string |
||
| 678 | { |
||
| 679 | return $this->Status; |
||
| 680 | } |
||
| 681 | /** |
||
| 682 | * Set Status value |
||
| 683 | * @uses \EnumType\EwsTaskStatusType::valueIsValid() |
||
| 684 | * @uses \EnumType\EwsTaskStatusType::getValidValues() |
||
| 685 | * @throws InvalidArgumentException |
||
| 686 | * @param string $status |
||
| 687 | * @return \StructType\EwsTaskType |
||
| 688 | */ |
||
| 689 | public function setStatus(?string $status = null): self |
||
| 690 | { |
||
| 691 | // validation for constraint: enumeration |
||
| 692 | if (!\EnumType\EwsTaskStatusType::valueIsValid($status)) { |
||
| 693 | throw new InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EwsTaskStatusType', is_array($status) ? implode(', ', $status) : var_export($status, true), implode(', ', \EnumType\EwsTaskStatusType::getValidValues())), __LINE__); |
||
| 694 | } |
||
| 695 | $this->Status = $status; |
||
| 696 | |||
| 697 | return $this; |
||
| 698 | } |
||
| 699 | /** |
||
| 700 | * Get StatusDescription value |
||
| 701 | * @return string|null |
||
| 702 | */ |
||
| 703 | public function getStatusDescription(): ?string |
||
| 706 | } |
||
| 707 | /** |
||
| 708 | * Set StatusDescription value |
||
| 709 | * @param string $statusDescription |
||
| 710 | * @return \StructType\EwsTaskType |
||
| 711 | */ |
||
| 712 | public function setStatusDescription(?string $statusDescription = null): self |
||
| 713 | { |
||
| 714 | // validation for constraint: string |
||
| 715 | if (!is_null($statusDescription) && !is_string($statusDescription)) { |
||
| 716 | throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($statusDescription, true), gettype($statusDescription)), __LINE__); |
||
| 717 | } |
||
| 718 | $this->StatusDescription = $statusDescription; |
||
| 719 | |||
| 720 | return $this; |
||
| 721 | } |
||
| 722 | /** |
||
| 723 | * Get TotalWork value |
||
| 724 | * @return int|null |
||
| 725 | */ |
||
| 726 | public function getTotalWork(): ?int |
||
| 729 | } |
||
| 730 | /** |
||
| 731 | * Set TotalWork value |
||
| 732 | * @param int $totalWork |
||
| 733 | * @return \StructType\EwsTaskType |
||
| 734 | */ |
||
| 735 | public function setTotalWork(?int $totalWork = null): self |
||
| 736 | { |
||
| 737 | // validation for constraint: int |
||
| 744 | } |
||
| 745 | } |
||
| 746 |