| Total Complexity | 62 |
| Total Lines | 488 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like TelephonyFaxOptionsModify 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 TelephonyFaxOptionsModify, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 12 | class TelephonyFaxOptionsModify extends AbstractStructBase |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The session |
||
| 16 | * Meta information extracted from the WSDL |
||
| 17 | * - nillable: true |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | public $session; |
||
| 21 | /** |
||
| 22 | * The number |
||
| 23 | * Meta information extracted from the WSDL |
||
| 24 | * - nillable: true |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | public $number; |
||
| 28 | /** |
||
| 29 | * The country |
||
| 30 | * Meta information extracted from the WSDL |
||
| 31 | * - nillable: true |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | public $country; |
||
| 35 | /** |
||
| 36 | * The fromName |
||
| 37 | * Meta information extracted from the WSDL |
||
| 38 | * - nillable: true |
||
| 39 | * @var string |
||
| 40 | */ |
||
| 41 | public $fromName; |
||
| 42 | /** |
||
| 43 | * The fromEmail |
||
| 44 | * Meta information extracted from the WSDL |
||
| 45 | * - nillable: true |
||
| 46 | * @var string |
||
| 47 | */ |
||
| 48 | public $fromEmail; |
||
| 49 | /** |
||
| 50 | * The faxQuality |
||
| 51 | * Meta information extracted from the WSDL |
||
| 52 | * - nillable: true |
||
| 53 | * @var string |
||
| 54 | */ |
||
| 55 | public $faxQuality; |
||
| 56 | /** |
||
| 57 | * The faxTagLine |
||
| 58 | * Meta information extracted from the WSDL |
||
| 59 | * - nillable: true |
||
| 60 | * @var string |
||
| 61 | */ |
||
| 62 | public $faxTagLine; |
||
| 63 | /** |
||
| 64 | * The faxMaxCall |
||
| 65 | * Meta information extracted from the WSDL |
||
| 66 | * - nillable: true |
||
| 67 | * @var int |
||
| 68 | */ |
||
| 69 | public $faxMaxCall; |
||
| 70 | /** |
||
| 71 | * The receivId |
||
| 72 | * Meta information extracted from the WSDL |
||
| 73 | * - nillable: true |
||
| 74 | * @var string |
||
| 75 | */ |
||
| 76 | public $receivId; |
||
| 77 | /** |
||
| 78 | * The senderId |
||
| 79 | * Meta information extracted from the WSDL |
||
| 80 | * - nillable: true |
||
| 81 | * @var string |
||
| 82 | */ |
||
| 83 | public $senderId; |
||
| 84 | /** |
||
| 85 | * The redirection1Email |
||
| 86 | * Meta information extracted from the WSDL |
||
| 87 | * - nillable: true |
||
| 88 | * @var string |
||
| 89 | */ |
||
| 90 | public $redirection1Email; |
||
| 91 | /** |
||
| 92 | * The redirection2Email |
||
| 93 | * Meta information extracted from the WSDL |
||
| 94 | * - nillable: true |
||
| 95 | * @var string |
||
| 96 | */ |
||
| 97 | public $redirection2Email; |
||
| 98 | /** |
||
| 99 | * The redirection3Email |
||
| 100 | * Meta information extracted from the WSDL |
||
| 101 | * - nillable: true |
||
| 102 | * @var string |
||
| 103 | */ |
||
| 104 | public $redirection3Email; |
||
| 105 | /** |
||
| 106 | * The redirection4Email |
||
| 107 | * Meta information extracted from the WSDL |
||
| 108 | * - nillable: true |
||
| 109 | * @var string |
||
| 110 | */ |
||
| 111 | public $redirection4Email; |
||
| 112 | /** |
||
| 113 | * The redirection5Email |
||
| 114 | * Meta information extracted from the WSDL |
||
| 115 | * - nillable: true |
||
| 116 | * @var string |
||
| 117 | */ |
||
| 118 | public $redirection5Email; |
||
| 119 | /** |
||
| 120 | * Constructor method for telephonyFaxOptionsModify |
||
| 121 | * @uses TelephonyFaxOptionsModify::setSession() |
||
| 122 | * @uses TelephonyFaxOptionsModify::setNumber() |
||
| 123 | * @uses TelephonyFaxOptionsModify::setCountry() |
||
| 124 | * @uses TelephonyFaxOptionsModify::setFromName() |
||
| 125 | * @uses TelephonyFaxOptionsModify::setFromEmail() |
||
| 126 | * @uses TelephonyFaxOptionsModify::setFaxQuality() |
||
| 127 | * @uses TelephonyFaxOptionsModify::setFaxTagLine() |
||
| 128 | * @uses TelephonyFaxOptionsModify::setFaxMaxCall() |
||
| 129 | * @uses TelephonyFaxOptionsModify::setReceivId() |
||
| 130 | * @uses TelephonyFaxOptionsModify::setSenderId() |
||
| 131 | * @uses TelephonyFaxOptionsModify::setRedirection1Email() |
||
| 132 | * @uses TelephonyFaxOptionsModify::setRedirection2Email() |
||
| 133 | * @uses TelephonyFaxOptionsModify::setRedirection3Email() |
||
| 134 | * @uses TelephonyFaxOptionsModify::setRedirection4Email() |
||
| 135 | * @uses TelephonyFaxOptionsModify::setRedirection5Email() |
||
| 136 | * @param string $session |
||
| 137 | * @param string $number |
||
| 138 | * @param string $country |
||
| 139 | * @param string $fromName |
||
| 140 | * @param string $fromEmail |
||
| 141 | * @param string $faxQuality |
||
| 142 | * @param string $faxTagLine |
||
| 143 | * @param int $faxMaxCall |
||
| 144 | * @param string $receivId |
||
| 145 | * @param string $senderId |
||
| 146 | * @param string $redirection1Email |
||
| 147 | * @param string $redirection2Email |
||
| 148 | * @param string $redirection3Email |
||
| 149 | * @param string $redirection4Email |
||
| 150 | * @param string $redirection5Email |
||
| 151 | */ |
||
| 152 | public function __construct($session = null, $number = null, $country = null, $fromName = null, $fromEmail = null, $faxQuality = null, $faxTagLine = null, $faxMaxCall = null, $receivId = null, $senderId = null, $redirection1Email = null, $redirection2Email = null, $redirection3Email = null, $redirection4Email = null, $redirection5Email = null) |
||
| 153 | { |
||
| 154 | $this |
||
| 155 | ->setSession($session) |
||
| 156 | ->setNumber($number) |
||
| 157 | ->setCountry($country) |
||
| 158 | ->setFromName($fromName) |
||
| 159 | ->setFromEmail($fromEmail) |
||
| 160 | ->setFaxQuality($faxQuality) |
||
| 161 | ->setFaxTagLine($faxTagLine) |
||
| 162 | ->setFaxMaxCall($faxMaxCall) |
||
| 163 | ->setReceivId($receivId) |
||
| 164 | ->setSenderId($senderId) |
||
| 165 | ->setRedirection1Email($redirection1Email) |
||
| 166 | ->setRedirection2Email($redirection2Email) |
||
| 167 | ->setRedirection3Email($redirection3Email) |
||
| 168 | ->setRedirection4Email($redirection4Email) |
||
| 169 | ->setRedirection5Email($redirection5Email); |
||
| 170 | } |
||
| 171 | /** |
||
| 172 | * Get session value |
||
| 173 | * @return string|null |
||
| 174 | */ |
||
| 175 | public function getSession() |
||
| 176 | { |
||
| 177 | return $this->session; |
||
| 178 | } |
||
| 179 | /** |
||
| 180 | * Set session value |
||
| 181 | * @param string $session |
||
| 182 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 183 | */ |
||
| 184 | public function setSession($session = null) |
||
| 185 | { |
||
| 186 | // validation for constraint: string |
||
| 187 | if (!is_null($session) && !is_string($session)) { |
||
|
|
|||
| 188 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($session, true), gettype($session)), __LINE__); |
||
| 189 | } |
||
| 190 | $this->session = $session; |
||
| 191 | return $this; |
||
| 192 | } |
||
| 193 | /** |
||
| 194 | * Get number value |
||
| 195 | * @return string|null |
||
| 196 | */ |
||
| 197 | public function getNumber() |
||
| 198 | { |
||
| 199 | return $this->number; |
||
| 200 | } |
||
| 201 | /** |
||
| 202 | * Set number value |
||
| 203 | * @param string $number |
||
| 204 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 205 | */ |
||
| 206 | public function setNumber($number = null) |
||
| 207 | { |
||
| 208 | // validation for constraint: string |
||
| 209 | if (!is_null($number) && !is_string($number)) { |
||
| 210 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($number, true), gettype($number)), __LINE__); |
||
| 211 | } |
||
| 212 | $this->number = $number; |
||
| 213 | return $this; |
||
| 214 | } |
||
| 215 | /** |
||
| 216 | * Get country value |
||
| 217 | * @return string|null |
||
| 218 | */ |
||
| 219 | public function getCountry() |
||
| 220 | { |
||
| 221 | return $this->country; |
||
| 222 | } |
||
| 223 | /** |
||
| 224 | * Set country value |
||
| 225 | * @param string $country |
||
| 226 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 227 | */ |
||
| 228 | public function setCountry($country = null) |
||
| 229 | { |
||
| 230 | // validation for constraint: string |
||
| 231 | if (!is_null($country) && !is_string($country)) { |
||
| 232 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($country, true), gettype($country)), __LINE__); |
||
| 233 | } |
||
| 234 | $this->country = $country; |
||
| 235 | return $this; |
||
| 236 | } |
||
| 237 | /** |
||
| 238 | * Get fromName value |
||
| 239 | * @return string|null |
||
| 240 | */ |
||
| 241 | public function getFromName() |
||
| 242 | { |
||
| 243 | return $this->fromName; |
||
| 244 | } |
||
| 245 | /** |
||
| 246 | * Set fromName value |
||
| 247 | * @param string $fromName |
||
| 248 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 249 | */ |
||
| 250 | public function setFromName($fromName = null) |
||
| 251 | { |
||
| 252 | // validation for constraint: string |
||
| 253 | if (!is_null($fromName) && !is_string($fromName)) { |
||
| 254 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromName, true), gettype($fromName)), __LINE__); |
||
| 255 | } |
||
| 256 | $this->fromName = $fromName; |
||
| 257 | return $this; |
||
| 258 | } |
||
| 259 | /** |
||
| 260 | * Get fromEmail value |
||
| 261 | * @return string|null |
||
| 262 | */ |
||
| 263 | public function getFromEmail() |
||
| 264 | { |
||
| 265 | return $this->fromEmail; |
||
| 266 | } |
||
| 267 | /** |
||
| 268 | * Set fromEmail value |
||
| 269 | * @param string $fromEmail |
||
| 270 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 271 | */ |
||
| 272 | public function setFromEmail($fromEmail = null) |
||
| 273 | { |
||
| 274 | // validation for constraint: string |
||
| 275 | if (!is_null($fromEmail) && !is_string($fromEmail)) { |
||
| 276 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($fromEmail, true), gettype($fromEmail)), __LINE__); |
||
| 277 | } |
||
| 278 | $this->fromEmail = $fromEmail; |
||
| 279 | return $this; |
||
| 280 | } |
||
| 281 | /** |
||
| 282 | * Get faxQuality value |
||
| 283 | * @return string|null |
||
| 284 | */ |
||
| 285 | public function getFaxQuality() |
||
| 286 | { |
||
| 287 | return $this->faxQuality; |
||
| 288 | } |
||
| 289 | /** |
||
| 290 | * Set faxQuality value |
||
| 291 | * @param string $faxQuality |
||
| 292 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 293 | */ |
||
| 294 | public function setFaxQuality($faxQuality = null) |
||
| 295 | { |
||
| 296 | // validation for constraint: string |
||
| 297 | if (!is_null($faxQuality) && !is_string($faxQuality)) { |
||
| 298 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($faxQuality, true), gettype($faxQuality)), __LINE__); |
||
| 299 | } |
||
| 300 | $this->faxQuality = $faxQuality; |
||
| 301 | return $this; |
||
| 302 | } |
||
| 303 | /** |
||
| 304 | * Get faxTagLine value |
||
| 305 | * @return string|null |
||
| 306 | */ |
||
| 307 | public function getFaxTagLine() |
||
| 308 | { |
||
| 309 | return $this->faxTagLine; |
||
| 310 | } |
||
| 311 | /** |
||
| 312 | * Set faxTagLine value |
||
| 313 | * @param string $faxTagLine |
||
| 314 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 315 | */ |
||
| 316 | public function setFaxTagLine($faxTagLine = null) |
||
| 317 | { |
||
| 318 | // validation for constraint: string |
||
| 319 | if (!is_null($faxTagLine) && !is_string($faxTagLine)) { |
||
| 320 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($faxTagLine, true), gettype($faxTagLine)), __LINE__); |
||
| 321 | } |
||
| 322 | $this->faxTagLine = $faxTagLine; |
||
| 323 | return $this; |
||
| 324 | } |
||
| 325 | /** |
||
| 326 | * Get faxMaxCall value |
||
| 327 | * @return int|null |
||
| 328 | */ |
||
| 329 | public function getFaxMaxCall() |
||
| 330 | { |
||
| 331 | return $this->faxMaxCall; |
||
| 332 | } |
||
| 333 | /** |
||
| 334 | * Set faxMaxCall value |
||
| 335 | * @param int $faxMaxCall |
||
| 336 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 337 | */ |
||
| 338 | public function setFaxMaxCall($faxMaxCall = null) |
||
| 339 | { |
||
| 340 | // validation for constraint: int |
||
| 341 | if (!is_null($faxMaxCall) && !(is_int($faxMaxCall) || ctype_digit($faxMaxCall))) { |
||
| 342 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($faxMaxCall, true), gettype($faxMaxCall)), __LINE__); |
||
| 343 | } |
||
| 344 | $this->faxMaxCall = $faxMaxCall; |
||
| 345 | return $this; |
||
| 346 | } |
||
| 347 | /** |
||
| 348 | * Get receivId value |
||
| 349 | * @return string|null |
||
| 350 | */ |
||
| 351 | public function getReceivId() |
||
| 352 | { |
||
| 353 | return $this->receivId; |
||
| 354 | } |
||
| 355 | /** |
||
| 356 | * Set receivId value |
||
| 357 | * @param string $receivId |
||
| 358 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 359 | */ |
||
| 360 | public function setReceivId($receivId = null) |
||
| 368 | } |
||
| 369 | /** |
||
| 370 | * Get senderId value |
||
| 371 | * @return string|null |
||
| 372 | */ |
||
| 373 | public function getSenderId() |
||
| 374 | { |
||
| 375 | return $this->senderId; |
||
| 376 | } |
||
| 377 | /** |
||
| 378 | * Set senderId value |
||
| 379 | * @param string $senderId |
||
| 380 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 381 | */ |
||
| 382 | public function setSenderId($senderId = null) |
||
| 383 | { |
||
| 384 | // validation for constraint: string |
||
| 385 | if (!is_null($senderId) && !is_string($senderId)) { |
||
| 386 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($senderId, true), gettype($senderId)), __LINE__); |
||
| 387 | } |
||
| 388 | $this->senderId = $senderId; |
||
| 389 | return $this; |
||
| 390 | } |
||
| 391 | /** |
||
| 392 | * Get redirection1Email value |
||
| 393 | * @return string|null |
||
| 394 | */ |
||
| 395 | public function getRedirection1Email() |
||
| 396 | { |
||
| 397 | return $this->redirection1Email; |
||
| 398 | } |
||
| 399 | /** |
||
| 400 | * Set redirection1Email value |
||
| 401 | * @param string $redirection1Email |
||
| 402 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 403 | */ |
||
| 404 | public function setRedirection1Email($redirection1Email = null) |
||
| 405 | { |
||
| 406 | // validation for constraint: string |
||
| 407 | if (!is_null($redirection1Email) && !is_string($redirection1Email)) { |
||
| 408 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection1Email, true), gettype($redirection1Email)), __LINE__); |
||
| 409 | } |
||
| 410 | $this->redirection1Email = $redirection1Email; |
||
| 411 | return $this; |
||
| 412 | } |
||
| 413 | /** |
||
| 414 | * Get redirection2Email value |
||
| 415 | * @return string|null |
||
| 416 | */ |
||
| 417 | public function getRedirection2Email() |
||
| 418 | { |
||
| 419 | return $this->redirection2Email; |
||
| 420 | } |
||
| 421 | /** |
||
| 422 | * Set redirection2Email value |
||
| 423 | * @param string $redirection2Email |
||
| 424 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 425 | */ |
||
| 426 | public function setRedirection2Email($redirection2Email = null) |
||
| 427 | { |
||
| 428 | // validation for constraint: string |
||
| 429 | if (!is_null($redirection2Email) && !is_string($redirection2Email)) { |
||
| 430 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection2Email, true), gettype($redirection2Email)), __LINE__); |
||
| 431 | } |
||
| 432 | $this->redirection2Email = $redirection2Email; |
||
| 433 | return $this; |
||
| 434 | } |
||
| 435 | /** |
||
| 436 | * Get redirection3Email value |
||
| 437 | * @return string|null |
||
| 438 | */ |
||
| 439 | public function getRedirection3Email() |
||
| 440 | { |
||
| 441 | return $this->redirection3Email; |
||
| 442 | } |
||
| 443 | /** |
||
| 444 | * Set redirection3Email value |
||
| 445 | * @param string $redirection3Email |
||
| 446 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 447 | */ |
||
| 448 | public function setRedirection3Email($redirection3Email = null) |
||
| 456 | } |
||
| 457 | /** |
||
| 458 | * Get redirection4Email value |
||
| 459 | * @return string|null |
||
| 460 | */ |
||
| 461 | public function getRedirection4Email() |
||
| 464 | } |
||
| 465 | /** |
||
| 466 | * Set redirection4Email value |
||
| 467 | * @param string $redirection4Email |
||
| 468 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 469 | */ |
||
| 470 | public function setRedirection4Email($redirection4Email = null) |
||
| 471 | { |
||
| 472 | // validation for constraint: string |
||
| 473 | if (!is_null($redirection4Email) && !is_string($redirection4Email)) { |
||
| 474 | throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($redirection4Email, true), gettype($redirection4Email)), __LINE__); |
||
| 475 | } |
||
| 476 | $this->redirection4Email = $redirection4Email; |
||
| 477 | return $this; |
||
| 478 | } |
||
| 479 | /** |
||
| 480 | * Get redirection5Email value |
||
| 481 | * @return string|null |
||
| 482 | */ |
||
| 483 | public function getRedirection5Email() |
||
| 484 | { |
||
| 485 | return $this->redirection5Email; |
||
| 486 | } |
||
| 487 | /** |
||
| 488 | * Set redirection5Email value |
||
| 489 | * @param string $redirection5Email |
||
| 490 | * @return \Ovh\StructType\TelephonyFaxOptionsModify |
||
| 491 | */ |
||
| 492 | public function setRedirection5Email($redirection5Email = null) |
||
| 500 | } |
||
| 501 | } |
||
| 502 |