| Total Complexity | 48 |
| Total Lines | 554 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Complex classes like CaptureResponseContainer 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 CaptureResponseContainer, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 10 | class CaptureResponseContainer extends AbstractResponseContainer |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | protected $txid; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $settleaccount; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $clearing_bankaccountholder; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $clearing_bankcountry; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected $clearing_bankaccount; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | protected $clearing_bankcode; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | protected $clearing_bankiban; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @var string |
||
| 49 | */ |
||
| 50 | protected $clearing_bankbic; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @var string |
||
| 54 | */ |
||
| 55 | protected $clearing_bankcity; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @var string |
||
| 59 | */ |
||
| 60 | protected $clearing_bankname; |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @var string |
||
| 64 | */ |
||
| 65 | protected $clearing_legalnote; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * (YYYYMMDD) |
||
| 69 | * |
||
| 70 | * @var string |
||
| 71 | */ |
||
| 72 | protected $clearing_duedate; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @var string |
||
| 76 | */ |
||
| 77 | protected $clearing_reference; |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @var string |
||
| 81 | */ |
||
| 82 | protected $clearing_instructionnote; |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @var string |
||
| 86 | */ |
||
| 87 | protected $mandate_identification; |
||
| 88 | |||
| 89 | /** |
||
| 90 | * @var string |
||
| 91 | */ |
||
| 92 | protected $creditor_identifier; |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @var string |
||
| 96 | */ |
||
| 97 | protected $creditor_name; |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @var string |
||
| 101 | */ |
||
| 102 | protected $creditor_street; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * @var string |
||
| 106 | */ |
||
| 107 | protected $creditor_zip; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * @var string |
||
| 111 | */ |
||
| 112 | protected $creditor_city; |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @var string |
||
| 116 | */ |
||
| 117 | protected $creditor_country; |
||
| 118 | |||
| 119 | /** |
||
| 120 | * @var string |
||
| 121 | */ |
||
| 122 | protected $creditor_email; |
||
| 123 | |||
| 124 | /** |
||
| 125 | * @var string |
||
| 126 | */ |
||
| 127 | protected $clearing_date; |
||
| 128 | |||
| 129 | /** |
||
| 130 | * @var string |
||
| 131 | */ |
||
| 132 | protected $clearing_amount; |
||
| 133 | |||
| 134 | /** |
||
| 135 | * @param string $clearing_bankaccount |
||
| 136 | * |
||
| 137 | * @return void |
||
| 138 | */ |
||
| 139 | public function setClearingBankaccount($clearing_bankaccount) |
||
| 140 | { |
||
| 141 | $this->clearing_bankaccount = $clearing_bankaccount; |
||
| 142 | } |
||
| 143 | |||
| 144 | /** |
||
| 145 | * @return string |
||
| 146 | */ |
||
| 147 | public function getClearingBankaccount() |
||
| 148 | { |
||
| 149 | return $this->clearing_bankaccount; |
||
| 150 | } |
||
| 151 | |||
| 152 | /** |
||
| 153 | * @param string $clearing_bankaccountholder |
||
| 154 | * |
||
| 155 | * @return void |
||
| 156 | */ |
||
| 157 | public function setClearingBankaccountholder($clearing_bankaccountholder) |
||
| 158 | { |
||
| 159 | $this->clearing_bankaccountholder = $clearing_bankaccountholder; |
||
| 160 | } |
||
| 161 | |||
| 162 | /** |
||
| 163 | * @return string |
||
| 164 | */ |
||
| 165 | public function getClearingBankaccountholder() |
||
| 166 | { |
||
| 167 | return $this->clearing_bankaccountholder; |
||
| 168 | } |
||
| 169 | |||
| 170 | /** |
||
| 171 | * @param string $clearing_bankbic |
||
| 172 | * |
||
| 173 | * @return void |
||
| 174 | */ |
||
| 175 | public function setClearingBankbic($clearing_bankbic) |
||
| 176 | { |
||
| 177 | $this->clearing_bankbic = $clearing_bankbic; |
||
| 178 | } |
||
| 179 | |||
| 180 | /** |
||
| 181 | * @return string |
||
| 182 | */ |
||
| 183 | public function getClearingBankbic() |
||
| 184 | { |
||
| 185 | return $this->clearing_bankbic; |
||
| 186 | } |
||
| 187 | |||
| 188 | /** |
||
| 189 | * @param string $clearing_bankcity |
||
| 190 | * |
||
| 191 | * @return void |
||
| 192 | */ |
||
| 193 | public function setClearingBankcity($clearing_bankcity) |
||
| 194 | { |
||
| 195 | $this->clearing_bankcity = $clearing_bankcity; |
||
| 196 | } |
||
| 197 | |||
| 198 | /** |
||
| 199 | * @return string |
||
| 200 | */ |
||
| 201 | public function getClearingBankcity() |
||
| 202 | { |
||
| 203 | return $this->clearing_bankcity; |
||
| 204 | } |
||
| 205 | |||
| 206 | /** |
||
| 207 | * @param string $clearing_bankcode |
||
| 208 | * |
||
| 209 | * @return void |
||
| 210 | */ |
||
| 211 | public function setClearingBankcode($clearing_bankcode) |
||
| 212 | { |
||
| 213 | $this->clearing_bankcode = $clearing_bankcode; |
||
| 214 | } |
||
| 215 | |||
| 216 | /** |
||
| 217 | * @return string |
||
| 218 | */ |
||
| 219 | public function getClearingBankcode() |
||
| 220 | { |
||
| 221 | return $this->clearing_bankcode; |
||
| 222 | } |
||
| 223 | |||
| 224 | /** |
||
| 225 | * @param string $clearing_bankcountry |
||
| 226 | * |
||
| 227 | * @return void |
||
| 228 | */ |
||
| 229 | public function setClearingBankcountry($clearing_bankcountry) |
||
| 230 | { |
||
| 231 | $this->clearing_bankcountry = $clearing_bankcountry; |
||
| 232 | } |
||
| 233 | |||
| 234 | /** |
||
| 235 | * @return string |
||
| 236 | */ |
||
| 237 | public function getClearingBankcountry() |
||
| 238 | { |
||
| 239 | return $this->clearing_bankcountry; |
||
| 240 | } |
||
| 241 | |||
| 242 | /** |
||
| 243 | * @param string $clearing_bankiban |
||
| 244 | * |
||
| 245 | * @return void |
||
| 246 | */ |
||
| 247 | public function setClearingBankiban($clearing_bankiban) |
||
| 248 | { |
||
| 249 | $this->clearing_bankiban = $clearing_bankiban; |
||
| 250 | } |
||
| 251 | |||
| 252 | /** |
||
| 253 | * @return string |
||
| 254 | */ |
||
| 255 | public function getClearingBankiban() |
||
| 256 | { |
||
| 257 | return $this->clearing_bankiban; |
||
| 258 | } |
||
| 259 | |||
| 260 | /** |
||
| 261 | * @param string $clearing_bankname |
||
| 262 | * |
||
| 263 | * @return void |
||
| 264 | */ |
||
| 265 | public function setClearingBankname($clearing_bankname) |
||
| 266 | { |
||
| 267 | $this->clearing_bankname = $clearing_bankname; |
||
| 268 | } |
||
| 269 | |||
| 270 | /** |
||
| 271 | * @return string |
||
| 272 | */ |
||
| 273 | public function getClearingBankname() |
||
| 274 | { |
||
| 275 | return $this->clearing_bankname; |
||
| 276 | } |
||
| 277 | |||
| 278 | /** |
||
| 279 | * @param string $settleaccount |
||
| 280 | * |
||
| 281 | * @return void |
||
| 282 | */ |
||
| 283 | public function setSettleaccount($settleaccount) |
||
| 284 | { |
||
| 285 | $this->settleaccount = $settleaccount; |
||
| 286 | } |
||
| 287 | |||
| 288 | /** |
||
| 289 | * @return string |
||
| 290 | */ |
||
| 291 | public function getSettleaccount() |
||
| 292 | { |
||
| 293 | return $this->settleaccount; |
||
| 294 | } |
||
| 295 | |||
| 296 | /** |
||
| 297 | * @param int $txid |
||
| 298 | * |
||
| 299 | * @return void |
||
| 300 | */ |
||
| 301 | public function setTxid($txid) |
||
| 302 | { |
||
| 303 | $this->txid = $txid; |
||
| 304 | } |
||
| 305 | |||
| 306 | /** |
||
| 307 | * @return int |
||
| 308 | */ |
||
| 309 | public function getTxid() |
||
| 310 | { |
||
| 311 | return $this->txid; |
||
| 312 | } |
||
| 313 | |||
| 314 | /** |
||
| 315 | * @param string $clearing_duedate |
||
| 316 | * |
||
| 317 | * @return void |
||
| 318 | */ |
||
| 319 | public function setClearingDuedate($clearing_duedate) |
||
| 320 | { |
||
| 321 | $this->clearing_duedate = $clearing_duedate; |
||
| 322 | } |
||
| 323 | |||
| 324 | /** |
||
| 325 | * @return string |
||
| 326 | */ |
||
| 327 | public function getClearingDuedate() |
||
| 328 | { |
||
| 329 | return $this->clearing_duedate; |
||
| 330 | } |
||
| 331 | |||
| 332 | /** |
||
| 333 | * @param string $clearing_instructionnote |
||
| 334 | * |
||
| 335 | * @return void |
||
| 336 | */ |
||
| 337 | public function setClearingInstructionnote($clearing_instructionnote) |
||
| 338 | { |
||
| 339 | $this->clearing_instructionnote = $clearing_instructionnote; |
||
| 340 | } |
||
| 341 | |||
| 342 | /** |
||
| 343 | * @return string |
||
| 344 | */ |
||
| 345 | public function getClearingInstructionnote() |
||
| 346 | { |
||
| 347 | return $this->clearing_instructionnote; |
||
| 348 | } |
||
| 349 | |||
| 350 | /** |
||
| 351 | * @param string $clearing_legalnote |
||
| 352 | * |
||
| 353 | * @return void |
||
| 354 | */ |
||
| 355 | public function setClearingLegalnote($clearing_legalnote) |
||
| 356 | { |
||
| 357 | $this->clearing_legalnote = $clearing_legalnote; |
||
| 358 | } |
||
| 359 | |||
| 360 | /** |
||
| 361 | * @return string |
||
| 362 | */ |
||
| 363 | public function getClearingLegalnote() |
||
| 364 | { |
||
| 365 | return $this->clearing_legalnote; |
||
| 366 | } |
||
| 367 | |||
| 368 | /** |
||
| 369 | * @param string $clearing_reference |
||
| 370 | * |
||
| 371 | * @return void |
||
| 372 | */ |
||
| 373 | public function setClearingReference($clearing_reference) |
||
| 376 | } |
||
| 377 | |||
| 378 | /** |
||
| 379 | * @return string |
||
| 380 | */ |
||
| 381 | public function getClearingReference() |
||
| 382 | { |
||
| 383 | return $this->clearing_reference; |
||
| 384 | } |
||
| 385 | |||
| 386 | /** |
||
| 387 | * @param string $creditorCity |
||
| 388 | * |
||
| 389 | * @return void |
||
| 390 | */ |
||
| 391 | public function setCreditorCity($creditorCity) |
||
| 392 | { |
||
| 393 | $this->creditor_city = $creditorCity; |
||
| 394 | } |
||
| 395 | |||
| 396 | /** |
||
| 397 | * @return string |
||
| 398 | */ |
||
| 399 | public function getCreditorCity() |
||
| 400 | { |
||
| 401 | return $this->creditor_city; |
||
| 402 | } |
||
| 403 | |||
| 404 | /** |
||
| 405 | * @param string $creditorCountry |
||
| 406 | * |
||
| 407 | * @return void |
||
| 408 | */ |
||
| 409 | public function setCreditorCountry($creditorCountry) |
||
| 410 | { |
||
| 411 | $this->creditor_country = $creditorCountry; |
||
| 412 | } |
||
| 413 | |||
| 414 | /** |
||
| 415 | * @return string |
||
| 416 | */ |
||
| 417 | public function getCreditorCountry() |
||
| 418 | { |
||
| 419 | return $this->creditor_country; |
||
| 420 | } |
||
| 421 | |||
| 422 | /** |
||
| 423 | * @param string $creditorEmail |
||
| 424 | * |
||
| 425 | * @return void |
||
| 426 | */ |
||
| 427 | public function setCreditorEmail($creditorEmail) |
||
| 428 | { |
||
| 429 | $this->creditor_email = $creditorEmail; |
||
| 430 | } |
||
| 431 | |||
| 432 | /** |
||
| 433 | * @return string |
||
| 434 | */ |
||
| 435 | public function getCreditorEmail() |
||
| 436 | { |
||
| 437 | return $this->creditor_email; |
||
| 438 | } |
||
| 439 | |||
| 440 | /** |
||
| 441 | * @param string $creditorIdentifier |
||
| 442 | * |
||
| 443 | * @return void |
||
| 444 | */ |
||
| 445 | public function setCreditorIdentifier($creditorIdentifier) |
||
| 446 | { |
||
| 447 | $this->creditor_identifier = $creditorIdentifier; |
||
| 448 | } |
||
| 449 | |||
| 450 | /** |
||
| 451 | * @return string |
||
| 452 | */ |
||
| 453 | public function getCreditorIdentifier() |
||
| 454 | { |
||
| 455 | return $this->creditor_identifier; |
||
| 456 | } |
||
| 457 | |||
| 458 | /** |
||
| 459 | * @param string $creditorName |
||
| 460 | * |
||
| 461 | * @return void |
||
| 462 | */ |
||
| 463 | public function setCreditorName($creditorName) |
||
| 464 | { |
||
| 465 | $this->creditor_name = $creditorName; |
||
| 466 | } |
||
| 467 | |||
| 468 | /** |
||
| 469 | * @return string |
||
| 470 | */ |
||
| 471 | public function getCreditorName() |
||
| 472 | { |
||
| 473 | return $this->creditor_name; |
||
| 474 | } |
||
| 475 | |||
| 476 | /** |
||
| 477 | * @param string $creditorStreet |
||
| 478 | * |
||
| 479 | * @return void |
||
| 480 | */ |
||
| 481 | public function setCreditorStreet($creditorStreet) |
||
| 482 | { |
||
| 483 | $this->creditor_street = $creditorStreet; |
||
| 484 | } |
||
| 485 | |||
| 486 | /** |
||
| 487 | * @return string |
||
| 488 | */ |
||
| 489 | public function getCreditorStreet() |
||
| 490 | { |
||
| 491 | return $this->creditor_street; |
||
| 492 | } |
||
| 493 | |||
| 494 | /** |
||
| 495 | * @param string $creditorZip |
||
| 496 | * |
||
| 497 | * @return void |
||
| 498 | */ |
||
| 499 | public function setCreditorZip($creditorZip) |
||
| 500 | { |
||
| 501 | $this->creditor_zip = $creditorZip; |
||
| 502 | } |
||
| 503 | |||
| 504 | /** |
||
| 505 | * @return string |
||
| 506 | */ |
||
| 507 | public function getCreditorZip() |
||
| 508 | { |
||
| 509 | return $this->creditor_zip; |
||
| 510 | } |
||
| 511 | |||
| 512 | /** |
||
| 513 | * @param string $mandateIdentification |
||
| 514 | * |
||
| 515 | * @return void |
||
| 516 | */ |
||
| 517 | public function setMandateIdentification($mandateIdentification) |
||
| 520 | } |
||
| 521 | |||
| 522 | /** |
||
| 523 | * @return string |
||
| 524 | */ |
||
| 525 | public function getMandateIdentification() |
||
| 526 | { |
||
| 527 | return $this->mandate_identification; |
||
| 528 | } |
||
| 529 | |||
| 530 | /** |
||
| 531 | * @param string $clearingAmount |
||
| 532 | * |
||
| 533 | * @return void |
||
| 534 | */ |
||
| 535 | public function setClearingAmount($clearingAmount) |
||
| 536 | { |
||
| 537 | $this->clearing_amount = $clearingAmount; |
||
| 538 | } |
||
| 539 | |||
| 540 | /** |
||
| 541 | * @return string |
||
| 542 | */ |
||
| 543 | public function getClearingAmount() |
||
| 546 | } |
||
| 547 | |||
| 548 | /** |
||
| 549 | * @param string $clearingDate |
||
| 550 | * |
||
| 551 | * @return void |
||
| 552 | */ |
||
| 553 | public function setClearingDate($clearingDate) |
||
| 554 | { |
||
| 555 | $this->clearing_date = $clearingDate; |
||
| 556 | } |
||
| 557 | |||
| 558 | /** |
||
| 559 | * @return string |
||
| 560 | */ |
||
| 561 | public function getClearingDate() |
||
| 562 | { |
||
| 563 | return $this->clearing_date; |
||
| 564 | } |
||
| 565 | } |
||
| 566 |