Complex classes like PaymentRequest 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 PaymentRequest, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
8 | class PaymentRequest |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $apiKey; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $merchant; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $orderId; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $sessionId; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $currencySymbol; |
||
34 | |||
35 | /** |
||
36 | * @var float |
||
37 | */ |
||
38 | protected $totalAmount; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $callBackUrl; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $fullCallBackOkUrl; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $callBackOkUrl; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $callBackServerUrl; |
||
59 | |||
60 | /** |
||
61 | * @var int |
||
62 | */ |
||
63 | protected $languageId; |
||
64 | |||
65 | /** |
||
66 | * @var boolean |
||
67 | */ |
||
68 | protected $testMode; |
||
69 | |||
70 | /** |
||
71 | * @var int |
||
72 | */ |
||
73 | protected $paymentGatewayCurrencyCode; |
||
74 | |||
75 | /** |
||
76 | * @var int |
||
77 | */ |
||
78 | protected $cardTypeId; |
||
79 | |||
80 | /** |
||
81 | * @var string |
||
82 | */ |
||
83 | protected $customerRekvNr; |
||
84 | |||
85 | /** |
||
86 | * @var string |
||
87 | */ |
||
88 | protected $customerName; |
||
89 | |||
90 | /** |
||
91 | * @var string |
||
92 | */ |
||
93 | protected $customerCompany; |
||
94 | |||
95 | /** |
||
96 | * @var string |
||
97 | */ |
||
98 | protected $customerAddress; |
||
99 | |||
100 | /** |
||
101 | * @var string |
||
102 | */ |
||
103 | protected $customerAddress2; |
||
104 | |||
105 | /** |
||
106 | * @var string |
||
107 | */ |
||
108 | protected $customerZipCode; |
||
109 | |||
110 | /** |
||
111 | * @var string |
||
112 | */ |
||
113 | protected $customerCity; |
||
114 | |||
115 | /** |
||
116 | * @var int |
||
117 | */ |
||
118 | protected $customerCountryId; |
||
119 | |||
120 | /** |
||
121 | * @var string |
||
122 | */ |
||
123 | protected $customerCountry; |
||
124 | |||
125 | /** |
||
126 | * @var string |
||
127 | */ |
||
128 | protected $customerPhone; |
||
129 | |||
130 | /** |
||
131 | * @var string |
||
132 | */ |
||
133 | protected $customerFax; |
||
134 | |||
135 | /** |
||
136 | * @var string |
||
137 | */ |
||
138 | protected $customerEmail; |
||
139 | |||
140 | /** |
||
141 | * @var string |
||
142 | */ |
||
143 | protected $customerNote; |
||
144 | |||
145 | /** |
||
146 | * @var string |
||
147 | */ |
||
148 | protected $customerCvrnr; |
||
149 | |||
150 | /** |
||
151 | * @var string |
||
152 | */ |
||
153 | protected $customerCustTypeId; |
||
154 | |||
155 | /** |
||
156 | * @var string |
||
157 | */ |
||
158 | protected $customerEan; |
||
159 | |||
160 | /** |
||
161 | * @var string |
||
162 | */ |
||
163 | protected $customerRes1; |
||
164 | |||
165 | /** |
||
166 | * @var string |
||
167 | */ |
||
168 | protected $customerRes2; |
||
169 | |||
170 | /** |
||
171 | * @var string |
||
172 | */ |
||
173 | protected $customerRes3; |
||
174 | |||
175 | /** |
||
176 | * @var string |
||
177 | */ |
||
178 | protected $customerRes4; |
||
179 | |||
180 | /** |
||
181 | * @var string |
||
182 | */ |
||
183 | protected $customerRes5; |
||
184 | |||
185 | /** |
||
186 | * @var string |
||
187 | */ |
||
188 | protected $customerIp; |
||
189 | |||
190 | /** |
||
191 | * @var string |
||
192 | */ |
||
193 | protected $deliveryName; |
||
194 | |||
195 | /** |
||
196 | * @var string |
||
197 | */ |
||
198 | protected $deliveryCompany; |
||
199 | |||
200 | /** |
||
201 | * @var string |
||
202 | */ |
||
203 | protected $deliveryAddress; |
||
204 | |||
205 | /** |
||
206 | * @var string |
||
207 | */ |
||
208 | protected $deliveryAddress2; |
||
209 | |||
210 | /** |
||
211 | * @var string |
||
212 | */ |
||
213 | protected $deliveryZipCode; |
||
214 | |||
215 | /** |
||
216 | * @var string |
||
217 | */ |
||
218 | protected $deliveryCity; |
||
219 | |||
220 | /** |
||
221 | * @var int |
||
222 | */ |
||
223 | protected $deliveryCountryID; |
||
224 | |||
225 | /** |
||
226 | * @var string |
||
227 | */ |
||
228 | protected $deliveryCountry; |
||
229 | |||
230 | /** |
||
231 | * @var string |
||
232 | */ |
||
233 | protected $deliveryPhone; |
||
234 | |||
235 | /** |
||
236 | * @var string |
||
237 | */ |
||
238 | protected $deliveryFax; |
||
239 | |||
240 | /** |
||
241 | * @var string |
||
242 | */ |
||
243 | protected $deliveryEmail; |
||
244 | |||
245 | /** |
||
246 | * @var string |
||
247 | */ |
||
248 | protected $deliveryEan; |
||
249 | |||
250 | /** |
||
251 | * @var string |
||
252 | */ |
||
253 | protected $shippingMethod; |
||
254 | |||
255 | /** |
||
256 | * @var float |
||
257 | */ |
||
258 | protected $shippingFee; |
||
259 | |||
260 | /** |
||
261 | * @var string |
||
262 | */ |
||
263 | protected $paymentMethod; |
||
264 | |||
265 | /** |
||
266 | * @var float |
||
267 | */ |
||
268 | protected $paymentFee; |
||
269 | |||
270 | /** |
||
271 | * @var string |
||
272 | */ |
||
273 | protected $loadBalancerRealIp; |
||
274 | |||
275 | /** |
||
276 | * @var OrderLine[] |
||
277 | */ |
||
278 | protected $orderLines; |
||
279 | |||
280 | public function __construct() |
||
284 | |||
285 | public function populateFromRequest(Request $request) |
||
370 | |||
371 | /** |
||
372 | * @param string $str |
||
373 | * @return float |
||
374 | */ |
||
375 | public static function currencyStringToFloat(string $str) : float |
||
380 | |||
381 | /** |
||
382 | * @return string |
||
383 | */ |
||
384 | public function getApiKey() : string |
||
388 | |||
389 | /** |
||
390 | * @param string $apiKey |
||
391 | * @return PaymentRequest |
||
392 | */ |
||
393 | public function setApiKey(string $apiKey) : self |
||
398 | |||
399 | /** |
||
400 | * @return string |
||
401 | */ |
||
402 | public function getMerchant() : string |
||
406 | |||
407 | /** |
||
408 | * @param string $merchant |
||
409 | * @return PaymentRequest |
||
410 | */ |
||
411 | public function setMerchant(string $merchant) : self |
||
416 | |||
417 | /** |
||
418 | * @return int |
||
419 | */ |
||
420 | public function getOrderId() : int |
||
424 | |||
425 | /** |
||
426 | * @param int $orderId |
||
427 | * @return PaymentRequest |
||
428 | */ |
||
429 | public function setOrderId(int $orderId) : self |
||
434 | |||
435 | /** |
||
436 | * @return string |
||
437 | */ |
||
438 | public function getSessionId() : string |
||
442 | |||
443 | /** |
||
444 | * @param string $sessionId |
||
445 | * @return PaymentRequest |
||
446 | */ |
||
447 | public function setSessionId(string $sessionId) : self |
||
452 | |||
453 | /** |
||
454 | * @return string |
||
455 | */ |
||
456 | public function getCurrencySymbol() : string |
||
460 | |||
461 | /** |
||
462 | * @param string $currencySymbol |
||
463 | * @return PaymentRequest |
||
464 | */ |
||
465 | public function setCurrencySymbol(string $currencySymbol) : self |
||
470 | |||
471 | /** |
||
472 | * @return float |
||
473 | */ |
||
474 | public function getTotalAmount() : float |
||
478 | |||
479 | /** |
||
480 | * @param float $totalAmount |
||
481 | * @return PaymentRequest |
||
482 | */ |
||
483 | public function setTotalAmount(float $totalAmount) : self |
||
488 | |||
489 | /** |
||
490 | * @return string |
||
491 | */ |
||
492 | public function getCallBackUrl() : string |
||
496 | |||
497 | /** |
||
498 | * @param string $callBackUrl |
||
499 | * @return PaymentRequest |
||
500 | */ |
||
501 | public function setCallBackUrl(string $callBackUrl) : self |
||
506 | |||
507 | /** |
||
508 | * @return string |
||
509 | */ |
||
510 | public function getFullCallBackOkUrl() : string |
||
514 | |||
515 | /** |
||
516 | * @param string $fullCallBackOkUrl |
||
517 | * @return PaymentRequest |
||
518 | */ |
||
519 | public function setFullCallBackOkUrl(string $fullCallBackOkUrl) : self |
||
524 | |||
525 | /** |
||
526 | * @return string |
||
527 | */ |
||
528 | public function getCallBackOkUrl() : string |
||
532 | |||
533 | /** |
||
534 | * @param string $callBackOkUrl |
||
535 | * @return PaymentRequest |
||
536 | */ |
||
537 | public function setCallBackOkUrl(string $callBackOkUrl) : self |
||
542 | |||
543 | /** |
||
544 | * @return string |
||
545 | */ |
||
546 | public function getCallBackServerUrl() : string |
||
550 | |||
551 | /** |
||
552 | * @param string $callBackServerUrl |
||
553 | * @return PaymentRequest |
||
554 | */ |
||
555 | public function setCallBackServerUrl(string $callBackServerUrl) : self |
||
560 | |||
561 | /** |
||
562 | * @return int |
||
563 | */ |
||
564 | public function getLanguageId() : int |
||
568 | |||
569 | /** |
||
570 | * @param int $languageId |
||
571 | * @return PaymentRequest |
||
572 | */ |
||
573 | public function setLanguageId(int $languageId) : self |
||
578 | |||
579 | /** |
||
580 | * @return bool |
||
581 | */ |
||
582 | public function isTestMode(): bool |
||
586 | |||
587 | /** |
||
588 | * @param bool $testMode |
||
589 | * @return PaymentRequest |
||
590 | */ |
||
591 | public function setTestMode(bool $testMode) : self |
||
596 | |||
597 | /** |
||
598 | * @return int |
||
599 | */ |
||
600 | public function getPaymentGatewayCurrencyCode() |
||
604 | |||
605 | /** |
||
606 | * @param int $paymentGatewayCurrencyCode |
||
607 | * @return PaymentRequest |
||
608 | */ |
||
609 | public function setPaymentGatewayCurrencyCode(int $paymentGatewayCurrencyCode) : self |
||
614 | |||
615 | /** |
||
616 | * @return int |
||
617 | */ |
||
618 | public function getCardTypeId() |
||
622 | |||
623 | /** |
||
624 | * @param int $cardTypeId |
||
625 | * @return PaymentRequest |
||
626 | */ |
||
627 | public function setCardTypeId(int $cardTypeId) : self |
||
632 | |||
633 | /** |
||
634 | * @return string |
||
635 | */ |
||
636 | public function getCustomerRekvNr() : string |
||
640 | |||
641 | /** |
||
642 | * @param string $customerRekvNr |
||
643 | * @return PaymentRequest |
||
644 | */ |
||
645 | public function setCustomerRekvNr(string $customerRekvNr) : self |
||
650 | |||
651 | /** |
||
652 | * @return string |
||
653 | */ |
||
654 | public function getCustomerName() : string |
||
658 | |||
659 | /** |
||
660 | * @param string $customerName |
||
661 | * @return PaymentRequest |
||
662 | */ |
||
663 | public function setCustomerName(string $customerName) : self |
||
668 | |||
669 | /** |
||
670 | * @return string |
||
671 | */ |
||
672 | public function getCustomerCompany() : string |
||
676 | |||
677 | /** |
||
678 | * @param string $customerCompany |
||
679 | * @return PaymentRequest |
||
680 | */ |
||
681 | public function setCustomerCompany(string $customerCompany) : self |
||
686 | |||
687 | /** |
||
688 | * @return string |
||
689 | */ |
||
690 | public function getCustomerAddress() : string |
||
694 | |||
695 | /** |
||
696 | * @param string $customerAddress |
||
697 | * @return PaymentRequest |
||
698 | */ |
||
699 | public function setCustomerAddress(string $customerAddress) : self |
||
704 | |||
705 | /** |
||
706 | * @return string |
||
707 | */ |
||
708 | public function getCustomerAddress2() : string |
||
712 | |||
713 | /** |
||
714 | * @param string $customerAddress2 |
||
715 | * @return PaymentRequest |
||
716 | */ |
||
717 | public function setCustomerAddress2(string $customerAddress2) : self |
||
722 | |||
723 | /** |
||
724 | * @return string |
||
725 | */ |
||
726 | public function getCustomerZipCode() : string |
||
730 | |||
731 | /** |
||
732 | * @param string $customerZipCode |
||
733 | * @return PaymentRequest |
||
734 | */ |
||
735 | public function setCustomerZipCode(string $customerZipCode) : self |
||
740 | |||
741 | /** |
||
742 | * @return string |
||
743 | */ |
||
744 | public function getCustomerCity() : string |
||
748 | |||
749 | /** |
||
750 | * @param string $customerCity |
||
751 | * @return PaymentRequest |
||
752 | */ |
||
753 | public function setCustomerCity(string $customerCity) : self |
||
758 | |||
759 | /** |
||
760 | * @return int |
||
761 | */ |
||
762 | public function getCustomerCountryId() |
||
766 | |||
767 | /** |
||
768 | * @param int $customerCountryId |
||
769 | * @return PaymentRequest |
||
770 | */ |
||
771 | public function setCustomerCountryId(int $customerCountryId) : self |
||
776 | |||
777 | /** |
||
778 | * @return string |
||
779 | */ |
||
780 | public function getCustomerCountry() : string |
||
784 | |||
785 | /** |
||
786 | * @param string $customerCountry |
||
787 | * @return PaymentRequest |
||
788 | */ |
||
789 | public function setCustomerCountry(string $customerCountry) : self |
||
794 | |||
795 | /** |
||
796 | * @return string |
||
797 | */ |
||
798 | public function getCustomerPhone() : string |
||
802 | |||
803 | /** |
||
804 | * @param string $customerPhone |
||
805 | * @return PaymentRequest |
||
806 | */ |
||
807 | public function setCustomerPhone(string $customerPhone) : self |
||
812 | |||
813 | /** |
||
814 | * @return string |
||
815 | */ |
||
816 | public function getCustomerFax() : string |
||
820 | |||
821 | /** |
||
822 | * @param string $customerFax |
||
823 | * @return PaymentRequest |
||
824 | */ |
||
825 | public function setCustomerFax(string $customerFax) : self |
||
830 | |||
831 | /** |
||
832 | * @return string |
||
833 | */ |
||
834 | public function getCustomerEmail() : string |
||
838 | |||
839 | /** |
||
840 | * @param string $customerEmail |
||
841 | * @return PaymentRequest |
||
842 | */ |
||
843 | public function setCustomerEmail(string $customerEmail) : self |
||
848 | |||
849 | /** |
||
850 | * @return string |
||
851 | */ |
||
852 | public function getCustomerNote() : string |
||
856 | |||
857 | /** |
||
858 | * @param string $customerNote |
||
859 | * @return PaymentRequest |
||
860 | */ |
||
861 | public function setCustomerNote(string $customerNote) : self |
||
866 | |||
867 | /** |
||
868 | * @return string |
||
869 | */ |
||
870 | public function getCustomerCvrnr() : string |
||
874 | |||
875 | /** |
||
876 | * @param string $customerCvrnr |
||
877 | * @return PaymentRequest |
||
878 | */ |
||
879 | public function setCustomerCvrnr(string $customerCvrnr) : self |
||
884 | |||
885 | /** |
||
886 | * @return string |
||
887 | */ |
||
888 | public function getCustomerCustTypeId() : string |
||
892 | |||
893 | /** |
||
894 | * @param int $customerCustTypeId |
||
895 | * @return PaymentRequest |
||
896 | */ |
||
897 | public function setCustomerCustTypeId(int $customerCustTypeId) : self |
||
902 | |||
903 | /** |
||
904 | * @return string |
||
905 | */ |
||
906 | public function getCustomerEan() : string |
||
910 | |||
911 | /** |
||
912 | * @param string $customerEan |
||
913 | * @return PaymentRequest |
||
914 | */ |
||
915 | public function setCustomerEan(string $customerEan) : self |
||
920 | |||
921 | /** |
||
922 | * @return string |
||
923 | */ |
||
924 | public function getCustomerRes1() : string |
||
928 | |||
929 | /** |
||
930 | * @param string $customerRes1 |
||
931 | * @return PaymentRequest |
||
932 | */ |
||
933 | public function setCustomerRes1(string $customerRes1) : self |
||
938 | |||
939 | /** |
||
940 | * @return string |
||
941 | */ |
||
942 | public function getCustomerRes2() : string |
||
946 | |||
947 | /** |
||
948 | * @param string $customerRes2 |
||
949 | * @return PaymentRequest |
||
950 | */ |
||
951 | public function setCustomerRes2(string $customerRes2) : self |
||
956 | |||
957 | /** |
||
958 | * @return string |
||
959 | */ |
||
960 | public function getCustomerRes3() : string |
||
964 | |||
965 | /** |
||
966 | * @param string $customerRes3 |
||
967 | * @return PaymentRequest |
||
968 | */ |
||
969 | public function setCustomerRes3(string $customerRes3) : self |
||
974 | |||
975 | /** |
||
976 | * @return string |
||
977 | */ |
||
978 | public function getCustomerRes4() : string |
||
982 | |||
983 | /** |
||
984 | * @param string $customerRes4 |
||
985 | * @return PaymentRequest |
||
986 | */ |
||
987 | public function setCustomerRes4(string $customerRes4) : self |
||
992 | |||
993 | /** |
||
994 | * @return string |
||
995 | */ |
||
996 | public function getCustomerRes5() : string |
||
1000 | |||
1001 | /** |
||
1002 | * @param string $customerRes5 |
||
1003 | * @return PaymentRequest |
||
1004 | */ |
||
1005 | public function setCustomerRes5(string $customerRes5) : self |
||
1010 | |||
1011 | /** |
||
1012 | * @return string |
||
1013 | */ |
||
1014 | public function getCustomerIp() : string |
||
1018 | |||
1019 | /** |
||
1020 | * @param string $customerIp |
||
1021 | * @return PaymentRequest |
||
1022 | */ |
||
1023 | public function setCustomerIp(string $customerIp) : self |
||
1028 | |||
1029 | /** |
||
1030 | * @return string |
||
1031 | */ |
||
1032 | public function getDeliveryName() : string |
||
1036 | |||
1037 | /** |
||
1038 | * @param string $deliveryName |
||
1039 | * @return PaymentRequest |
||
1040 | */ |
||
1041 | public function setDeliveryName(string $deliveryName) : self |
||
1046 | |||
1047 | /** |
||
1048 | * @return string |
||
1049 | */ |
||
1050 | public function getDeliveryCompany() : string |
||
1054 | |||
1055 | /** |
||
1056 | * @param string $deliveryCompany |
||
1057 | * @return PaymentRequest |
||
1058 | */ |
||
1059 | public function setDeliveryCompany(string $deliveryCompany) : self |
||
1064 | |||
1065 | /** |
||
1066 | * @return string |
||
1067 | */ |
||
1068 | public function getDeliveryAddress() : string |
||
1072 | |||
1073 | /** |
||
1074 | * @param string $deliveryAddress |
||
1075 | * @return PaymentRequest |
||
1076 | */ |
||
1077 | public function setDeliveryAddress(string $deliveryAddress) : self |
||
1082 | |||
1083 | /** |
||
1084 | * @return string |
||
1085 | */ |
||
1086 | public function getDeliveryAddress2() : string |
||
1090 | |||
1091 | /** |
||
1092 | * @param string $deliveryAddress2 |
||
1093 | * @return PaymentRequest |
||
1094 | */ |
||
1095 | public function setDeliveryAddress2(string $deliveryAddress2) : self |
||
1100 | |||
1101 | /** |
||
1102 | * @return string |
||
1103 | */ |
||
1104 | public function getDeliveryZipCode() : string |
||
1108 | |||
1109 | /** |
||
1110 | * @param string $deliveryZipCode |
||
1111 | * @return PaymentRequest |
||
1112 | */ |
||
1113 | public function setDeliveryZipCode(string $deliveryZipCode) : self |
||
1118 | |||
1119 | /** |
||
1120 | * @return string |
||
1121 | */ |
||
1122 | public function getDeliveryCity() : string |
||
1126 | |||
1127 | /** |
||
1128 | * @param string $deliveryCity |
||
1129 | * @return PaymentRequest |
||
1130 | */ |
||
1131 | public function setDeliveryCity(string $deliveryCity) : self |
||
1136 | |||
1137 | /** |
||
1138 | * @return int |
||
1139 | */ |
||
1140 | public function getDeliveryCountryID() |
||
1144 | |||
1145 | /** |
||
1146 | * @param int $deliveryCountryID |
||
1147 | * @return PaymentRequest |
||
1148 | */ |
||
1149 | public function setDeliveryCountryID(int $deliveryCountryID) : self |
||
1154 | |||
1155 | /** |
||
1156 | * @return string |
||
1157 | */ |
||
1158 | public function getDeliveryCountry() : string |
||
1162 | |||
1163 | /** |
||
1164 | * @param string $deliveryCountry |
||
1165 | * @return PaymentRequest |
||
1166 | */ |
||
1167 | public function setDeliveryCountry(string $deliveryCountry) : self |
||
1172 | |||
1173 | /** |
||
1174 | * @return string |
||
1175 | */ |
||
1176 | public function getDeliveryPhone() : string |
||
1180 | |||
1181 | /** |
||
1182 | * @param string $deliveryPhone |
||
1183 | * @return PaymentRequest |
||
1184 | */ |
||
1185 | public function setDeliveryPhone(string $deliveryPhone) : self |
||
1190 | |||
1191 | /** |
||
1192 | * @return string |
||
1193 | */ |
||
1194 | public function getDeliveryFax() : string |
||
1198 | |||
1199 | /** |
||
1200 | * @param string $deliveryFax |
||
1201 | * @return PaymentRequest |
||
1202 | */ |
||
1203 | public function setDeliveryFax(string $deliveryFax) : self |
||
1208 | |||
1209 | /** |
||
1210 | * @return string |
||
1211 | */ |
||
1212 | public function getDeliveryEmail() : string |
||
1216 | |||
1217 | /** |
||
1218 | * @param string $deliveryEmail |
||
1219 | * @return PaymentRequest |
||
1220 | */ |
||
1221 | public function setDeliveryEmail(string $deliveryEmail) : self |
||
1226 | |||
1227 | /** |
||
1228 | * @return string |
||
1229 | */ |
||
1230 | public function getDeliveryEan() : string |
||
1234 | |||
1235 | /** |
||
1236 | * @param string $deliveryEan |
||
1237 | * @return PaymentRequest |
||
1238 | */ |
||
1239 | public function setDeliveryEan(string $deliveryEan) : self |
||
1244 | |||
1245 | /** |
||
1246 | * @return string |
||
1247 | */ |
||
1248 | public function getShippingMethod() : string |
||
1252 | |||
1253 | /** |
||
1254 | * @param string $shippingMethod |
||
1255 | * @return PaymentRequest |
||
1256 | */ |
||
1257 | public function setShippingMethod(string $shippingMethod) : self |
||
1262 | |||
1263 | /** |
||
1264 | * @return float |
||
1265 | */ |
||
1266 | public function getShippingFee() : float |
||
1270 | |||
1271 | /** |
||
1272 | * @param float $shippingFee |
||
1273 | * @return PaymentRequest |
||
1274 | */ |
||
1275 | public function setShippingFee(float $shippingFee) : self |
||
1280 | |||
1281 | /** |
||
1282 | * @return string |
||
1283 | */ |
||
1284 | public function getPaymentMethod() : string |
||
1288 | |||
1289 | /** |
||
1290 | * @param string $paymentMethod |
||
1291 | * @return PaymentRequest |
||
1292 | */ |
||
1293 | public function setPaymentMethod(string $paymentMethod) : self |
||
1298 | |||
1299 | /** |
||
1300 | * @return float |
||
1301 | */ |
||
1302 | public function getPaymentFee() : float |
||
1306 | |||
1307 | /** |
||
1308 | * @param float $paymentFee |
||
1309 | * @return PaymentRequest |
||
1310 | */ |
||
1311 | public function setPaymentFee(float $paymentFee) : self |
||
1316 | |||
1317 | /** |
||
1318 | * @return string |
||
1319 | */ |
||
1320 | public function getLoadBalancerRealIp() : string |
||
1324 | |||
1325 | /** |
||
1326 | * @param string $loadBalancerRealIp |
||
1327 | * @return PaymentRequest |
||
1328 | */ |
||
1329 | public function setLoadBalancerRealIp(string $loadBalancerRealIp) : self |
||
1334 | |||
1335 | /** |
||
1336 | * @return OrderLine[] |
||
1337 | */ |
||
1338 | public function getOrderLines() : array |
||
1342 | |||
1343 | /** |
||
1344 | * @param OrderLine[] $orderLines |
||
1345 | * @return PaymentRequest |
||
1346 | */ |
||
1347 | public function setOrderLines(array $orderLines) : self |
||
1352 | |||
1353 | /** |
||
1354 | * @param OrderLine $orderLine |
||
1355 | * @return PaymentRequest |
||
1356 | */ |
||
1357 | public function addOrderLine(OrderLine $orderLine) : self |
||
1362 | } |
||
1363 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.