@@ -90,7 +90,7 @@ |
||
90 | 90 | /** |
91 | 91 | * Monolog logger configuration. |
92 | 92 | */ |
93 | - public const LOGGER_STREAM_OUTPUT = APPLICATION_ROOT_DIR . '/data/log/ratepay.log'; |
|
93 | + public const LOGGER_STREAM_OUTPUT = APPLICATION_ROOT_DIR.'/data/log/ratepay.log'; |
|
94 | 94 | |
95 | 95 | /** |
96 | 96 | * Path to bundle glossary file. |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | protected function addZedRequestClient(Container $container) |
35 | 35 | { |
36 | - $container[static::CLIENT_ZED_REQUEST] = function (Container $container) { |
|
36 | + $container[static::CLIENT_ZED_REQUEST] = function(Container $container) { |
|
37 | 37 | return $container->getLocator()->zedRequest()->client(); |
38 | 38 | }; |
39 | 39 |
@@ -102,8 +102,7 @@ |
||
102 | 102 | protected function checkForErrors(RatepayResponseTransfer $ratepayResponseTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) |
103 | 103 | { |
104 | 104 | if (!$ratepayResponseTransfer->getSuccessful()) { |
105 | - $errorMessage = $ratepayResponseTransfer->getCustomerMessage() != '' ? $ratepayResponseTransfer->getCustomerMessage() : |
|
106 | - $ratepayResponseTransfer->getResultText(); |
|
105 | + $errorMessage = $ratepayResponseTransfer->getCustomerMessage() != '' ? $ratepayResponseTransfer->getCustomerMessage() : $ratepayResponseTransfer->getResultText(); |
|
107 | 106 | |
108 | 107 | $error = new CheckoutErrorTransfer(); |
109 | 108 | $error |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected function addSalesFacade(Container $container) |
63 | 63 | { |
64 | - $container[static::FACADE_SALES] = function (Container $container) { |
|
64 | + $container[static::FACADE_SALES] = function(Container $container) { |
|
65 | 65 | return new RatepayToSalesBridge($container->getLocator()->sales()->facade()); |
66 | 66 | }; |
67 | 67 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | protected function addCalculationFacade(Container $container) |
77 | 77 | { |
78 | - $container[static::FACADE_CALCULATION] = function (Container $container) { |
|
78 | + $container[static::FACADE_CALCULATION] = function(Container $container) { |
|
79 | 79 | return new RatepayToCalculationBridge($container->getLocator()->calculation()->facade()); |
80 | 80 | }; |
81 | 81 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function addProductFacade(Container $container) |
91 | 91 | { |
92 | - $container[self::FACADE_PRODUCT] = function (Container $container) { |
|
92 | + $container[self::FACADE_PRODUCT] = function(Container $container) { |
|
93 | 93 | return new RatepayToProductBridge($container->getLocator()->product()->facade()); |
94 | 94 | }; |
95 | 95 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | protected function addGlossaryFacade(Container $container) |
105 | 105 | { |
106 | - $container[self::FACADE_GLOSSARY] = function (Container $container) { |
|
106 | + $container[self::FACADE_GLOSSARY] = function(Container $container) { |
|
107 | 107 | return new RatepayToGlossaryBridge($container->getLocator()->glossary()->facade()); |
108 | 108 | }; |
109 | 109 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | protected function addMoneyFacade(Container $container) |
119 | 119 | { |
120 | - $container[self::FACADE_MONEY] = function (Container $container) { |
|
120 | + $container[self::FACADE_MONEY] = function(Container $container) { |
|
121 | 121 | return new RatepayToMoneyBridge($container->getLocator()->money()->facade()); |
122 | 122 | }; |
123 | 123 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | protected function addSalesQueryContainer(Container $container) |
133 | 133 | { |
134 | - $container[self::SALES_QUERY_CONTAINER] = function (Container $container) { |
|
134 | + $container[self::SALES_QUERY_CONTAINER] = function(Container $container) { |
|
135 | 135 | return new RatepayToSalesQueryContainerBridge($container->getLocator()->sales()->queryContainer()); |
136 | 136 | }; |
137 | 137 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | if (!isset($this->paymentMethodsMapping[$paymentMethodName])) { |
43 | 43 | throw new NoPaymentMethodException(); |
44 | 44 | } |
45 | - $paymentMethodGet = 'get' . ucfirst($this->paymentMethodsMapping[$paymentMethodName]); |
|
45 | + $paymentMethodGet = 'get'.ucfirst($this->paymentMethodsMapping[$paymentMethodName]); |
|
46 | 46 | |
47 | 47 | return $payment->$paymentMethodGet(); |
48 | 48 | } |
@@ -34,8 +34,8 @@ |
||
34 | 34 | public function saveOrderPayment(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer) |
35 | 35 | { |
36 | 36 | $this->getFactory() |
37 | - ->createOrderSaver($quoteTransfer, $checkoutResponseTransfer) |
|
38 | - ->saveOrderPayment(); |
|
37 | + ->createOrderSaver($quoteTransfer, $checkoutResponseTransfer) |
|
38 | + ->saveOrderPayment(); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -82,7 +82,7 @@ |
||
82 | 82 | { |
83 | 83 | $data = $this->buildData(); |
84 | 84 | $rootTag = $this->getRootTag(); |
85 | - $xml = new SimpleXMLElement('<' . $rootTag . '></' . $rootTag . '>'); |
|
85 | + $xml = new SimpleXMLElement('<'.$rootTag.'></'.$rootTag.'>'); |
|
86 | 86 | $this->arrayToXml($data, $xml); |
87 | 87 | |
88 | 88 | return $xml->asXML(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function getTotalAmount() |
16 | 16 | { |
17 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'total-amount'}); |
|
17 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'total-amount'}); |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | /** |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function getAmount() |
24 | 24 | { |
25 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'amount'}); |
|
25 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'amount'}); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getInterestAmount() |
32 | 32 | { |
33 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'interest-amount'}); |
|
33 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'interest-amount'}); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function getServiceCharge() |
40 | 40 | { |
41 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'service-charge'}); |
|
41 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'service-charge'}); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function getInterestRate() |
48 | 48 | { |
49 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'interest-rate'}); |
|
49 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'interest-rate'}); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getAnnualPercentageRate() |
56 | 56 | { |
57 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'annual-percentage-rate'}); |
|
57 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'annual-percentage-rate'}); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getMonthlyDebitInterest() |
64 | 64 | { |
65 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'monthly-debit-interest'}); |
|
65 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'monthly-debit-interest'}); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getRate() |
72 | 72 | { |
73 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'rate'}); |
|
73 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'rate'}); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function getLastRate() |
80 | 80 | { |
81 | - return (float)($this->xmlObject->content->{'installment-calculation-result'}->{'last-rate'}); |
|
81 | + return (float) ($this->xmlObject->content->{'installment-calculation-result'}->{'last-rate'}); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function getNumberOfRates() |
88 | 88 | { |
89 | - return (int)$this->xmlObject->content->{'installment-calculation-result'}->{'number-of-rates'}; |
|
89 | + return (int) $this->xmlObject->content->{'installment-calculation-result'}->{'number-of-rates'}; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -94,6 +94,6 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function getPaymentFirstday() |
96 | 96 | { |
97 | - return (int)$this->xmlObject->content->{'installment-calculation-result'}->{'payment-firstday'}; |
|
97 | + return (int) $this->xmlObject->content->{'installment-calculation-result'}->{'payment-firstday'}; |
|
98 | 98 | } |
99 | 99 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function getCustomerMessage() |
37 | 37 | { |
38 | - return (string)$this->xmlObject->head->processing->{'customer-message'}; |
|
38 | + return (string) $this->xmlObject->head->processing->{'customer-message'}; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function getPaymentMethod() |
45 | 45 | { |
46 | - return (string)$this->xmlObject->content->payment['method']; |
|
46 | + return (string) $this->xmlObject->content->payment['method']; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function isSuccessful() |
53 | 53 | { |
54 | - $operation = (string)$this->xmlObject->head->operation; |
|
54 | + $operation = (string) $this->xmlObject->head->operation; |
|
55 | 55 | return $this->successMatrix[$operation] === $this->getResultCode(); |
56 | 56 | } |
57 | 57 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function getStatusCode() |
62 | 62 | { |
63 | - return (string)$this->xmlObject->head->processing->status['code']; |
|
63 | + return (string) $this->xmlObject->head->processing->status['code']; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getReasonCode() |
70 | 70 | { |
71 | - return (int)$this->xmlObject->head->processing->reason['code']; |
|
71 | + return (int) $this->xmlObject->head->processing->reason['code']; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public function getResultCode() |
78 | 78 | { |
79 | - return (int)$this->xmlObject->head->processing->result['code']; |
|
79 | + return (int) $this->xmlObject->head->processing->result['code']; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function getTransactionId() |
86 | 86 | { |
87 | - return (string)$this->xmlObject->head->{'transaction-id'}; |
|
87 | + return (string) $this->xmlObject->head->{'transaction-id'}; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function getTransactionShortId() |
94 | 94 | { |
95 | - return (string)$this->xmlObject->head->{'transaction-short-id'}; |
|
95 | + return (string) $this->xmlObject->head->{'transaction-short-id'}; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function getResponseType() |
102 | 102 | { |
103 | - return (string)$this->xmlObject->head->{'response-type'}; |
|
103 | + return (string) $this->xmlObject->head->{'response-type'}; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function getReasonText() |
110 | 110 | { |
111 | - return (string)$this->xmlObject->head->processing->reason; |
|
111 | + return (string) $this->xmlObject->head->processing->reason; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function getResultText() |
118 | 118 | { |
119 | - return (string)$this->xmlObject->head->processing->result; |
|
119 | + return (string) $this->xmlObject->head->processing->result; |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getStatusText() |
126 | 126 | { |
127 | - return (string)$this->xmlObject->head->processing->status; |
|
127 | + return (string) $this->xmlObject->head->processing->status; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -133,7 +133,6 @@ discard block |
||
133 | 133 | public function getDescriptor() |
134 | 134 | { |
135 | 135 | return !empty($this->xmlObject->content->payment->descriptor) ? |
136 | - $this->xmlObject->content->payment->descriptor : |
|
137 | - null; |
|
136 | + $this->xmlObject->content->payment->descriptor : null; |
|
138 | 137 | } |
139 | 138 | } |