Complex classes like Invoice 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. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
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 Invoice, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 10 | class Invoice |
||
| 11 | { |
||
| 12 | const INVOICE_TYPE_OUTGOING = 'outgoing'; |
||
| 13 | const INVOICE_TYPE_DRAFT = 'draft'; |
||
| 14 | const INVOICE_TYPE_CREDIT = 'credit'; |
||
| 15 | |||
| 16 | const INVOICE_SALUTATION_NONE = ''; |
||
| 17 | const INVOICE_SALUTATION_MR = 'mr'; |
||
| 18 | const INVOICE_SALUTATION_MRS = 'mrs'; |
||
| 19 | const INVOICE_SALUTATION_FAMILY = 'family'; |
||
| 20 | |||
| 21 | const INVOICE_PAYMENT_TYPE_TRANSFER = 1; |
||
| 22 | const INVOICE_PAYMENT_TYPE_DIRECT_DEBIT = 2; |
||
| 23 | const INVOICE_PAYMENT_TYPE_CASH = 3; |
||
| 24 | const INVOICE_PAYMENT_TYPE_PAYPAL = 4; |
||
| 25 | const INVOICE_PAYMENT_TYPE_ADVANCED_PAYMENT = 5; |
||
| 26 | const INVOICE_PAYMENT_TYPE_CREDIT_CARD = 6; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The invoice id. |
||
| 30 | * |
||
| 31 | * @var integer |
||
| 32 | * |
||
| 33 | * @JMS\Type("integer") |
||
| 34 | * @JMS\SerializedName("INVOICE_ID") |
||
| 35 | */ |
||
| 36 | protected $invoiceId; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The invoice external id. |
||
| 40 | * |
||
| 41 | * @var string |
||
| 42 | * |
||
| 43 | * @JMS\Type("string") |
||
| 44 | * @JMS\SerializedName("INVOICE_EXT_UID") |
||
| 45 | */ |
||
| 46 | protected $invoiceExternalId; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * The status. |
||
| 50 | * |
||
| 51 | * @var string |
||
| 52 | * |
||
| 53 | * @JMS\Type("string") |
||
| 54 | * @JMS\SerializedName("STATUS") |
||
| 55 | */ |
||
| 56 | protected $status; |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The type. |
||
| 60 | * |
||
| 61 | * @var string |
||
| 62 | * |
||
| 63 | * @JMS\Type("string") |
||
| 64 | * @JMS\SerializedName("TYPE") |
||
| 65 | */ |
||
| 66 | protected $type; |
||
| 67 | |||
| 68 | /** |
||
| 69 | * The customer ID. |
||
| 70 | * |
||
| 71 | * @var integer |
||
| 72 | * |
||
| 73 | * @JMS\Type("integer") |
||
| 74 | * @JMS\SerializedName("CUSTOMER_ID") |
||
| 75 | */ |
||
| 76 | protected $customerId; |
||
| 77 | |||
| 78 | /** |
||
| 79 | * The own customer number. |
||
| 80 | * |
||
| 81 | * @var integer |
||
| 82 | * |
||
| 83 | * @JMS\Type("integer") |
||
| 84 | * @JMS\SerializedName("CUSTOMER_NUMBER") |
||
| 85 | */ |
||
| 86 | protected $customerNumber; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * The customer cost center ID. |
||
| 90 | * |
||
| 91 | * @var integer |
||
| 92 | * |
||
| 93 | * @JMS\Type("integer") |
||
| 94 | * @JMS\SerializedName("CUSTOMER_COSTCENTER_ID") |
||
| 95 | */ |
||
| 96 | protected $customerCostCenterId; |
||
| 97 | |||
| 98 | /** |
||
| 99 | * The name of the organization. |
||
| 100 | * |
||
| 101 | * @var string |
||
| 102 | * |
||
| 103 | * @JMS\Type("string") |
||
| 104 | * @JMS\SerializedName("ORGANIZATION") |
||
| 105 | */ |
||
| 106 | protected $organization; |
||
| 107 | |||
| 108 | /** |
||
| 109 | * Salutation. |
||
| 110 | * |
||
| 111 | * @var string |
||
| 112 | * |
||
| 113 | * @JMS\Type("string") |
||
| 114 | * @JMS\SerializedName("SALUTATION") |
||
| 115 | */ |
||
| 116 | protected $salutation; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * The first name. |
||
| 120 | * |
||
| 121 | * @var string |
||
| 122 | * |
||
| 123 | * @JMS\Type("string") |
||
| 124 | * @JMS\SerializedName("FIRST_NAME") |
||
| 125 | */ |
||
| 126 | protected $firstName; |
||
| 127 | |||
| 128 | /** |
||
| 129 | * The last name. |
||
| 130 | * |
||
| 131 | * @var string |
||
| 132 | * |
||
| 133 | * @JMS\Type("string") |
||
| 134 | * @JMS\SerializedName("LAST_NAME") |
||
| 135 | */ |
||
| 136 | protected $lastName; |
||
| 137 | |||
| 138 | /** |
||
| 139 | * The address. |
||
| 140 | * |
||
| 141 | * @var string |
||
| 142 | * |
||
| 143 | * @JMS\Type("string") |
||
| 144 | * @JMS\SerializedName("ADDRESS") |
||
| 145 | */ |
||
| 146 | protected $address; |
||
| 147 | |||
| 148 | /** |
||
| 149 | * The address2. |
||
| 150 | * |
||
| 151 | * @var string |
||
| 152 | * |
||
| 153 | * @JMS\Type("string") |
||
| 154 | * @JMS\SerializedName("ADDRESS_2") |
||
| 155 | */ |
||
| 156 | protected $address2; |
||
| 157 | |||
| 158 | /** |
||
| 159 | * The zip code. |
||
| 160 | * |
||
| 161 | * @var string |
||
| 162 | * |
||
| 163 | * @JMS\Type("string") |
||
| 164 | * @JMS\SerializedName("ZIPCODE") |
||
| 165 | */ |
||
| 166 | protected $zipCode; |
||
| 167 | |||
| 168 | /** |
||
| 169 | * The city. |
||
| 170 | * |
||
| 171 | * @var string |
||
| 172 | * |
||
| 173 | * @JMS\Type("string") |
||
| 174 | * @JMS\SerializedName("CITY") |
||
| 175 | */ |
||
| 176 | protected $city; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * Some comments about the invoice. |
||
| 180 | * |
||
| 181 | * @var string |
||
| 182 | * |
||
| 183 | * @JMS\Type("string") |
||
| 184 | * @JMS\SerializedName("COMMENT") |
||
| 185 | */ |
||
| 186 | protected $comment; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * Payment type. |
||
| 190 | * |
||
| 191 | * @var integer |
||
| 192 | * |
||
| 193 | * @JMS\Type("integer") |
||
| 194 | * @JMS\SerializedName("PAYMENT_TYPE") |
||
| 195 | */ |
||
| 196 | protected $paymentType; |
||
| 197 | |||
| 198 | /** |
||
| 199 | * Days until date of payment. |
||
| 200 | * |
||
| 201 | * @var integer |
||
| 202 | * |
||
| 203 | * @JMS\Type("integer") |
||
| 204 | * @JMS\SerializedName("DAYS_FOR_PAYMENT") |
||
| 205 | */ |
||
| 206 | protected $paymentDays; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * The bank name. |
||
| 210 | * |
||
| 211 | * @var string |
||
| 212 | * |
||
| 213 | * @JMS\Type("string") |
||
| 214 | * @JMS\SerializedName("BANK_NAME") |
||
| 215 | */ |
||
| 216 | protected $bankName; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * The bank account number. |
||
| 220 | * |
||
| 221 | * @var string |
||
| 222 | * |
||
| 223 | * @JMS\Type("string") |
||
| 224 | * @JMS\SerializedName("BANK_ACCOUNT_NUMBER") |
||
| 225 | */ |
||
| 226 | protected $bankAccountNumber; |
||
| 227 | |||
| 228 | /** |
||
| 229 | * The bank code. |
||
| 230 | * |
||
| 231 | * @var string |
||
| 232 | * |
||
| 233 | * @JMS\Type("string") |
||
| 234 | * @JMS\SerializedName("BANK_CODE") |
||
| 235 | */ |
||
| 236 | protected $bankCode; |
||
| 237 | |||
| 238 | /** |
||
| 239 | * The bank account owner. |
||
| 240 | * |
||
| 241 | * @var string |
||
| 242 | * |
||
| 243 | * @JMS\Type("string") |
||
| 244 | * @JMS\SerializedName("BANK_ACCOUNT_OWNER") |
||
| 245 | */ |
||
| 246 | protected $bankAccountOwner; |
||
| 247 | |||
| 248 | /** |
||
| 249 | * The bank IBAN. |
||
| 250 | * |
||
| 251 | * @var string |
||
| 252 | * |
||
| 253 | * @JMS\Type("string") |
||
| 254 | * @JMS\SerializedName("BANK_IBAN") |
||
| 255 | */ |
||
| 256 | protected $bankIBAN; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * The bank BIC. |
||
| 260 | * |
||
| 261 | * @var string |
||
| 262 | * |
||
| 263 | * @JMS\Type("string") |
||
| 264 | * @JMS\SerializedName("BANK_BIC") |
||
| 265 | */ |
||
| 266 | protected $bankBIC; |
||
| 267 | |||
| 268 | /** |
||
| 269 | * The invoice affiliate. |
||
| 270 | * |
||
| 271 | * @var string |
||
| 272 | * |
||
| 273 | * @JMS\Type("string") |
||
| 274 | * @JMS\SerializedName("AFFILIATE") |
||
| 275 | */ |
||
| 276 | protected $affiliate; |
||
| 277 | |||
| 278 | /** |
||
| 279 | * The invoice country code (ISO 3166 ALPHA-2). |
||
| 280 | * |
||
| 281 | * @var string |
||
| 282 | * |
||
| 283 | * @JMS\Type("string") |
||
| 284 | * @JMS\SerializedName("COUNTRY_CODE") |
||
| 285 | */ |
||
| 286 | protected $countryCode; |
||
| 287 | |||
| 288 | /** |
||
| 289 | * The VAT identification number of the invoice. |
||
| 290 | * |
||
| 291 | * @var string |
||
| 292 | * |
||
| 293 | * @JMS\Type("string") |
||
| 294 | * @JMS\SerializedName("VAT_ID") |
||
| 295 | */ |
||
| 296 | protected $vatId; |
||
| 297 | |||
| 298 | /** |
||
| 299 | * The currency code of the invoice. |
||
| 300 | * |
||
| 301 | * @var string |
||
| 302 | * |
||
| 303 | * @JMS\Type("string") |
||
| 304 | * @JMS\SerializedName("CURRENCY_CODE") |
||
| 305 | */ |
||
| 306 | protected $currencyCode; |
||
| 307 | |||
| 308 | /** |
||
| 309 | * The template id. |
||
| 310 | * |
||
| 311 | * @var integer |
||
| 312 | * |
||
| 313 | * @JMS\Type("integer") |
||
| 314 | * @JMS\SerializedName("TEMPLATE_ID") |
||
| 315 | */ |
||
| 316 | protected $templateId; |
||
| 317 | |||
| 318 | /** |
||
| 319 | * The subscription id. |
||
| 320 | * |
||
| 321 | * @var integer |
||
| 322 | * |
||
| 323 | * @JMS\Type("integer") |
||
| 324 | * @JMS\SerializedName("SUBSCRIPTION_ID") |
||
| 325 | */ |
||
| 326 | protected $subscriptionId; |
||
| 327 | |||
| 328 | /** |
||
| 329 | * The subscription invoice counter. |
||
| 330 | * |
||
| 331 | * @var integer |
||
| 332 | * |
||
| 333 | * @JMS\Type("integer") |
||
| 334 | * @JMS\SerializedName("SUBSCRIPTION_INVOICE_COUNTER") |
||
| 335 | */ |
||
| 336 | protected $subscriptionInvoiceCounter; |
||
| 337 | |||
| 338 | /** |
||
| 339 | * The invoice number. |
||
| 340 | * |
||
| 341 | * @var string |
||
| 342 | * |
||
| 343 | * @JMS\Type("string") |
||
| 344 | * @JMS\SerializedName("INVOICE_NUMBER") |
||
| 345 | */ |
||
| 346 | protected $invoiceNumber; |
||
| 347 | |||
| 348 | /** |
||
| 349 | * The invoice title. |
||
| 350 | * |
||
| 351 | * @var string |
||
| 352 | * |
||
| 353 | * @JMS\Type("string") |
||
| 354 | * @JMS\SerializedName("INVOICE_TITLE") |
||
| 355 | */ |
||
| 356 | protected $invoiceTitle; |
||
| 357 | |||
| 358 | /** |
||
| 359 | * The intro text. |
||
| 360 | * |
||
| 361 | * @var string |
||
| 362 | * |
||
| 363 | * @JMS\Type("string") |
||
| 364 | * @JMS\SerializedName("INTROTEXT") |
||
| 365 | */ |
||
| 366 | protected $introText; |
||
| 367 | |||
| 368 | /** |
||
| 369 | * The date of received payment. |
||
| 370 | * |
||
| 371 | * @var \DateTime |
||
| 372 | * |
||
| 373 | * @JMS\Type("DateTime<'Y-m-d H:i:s', 'UTC'>") |
||
| 374 | * @JMS\SerializedName("PAID_DATE") |
||
| 375 | */ |
||
| 376 | protected $paidDate; |
||
| 377 | |||
| 378 | /** |
||
| 379 | * The outstanding amount. |
||
| 380 | * |
||
| 381 | * @var string |
||
| 382 | * |
||
| 383 | * @JMS\Type("string") |
||
| 384 | * @JMS\SerializedName("OUTSTANDING_AMOUNT") |
||
| 385 | */ |
||
| 386 | protected $outstandingAmount; |
||
| 387 | |||
| 388 | /** |
||
| 389 | * The Flag for canceled status: 0 = no | 1 = yes. |
||
| 390 | * |
||
| 391 | * @var integer |
||
| 392 | * |
||
| 393 | * @JMS\Type("integer") |
||
| 394 | * @JMS\SerializedName("IS_CANCELED") |
||
| 395 | */ |
||
| 396 | protected $isCanceled; |
||
| 397 | |||
| 398 | /** |
||
| 399 | * The invoice date. |
||
| 400 | * |
||
| 401 | * @var \DateTime |
||
| 402 | * |
||
| 403 | * @JMS\Type("DateTime<'Y-m-d', 'UTC'>") |
||
| 404 | * @JMS\SerializedName("INVOICE_DATE") |
||
| 405 | * |
||
| 406 | */ |
||
| 407 | protected $invoiceDate; |
||
| 408 | |||
| 409 | /** |
||
| 410 | * The due date. |
||
| 411 | * |
||
| 412 | * We serialize it as string because of inconsistencies in the Fastbill API response. |
||
| 413 | * Depending on the customer, the due date may or may not hve a time component in the response. |
||
| 414 | * |
||
| 415 | * @var \DateTime |
||
| 416 | * |
||
| 417 | * @JMS\Type("string") |
||
| 418 | * @JMS\SerializedName("DUE_DATE") |
||
| 419 | */ |
||
| 420 | protected $dueDate; |
||
| 421 | |||
| 422 | /** |
||
| 423 | * The delivery date. |
||
| 424 | * |
||
| 425 | * @var string |
||
| 426 | * |
||
| 427 | * @JMS\Type("string") |
||
| 428 | * @JMS\SerializedName("DELIVERY_DATE") |
||
| 429 | */ |
||
| 430 | protected $deliveryDate; |
||
| 431 | |||
| 432 | /** |
||
| 433 | * The cash discount percent. |
||
| 434 | * |
||
| 435 | * @var string |
||
| 436 | * |
||
| 437 | * @JMS\Type("string") |
||
| 438 | * @JMS\SerializedName("CASH_DISCOUNT_PERCENT") |
||
| 439 | */ |
||
| 440 | protected $cashDiscountPercent; |
||
| 441 | |||
| 442 | /** |
||
| 443 | * The cash discount days. |
||
| 444 | * |
||
| 445 | * @var string |
||
| 446 | * |
||
| 447 | * @JMS\Type("string") |
||
| 448 | * @JMS\SerializedName("CASH_DISCOUNT_DAYS") |
||
| 449 | */ |
||
| 450 | protected $cashDiscountDays; |
||
| 451 | |||
| 452 | /** |
||
| 453 | * The cash discount percent. |
||
| 454 | * |
||
| 455 | * @var float |
||
| 456 | * |
||
| 457 | * @JMS\Type("float") |
||
| 458 | * @JMS\SerializedName("SUB_TOTAL") |
||
| 459 | */ |
||
| 460 | protected $subTotal; |
||
| 461 | |||
| 462 | /** |
||
| 463 | * The cash discount percent. |
||
| 464 | * |
||
| 465 | * @var float |
||
| 466 | * |
||
| 467 | * @JMS\Type("float") |
||
| 468 | * @JMS\SerializedName("VAT_TOTAL") |
||
| 469 | */ |
||
| 470 | protected $vatTotal; |
||
| 471 | |||
| 472 | /** |
||
| 473 | * List of all articles for one entity. |
||
| 474 | * |
||
| 475 | * @var array |
||
| 476 | * |
||
| 477 | * @JMS\Type("array<Speicher210\Fastbill\Api\Model\InvoiceVatItem>") |
||
| 478 | * @JMS\SerializedName("VAT_ITEMS") |
||
| 479 | */ |
||
| 480 | protected $vatItems = array(); |
||
| 481 | |||
| 482 | /** |
||
| 483 | * List of the items |
||
| 484 | * |
||
| 485 | * @var array |
||
| 486 | * |
||
| 487 | * @JMS\Type("array<Speicher210\Fastbill\Api\Model\InvoiceItem>") |
||
| 488 | * @JMS\SerializedName("ITEMS") |
||
| 489 | */ |
||
| 490 | protected $items = array(); |
||
| 491 | |||
| 492 | /** |
||
| 493 | * The total. |
||
| 494 | * |
||
| 495 | * @var float |
||
| 496 | * |
||
| 497 | * @JMS\Type("float") |
||
| 498 | * @JMS\SerializedName("TOTAL") |
||
| 499 | */ |
||
| 500 | protected $total; |
||
| 501 | |||
| 502 | /** |
||
| 503 | * The payment info. |
||
| 504 | * |
||
| 505 | * @var string |
||
| 506 | * |
||
| 507 | * @JMS\Type("string") |
||
| 508 | * @JMS\SerializedName("PAYMENT_INFO") |
||
| 509 | */ |
||
| 510 | protected $paymentInfo; |
||
| 511 | |||
| 512 | /** |
||
| 513 | * The document url. |
||
| 514 | * |
||
| 515 | * @var string |
||
| 516 | * |
||
| 517 | * @JMS\Type("string") |
||
| 518 | * @JMS\SerializedName("DOCUMENT_URL") |
||
| 519 | */ |
||
| 520 | protected $documentUrl; |
||
| 521 | |||
| 522 | /** |
||
| 523 | * List of shipment-events belonging to the invoice. |
||
| 524 | * |
||
| 525 | * @var array |
||
| 526 | * |
||
| 527 | * @JMS\Type("array") |
||
| 528 | * @JMS\SerializedName("SHIPMENTS") |
||
| 529 | */ |
||
| 530 | protected $shipments = array(); |
||
| 531 | |||
| 532 | /** |
||
| 533 | * The PayPal url. |
||
| 534 | * |
||
| 535 | * @var string |
||
| 536 | * |
||
| 537 | * @JMS\Type("string") |
||
| 538 | * @JMS\SerializedName("PAYPAL_URL") |
||
| 539 | */ |
||
| 540 | protected $payPalUrl; |
||
| 541 | |||
| 542 | /** |
||
| 543 | * Get the invoice ID. |
||
| 544 | * |
||
| 545 | * @return int |
||
| 546 | */ |
||
| 547 | public function getInvoiceId() |
||
| 551 | |||
| 552 | /** |
||
| 553 | * Set the invoice ID. |
||
| 554 | * |
||
| 555 | * @param int $invoiceId |
||
| 556 | * @return Invoice |
||
| 557 | */ |
||
| 558 | 6 | public function setInvoiceId($invoiceId) |
|
| 564 | |||
| 565 | /** |
||
| 566 | * Get the invoice external ID. |
||
| 567 | * |
||
| 568 | * @return string |
||
| 569 | */ |
||
| 570 | public function getInvoiceExternalId() |
||
| 574 | |||
| 575 | /** |
||
| 576 | * Set the invoice external ID. |
||
| 577 | * |
||
| 578 | * @param string $invoiceExternalId |
||
| 579 | * @return Invoice |
||
| 580 | */ |
||
| 581 | 6 | public function setInvoiceExternalId($invoiceExternalId) |
|
| 587 | |||
| 588 | /** |
||
| 589 | * Get the status. |
||
| 590 | * |
||
| 591 | * @return string |
||
| 592 | */ |
||
| 593 | public function getStatus() |
||
| 597 | |||
| 598 | /** |
||
| 599 | * Set the status. |
||
| 600 | * |
||
| 601 | * @param string $status |
||
| 602 | * @return Invoice |
||
| 603 | */ |
||
| 604 | 6 | public function setStatus($status) |
|
| 610 | |||
| 611 | /** |
||
| 612 | * Get the type of the invoice. |
||
| 613 | * |
||
| 614 | * @return string |
||
| 615 | */ |
||
| 616 | public function getType() |
||
| 620 | |||
| 621 | /** |
||
| 622 | * Set the type of the invoice. |
||
| 623 | * |
||
| 624 | * @param string $type |
||
| 625 | * @return Invoice |
||
| 626 | */ |
||
| 627 | 6 | public function setType($type) |
|
| 633 | |||
| 634 | /** |
||
| 635 | * Get the customer ID. |
||
| 636 | * |
||
| 637 | * @return int |
||
| 638 | */ |
||
| 639 | public function getCustomerId() |
||
| 643 | |||
| 644 | /** |
||
| 645 | * Set the customer ID. |
||
| 646 | * |
||
| 647 | * @param int $customerId |
||
| 648 | * @return Invoice |
||
| 649 | */ |
||
| 650 | 6 | public function setCustomerId($customerId) |
|
| 656 | |||
| 657 | /** |
||
| 658 | * Get the customer number. |
||
| 659 | * |
||
| 660 | * @return int |
||
| 661 | */ |
||
| 662 | public function getCustomerNumber() |
||
| 666 | |||
| 667 | /** |
||
| 668 | * Set the customer number. |
||
| 669 | * |
||
| 670 | * @param int $customerNumber |
||
| 671 | * @return Invoice |
||
| 672 | */ |
||
| 673 | 6 | public function setCustomerNumber($customerNumber) |
|
| 679 | |||
| 680 | /** |
||
| 681 | * Get the customer cost center ID. |
||
| 682 | * |
||
| 683 | * @return int |
||
| 684 | */ |
||
| 685 | public function getCustomerCostCenterId() |
||
| 689 | |||
| 690 | /** |
||
| 691 | * Set the customer cost center ID. |
||
| 692 | * |
||
| 693 | * @param int $customerCostCenterId |
||
| 694 | * @return Invoice |
||
| 695 | */ |
||
| 696 | 6 | public function setCustomerCostCenterId($customerCostCenterId) |
|
| 702 | |||
| 703 | /** |
||
| 704 | * Get the organization. |
||
| 705 | * |
||
| 706 | * @return string |
||
| 707 | */ |
||
| 708 | public function getOrganization() |
||
| 712 | |||
| 713 | /** |
||
| 714 | * Set the organization. |
||
| 715 | * |
||
| 716 | * @param string $organization |
||
| 717 | * @return Invoice |
||
| 718 | */ |
||
| 719 | 6 | public function setOrganization($organization) |
|
| 725 | |||
| 726 | /** |
||
| 727 | * Get the salutation. |
||
| 728 | * |
||
| 729 | * @return string |
||
| 730 | */ |
||
| 731 | public function getSalutation() |
||
| 735 | |||
| 736 | /** |
||
| 737 | * Set the salutation. |
||
| 738 | * |
||
| 739 | * @param string $salutation |
||
| 740 | * @return Invoice |
||
| 741 | */ |
||
| 742 | 6 | public function setSalutation($salutation) |
|
| 748 | |||
| 749 | /** |
||
| 750 | * Set the first name. |
||
| 751 | * |
||
| 752 | * @param string $firstName The name. |
||
| 753 | * @return Invoice |
||
| 754 | */ |
||
| 755 | 6 | public function setFirstName($firstName) |
|
| 761 | |||
| 762 | /** |
||
| 763 | * Get the last name. |
||
| 764 | * |
||
| 765 | * @return string |
||
| 766 | */ |
||
| 767 | public function getLastName() |
||
| 771 | |||
| 772 | /** |
||
| 773 | * Set the last name. |
||
| 774 | * |
||
| 775 | * @param string $lastName The last name. |
||
| 776 | * @return Invoice |
||
| 777 | */ |
||
| 778 | 6 | public function setLastName($lastName) |
|
| 784 | |||
| 785 | /** |
||
| 786 | * Get the address. |
||
| 787 | * |
||
| 788 | * @return string |
||
| 789 | */ |
||
| 790 | public function getAddress() |
||
| 794 | |||
| 795 | /** |
||
| 796 | * Set the address. |
||
| 797 | * |
||
| 798 | * @param string $address The address. |
||
| 799 | * @return Invoice |
||
| 800 | */ |
||
| 801 | 6 | public function setAddress($address) |
|
| 807 | |||
| 808 | /** |
||
| 809 | * Get the address 2. |
||
| 810 | * |
||
| 811 | * @return string |
||
| 812 | */ |
||
| 813 | public function getAddress2() |
||
| 817 | |||
| 818 | /** |
||
| 819 | * Set the address 2. |
||
| 820 | * |
||
| 821 | * @param string $address2 The address. |
||
| 822 | * @return Invoice |
||
| 823 | */ |
||
| 824 | 6 | public function setAddress2($address2) |
|
| 830 | |||
| 831 | /** |
||
| 832 | * Get the zip code. |
||
| 833 | * |
||
| 834 | * @return string |
||
| 835 | */ |
||
| 836 | public function getZipCode() |
||
| 840 | |||
| 841 | /** |
||
| 842 | * Set the zip code. |
||
| 843 | * |
||
| 844 | * @param string $zipCode The zip code. |
||
| 845 | * @return Invoice |
||
| 846 | */ |
||
| 847 | 6 | public function setZipCode($zipCode) |
|
| 853 | |||
| 854 | /** |
||
| 855 | * Get the city. |
||
| 856 | * |
||
| 857 | * @return string |
||
| 858 | */ |
||
| 859 | public function getCity() |
||
| 863 | |||
| 864 | /** |
||
| 865 | * Set the city. |
||
| 866 | * |
||
| 867 | * @param string $city The city. |
||
| 868 | * @return Invoice |
||
| 869 | */ |
||
| 870 | 6 | public function setCity($city) |
|
| 876 | |||
| 877 | /** |
||
| 878 | * Get the comment. |
||
| 879 | * |
||
| 880 | * @return string |
||
| 881 | */ |
||
| 882 | public function getComment() |
||
| 886 | |||
| 887 | /** |
||
| 888 | * Set the comment. |
||
| 889 | * |
||
| 890 | * @param string $comment |
||
| 891 | * @return Invoice |
||
| 892 | */ |
||
| 893 | 6 | public function setComment($comment) |
|
| 899 | |||
| 900 | /** |
||
| 901 | * Get the payment type. |
||
| 902 | * |
||
| 903 | * @return int |
||
| 904 | */ |
||
| 905 | public function getPaymentType() |
||
| 909 | |||
| 910 | /** |
||
| 911 | * Set the payment type. |
||
| 912 | * |
||
| 913 | * @param int $paymentType |
||
| 914 | * @return Invoice |
||
| 915 | */ |
||
| 916 | 6 | public function setPaymentType($paymentType) |
|
| 922 | |||
| 923 | /** |
||
| 924 | * Get the payment days. |
||
| 925 | * |
||
| 926 | * @return int |
||
| 927 | */ |
||
| 928 | public function getPaymentDays() |
||
| 932 | |||
| 933 | /** |
||
| 934 | * Set the payment days. |
||
| 935 | * |
||
| 936 | * @param int $paymentDays |
||
| 937 | * @return Invoice |
||
| 938 | */ |
||
| 939 | 6 | public function setPaymentDays($paymentDays) |
|
| 945 | |||
| 946 | /** |
||
| 947 | * Get the bank name. |
||
| 948 | * |
||
| 949 | * @return string |
||
| 950 | */ |
||
| 951 | public function getBankName() |
||
| 955 | |||
| 956 | /** |
||
| 957 | * Get the bank name. |
||
| 958 | * |
||
| 959 | * @param string $bankName The name of the back. |
||
| 960 | * @return Invoice |
||
| 961 | */ |
||
| 962 | public function setBankName($bankName) |
||
| 968 | |||
| 969 | /** |
||
| 970 | * Get the bank account number. |
||
| 971 | * |
||
| 972 | * @return string |
||
| 973 | */ |
||
| 974 | public function getBankAccountNumber() |
||
| 978 | |||
| 979 | /** |
||
| 980 | * Set the bank account number. |
||
| 981 | * |
||
| 982 | * @param string $bankAccountNumber |
||
| 983 | * @return Invoice |
||
| 984 | */ |
||
| 985 | public function setBankAccountNumber($bankAccountNumber) |
||
| 991 | |||
| 992 | /** |
||
| 993 | * Get the bank code. |
||
| 994 | * |
||
| 995 | * @return string |
||
| 996 | */ |
||
| 997 | public function getBankCode() |
||
| 1001 | |||
| 1002 | /** |
||
| 1003 | * Set the bank code. |
||
| 1004 | * |
||
| 1005 | * @param string $bankCode The code. |
||
| 1006 | * @return Invoice |
||
| 1007 | */ |
||
| 1008 | public function setBankCode($bankCode) |
||
| 1014 | |||
| 1015 | /** |
||
| 1016 | * Get the bank account owner. |
||
| 1017 | * |
||
| 1018 | * @return string |
||
| 1019 | */ |
||
| 1020 | public function getBankAccountOwner() |
||
| 1024 | |||
| 1025 | /** |
||
| 1026 | * Set the bank account owner. |
||
| 1027 | * |
||
| 1028 | * @param string $bankAccountOwner The owner. |
||
| 1029 | * @return Invoice |
||
| 1030 | */ |
||
| 1031 | public function setBankAccountOwner($bankAccountOwner) |
||
| 1037 | |||
| 1038 | /** |
||
| 1039 | * Get the bank IBAN. |
||
| 1040 | * |
||
| 1041 | * @return string |
||
| 1042 | */ |
||
| 1043 | public function getBankIBAN() |
||
| 1047 | |||
| 1048 | /** |
||
| 1049 | * Set the bank IBAN. |
||
| 1050 | * |
||
| 1051 | * @param string $bankIBAN The IBAN code. |
||
| 1052 | * @return Invoice |
||
| 1053 | */ |
||
| 1054 | public function setBankIBAN($bankIBAN) |
||
| 1060 | |||
| 1061 | /** |
||
| 1062 | * Get the bank BIC. |
||
| 1063 | * |
||
| 1064 | * @return string |
||
| 1065 | */ |
||
| 1066 | public function getBankBIC() |
||
| 1070 | |||
| 1071 | /** |
||
| 1072 | * Set the bank BIC. |
||
| 1073 | * |
||
| 1074 | * @param string $bankBIC The BIC. |
||
| 1075 | * @return Invoice |
||
| 1076 | */ |
||
| 1077 | public function setBankBIC($bankBIC) |
||
| 1083 | |||
| 1084 | /** |
||
| 1085 | * Get the affiliate. |
||
| 1086 | * |
||
| 1087 | * @return string |
||
| 1088 | */ |
||
| 1089 | public function getAffiliate() |
||
| 1093 | |||
| 1094 | /** |
||
| 1095 | * Set the affiliate. |
||
| 1096 | * |
||
| 1097 | * @param string $affiliate |
||
| 1098 | * @return Invoice |
||
| 1099 | */ |
||
| 1100 | public function setAffiliate($affiliate) |
||
| 1106 | |||
| 1107 | /** |
||
| 1108 | * Get the country code. |
||
| 1109 | * |
||
| 1110 | * @return string |
||
| 1111 | */ |
||
| 1112 | public function getCountryCode() |
||
| 1116 | |||
| 1117 | /** |
||
| 1118 | * Set the country code (ISO 3166 ALPHA-2). |
||
| 1119 | * |
||
| 1120 | * @param string $countryCode |
||
| 1121 | * @return Invoice |
||
| 1122 | */ |
||
| 1123 | 6 | public function setCountryCode($countryCode) |
|
| 1129 | |||
| 1130 | /** |
||
| 1131 | * Get the vat ID. |
||
| 1132 | * |
||
| 1133 | * @return string |
||
| 1134 | */ |
||
| 1135 | public function getVatId() |
||
| 1139 | |||
| 1140 | /** |
||
| 1141 | * Set the vat ID. |
||
| 1142 | * |
||
| 1143 | * @param string $vatId |
||
| 1144 | * @return Invoice |
||
| 1145 | */ |
||
| 1146 | 6 | public function setVatId($vatId) |
|
| 1152 | |||
| 1153 | /** |
||
| 1154 | * Get the currency code. |
||
| 1155 | * |
||
| 1156 | * @return string |
||
| 1157 | */ |
||
| 1158 | public function getCurrencyCode() |
||
| 1162 | |||
| 1163 | /** |
||
| 1164 | * Set the currency code. |
||
| 1165 | * |
||
| 1166 | * @param string $currencyCode |
||
| 1167 | * @return Invoice |
||
| 1168 | */ |
||
| 1169 | 6 | public function setCurrencyCode($currencyCode) |
|
| 1175 | |||
| 1176 | /** |
||
| 1177 | * Get the template ID. |
||
| 1178 | * |
||
| 1179 | * @return int |
||
| 1180 | */ |
||
| 1181 | public function getTemplateId() |
||
| 1185 | |||
| 1186 | /** |
||
| 1187 | * Set the template ID. |
||
| 1188 | * |
||
| 1189 | * @param int $templateId |
||
| 1190 | * @return Invoice |
||
| 1191 | */ |
||
| 1192 | 6 | public function setTemplateId($templateId) |
|
| 1198 | |||
| 1199 | /** |
||
| 1200 | * Get the subscription ID. |
||
| 1201 | * |
||
| 1202 | * @return int |
||
| 1203 | */ |
||
| 1204 | public function getSubscriptionId() |
||
| 1208 | |||
| 1209 | /** |
||
| 1210 | * Set the subscription ID. |
||
| 1211 | * |
||
| 1212 | * @param int $subscriptionId |
||
| 1213 | * @return Invoice |
||
| 1214 | */ |
||
| 1215 | 6 | public function setSubscriptionId($subscriptionId) |
|
| 1221 | |||
| 1222 | /** |
||
| 1223 | * Get the invoice number. |
||
| 1224 | * |
||
| 1225 | * @return string |
||
| 1226 | */ |
||
| 1227 | public function getInvoiceNumber() |
||
| 1231 | |||
| 1232 | /** |
||
| 1233 | * Set the invoice number. |
||
| 1234 | * |
||
| 1235 | * @param string $invoiceNumber |
||
| 1236 | * @return Invoice |
||
| 1237 | */ |
||
| 1238 | 6 | public function setInvoiceNumber($invoiceNumber) |
|
| 1244 | |||
| 1245 | /** |
||
| 1246 | * Get the invoice title. |
||
| 1247 | * |
||
| 1248 | * @return string |
||
| 1249 | */ |
||
| 1250 | public function getInvoiceTitle() |
||
| 1254 | |||
| 1255 | /** |
||
| 1256 | * Set the invoice title. |
||
| 1257 | * |
||
| 1258 | * @param string $invoiceTitle |
||
| 1259 | * @return Invoice |
||
| 1260 | */ |
||
| 1261 | 6 | public function setInvoiceTitle($invoiceTitle) |
|
| 1267 | |||
| 1268 | /** |
||
| 1269 | * Get the intro text. |
||
| 1270 | * |
||
| 1271 | * @return string |
||
| 1272 | */ |
||
| 1273 | public function getIntroText() |
||
| 1277 | |||
| 1278 | /** |
||
| 1279 | * Set the intro text. |
||
| 1280 | * |
||
| 1281 | * @param string $introText |
||
| 1282 | * @return Invoice |
||
| 1283 | */ |
||
| 1284 | 6 | public function setIntroText($introText) |
|
| 1290 | |||
| 1291 | /** |
||
| 1292 | * Get paid date. |
||
| 1293 | * |
||
| 1294 | * @return \DateTime |
||
| 1295 | */ |
||
| 1296 | public function getPaidDate() |
||
| 1300 | |||
| 1301 | /** |
||
| 1302 | * Set paid date. |
||
| 1303 | * |
||
| 1304 | * @param \DateTime $paidDate |
||
| 1305 | * @return Invoice |
||
| 1306 | */ |
||
| 1307 | 6 | public function setPaidDate($paidDate) |
|
| 1313 | |||
| 1314 | /** |
||
| 1315 | * Get if the invoice is canceled. |
||
| 1316 | * |
||
| 1317 | * @return int |
||
| 1318 | */ |
||
| 1319 | public function getIsCanceled() |
||
| 1323 | |||
| 1324 | /** |
||
| 1325 | * Set if the invoice is canceled. |
||
| 1326 | * |
||
| 1327 | * @param int $isCanceled |
||
| 1328 | * @return Invoice |
||
| 1329 | */ |
||
| 1330 | 6 | public function setIsCanceled($isCanceled) |
|
| 1336 | |||
| 1337 | /** |
||
| 1338 | * Get the invoice date. |
||
| 1339 | * |
||
| 1340 | * @return \DateTime |
||
| 1341 | */ |
||
| 1342 | 6 | public function getInvoiceDate() |
|
| 1346 | |||
| 1347 | /** |
||
| 1348 | * Set the invoice date. |
||
| 1349 | * |
||
| 1350 | * @param \DateTime $invoiceDate |
||
| 1351 | * @return Invoice |
||
| 1352 | */ |
||
| 1353 | 6 | public function setInvoiceDate($invoiceDate) |
|
| 1359 | |||
| 1360 | /** |
||
| 1361 | * Get the due date. |
||
| 1362 | * |
||
| 1363 | * @return \DateTime |
||
| 1364 | */ |
||
| 1365 | 6 | public function getDueDate() |
|
| 1369 | |||
| 1370 | /** |
||
| 1371 | * Set the due date. |
||
| 1372 | * |
||
| 1373 | * @param \DateTime $dueDate |
||
| 1374 | * @return Invoice |
||
| 1375 | */ |
||
| 1376 | 6 | public function setDueDate($dueDate) |
|
| 1382 | |||
| 1383 | /** |
||
| 1384 | * Get delivery date. |
||
| 1385 | * |
||
| 1386 | * @return string |
||
| 1387 | */ |
||
| 1388 | public function getDeliveryDate() |
||
| 1392 | |||
| 1393 | /** |
||
| 1394 | * Set the delivery date. |
||
| 1395 | * |
||
| 1396 | * @param string $deliveryDate |
||
| 1397 | * @return Invoice |
||
| 1398 | */ |
||
| 1399 | 6 | public function setDeliveryDate($deliveryDate) |
|
| 1405 | |||
| 1406 | /** |
||
| 1407 | * Get the cash discount percent. |
||
| 1408 | * |
||
| 1409 | * @return string |
||
| 1410 | */ |
||
| 1411 | public function getCashDiscountPercent() |
||
| 1415 | |||
| 1416 | /** |
||
| 1417 | * Set the cash discount percent. |
||
| 1418 | * |
||
| 1419 | * @param string $cashDiscountPercent |
||
| 1420 | * @return Invoice |
||
| 1421 | */ |
||
| 1422 | 6 | public function setCashDiscountPercent($cashDiscountPercent) |
|
| 1428 | |||
| 1429 | /** |
||
| 1430 | * Get the cash discount days. |
||
| 1431 | * |
||
| 1432 | * @return string |
||
| 1433 | */ |
||
| 1434 | public function getCashDiscountDays() |
||
| 1438 | |||
| 1439 | /** |
||
| 1440 | * Set the cash discount days. |
||
| 1441 | * |
||
| 1442 | * @param string $cashDiscountDays |
||
| 1443 | * @return Invoice |
||
| 1444 | */ |
||
| 1445 | 6 | public function setCashDiscountDays($cashDiscountDays) |
|
| 1451 | |||
| 1452 | /** |
||
| 1453 | * Get the sub total. |
||
| 1454 | * |
||
| 1455 | * @return float |
||
| 1456 | */ |
||
| 1457 | public function getSubTotal() |
||
| 1461 | |||
| 1462 | /** |
||
| 1463 | * Set the sub total. |
||
| 1464 | * |
||
| 1465 | * @param float $subTotal |
||
| 1466 | * @return Invoice |
||
| 1467 | */ |
||
| 1468 | 6 | public function setSubTotal($subTotal) |
|
| 1474 | |||
| 1475 | /** |
||
| 1476 | * Get the vat total. |
||
| 1477 | * |
||
| 1478 | * @return float |
||
| 1479 | */ |
||
| 1480 | public function getVatTotal() |
||
| 1484 | |||
| 1485 | /** |
||
| 1486 | * Set the vat total. |
||
| 1487 | * |
||
| 1488 | * @param float $vatTotal |
||
| 1489 | * @return Invoice |
||
| 1490 | */ |
||
| 1491 | 6 | public function setVatTotal($vatTotal) |
|
| 1497 | |||
| 1498 | /** |
||
| 1499 | * Get the vat items. |
||
| 1500 | * |
||
| 1501 | * @return array |
||
| 1502 | */ |
||
| 1503 | public function getVatItems() |
||
| 1507 | |||
| 1508 | /** |
||
| 1509 | * Set the vat items. |
||
| 1510 | * |
||
| 1511 | * @param InvoiceVatItem[] $vatItems |
||
| 1512 | * @return Invoice |
||
| 1513 | */ |
||
| 1514 | public function setVatItems(array $vatItems) |
||
| 1520 | |||
| 1521 | /** |
||
| 1522 | * Add a vat item. |
||
| 1523 | * |
||
| 1524 | * @param InvoiceVatItem $vatItem The vat item to add. |
||
| 1525 | */ |
||
| 1526 | 6 | public function addVatItem(InvoiceVatItem $vatItem) |
|
| 1530 | |||
| 1531 | /** |
||
| 1532 | * Get the items. |
||
| 1533 | * |
||
| 1534 | * @return array |
||
| 1535 | */ |
||
| 1536 | public function getItems() |
||
| 1540 | |||
| 1541 | /** |
||
| 1542 | * Set the items. |
||
| 1543 | * |
||
| 1544 | * @param InvoiceItem[] $items The items. |
||
| 1545 | * @return Invoice |
||
| 1546 | */ |
||
| 1547 | public function setItems(array $items) |
||
| 1553 | |||
| 1554 | /** |
||
| 1555 | * Add an item. |
||
| 1556 | * |
||
| 1557 | * @param InvoiceItem $item The item to add. |
||
| 1558 | */ |
||
| 1559 | 6 | public function addItem(InvoiceItem $item) |
|
| 1563 | |||
| 1564 | /** |
||
| 1565 | * Get the total. |
||
| 1566 | * |
||
| 1567 | * @return float |
||
| 1568 | */ |
||
| 1569 | public function getTotal() |
||
| 1573 | |||
| 1574 | /** |
||
| 1575 | * Set the total. |
||
| 1576 | * |
||
| 1577 | * @param float $total |
||
| 1578 | * @return Invoice |
||
| 1579 | */ |
||
| 1580 | 6 | public function setTotal($total) |
|
| 1586 | |||
| 1587 | /** |
||
| 1588 | * Get the payment info. |
||
| 1589 | * |
||
| 1590 | * @return string |
||
| 1591 | */ |
||
| 1592 | public function getPaymentInfo() |
||
| 1596 | |||
| 1597 | /** |
||
| 1598 | * Set the payment info. |
||
| 1599 | * |
||
| 1600 | * @param string $paymentInfo |
||
| 1601 | * @return Invoice |
||
| 1602 | */ |
||
| 1603 | 6 | public function setPaymentInfo($paymentInfo) |
|
| 1609 | |||
| 1610 | /** |
||
| 1611 | * Get the document url. |
||
| 1612 | * |
||
| 1613 | * @return string |
||
| 1614 | */ |
||
| 1615 | public function getDocumentUrl() |
||
| 1619 | |||
| 1620 | /** |
||
| 1621 | * Set the document url. |
||
| 1622 | * |
||
| 1623 | * @param string $documentUrl |
||
| 1624 | * @return Invoice |
||
| 1625 | */ |
||
| 1626 | 6 | public function setDocumentUrl($documentUrl) |
|
| 1632 | |||
| 1633 | /** |
||
| 1634 | * Get the shipments. |
||
| 1635 | * |
||
| 1636 | * @return array |
||
| 1637 | */ |
||
| 1638 | public function getShipments() |
||
| 1642 | |||
| 1643 | /** |
||
| 1644 | * Set the shipments. |
||
| 1645 | * |
||
| 1646 | * @param array $shipments |
||
| 1647 | * @return Invoice |
||
| 1648 | */ |
||
| 1649 | public function setShipments(array $shipments) |
||
| 1655 | |||
| 1656 | /** |
||
| 1657 | * Get the PayPal url. |
||
| 1658 | * |
||
| 1659 | * @return string |
||
| 1660 | */ |
||
| 1661 | public function getPayPalUrl() |
||
| 1665 | |||
| 1666 | /** |
||
| 1667 | * Set the PayPal url. |
||
| 1668 | * |
||
| 1669 | * @param string $payPalUrl The PayPal url. |
||
| 1670 | * @return Invoice |
||
| 1671 | */ |
||
| 1672 | 6 | public function setPayPalUrl($payPalUrl) |
|
| 1678 | |||
| 1679 | /** |
||
| 1680 | * Get the subscription invoice counter. |
||
| 1681 | * |
||
| 1682 | * @return int |
||
| 1683 | */ |
||
| 1684 | public function getSubscriptionInvoiceCounter() |
||
| 1688 | |||
| 1689 | /** |
||
| 1690 | * Set the subscription invoice counter. |
||
| 1691 | * |
||
| 1692 | * @param int $subscriptionInvoiceCounter |
||
| 1693 | * @return Invoice |
||
| 1694 | */ |
||
| 1695 | 6 | public function setSubscriptionInvoiceCounter($subscriptionInvoiceCounter) |
|
| 1701 | |||
| 1702 | /** |
||
| 1703 | * Get the outstanding amount. |
||
| 1704 | * |
||
| 1705 | * @return string |
||
| 1706 | */ |
||
| 1707 | public function getOutstandingAmount() |
||
| 1711 | |||
| 1712 | /** |
||
| 1713 | * Set the outstanding amount. |
||
| 1714 | * |
||
| 1715 | * @param string $outstandingAmount |
||
| 1716 | * @return Invoice |
||
| 1717 | */ |
||
| 1718 | 6 | public function setOutstandingAmount($outstandingAmount) |
|
| 1724 | |||
| 1725 | /** |
||
| 1726 | * @JMS\PreSerialize() |
||
| 1727 | */ |
||
| 1728 | protected function preSerializer() |
||
| 1732 | } |
||
| 1733 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..