Conditions | 18 |
Paths | > 20000 |
Total Lines | 63 |
Code Lines | 60 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
108 | protected function getDataArray($aProfileResponse) |
||
109 | { |
||
110 | $aData = [ |
||
111 | 'profile_id' => $aProfileResponse['add_paydata[profile-id]'], |
||
112 | 'merchant_name' => $aProfileResponse['add_paydata[merchant-name]'], |
||
113 | 'merchant_status' => $aProfileResponse['add_paydata[merchant-status]'], |
||
114 | 'shop_name' => $aProfileResponse['add_paydata[shop-name]'], |
||
115 | 'name' => $aProfileResponse['add_paydata[name]'], |
||
116 | 'currency' => $aProfileResponse['add_paydata[currency]'], |
||
117 | 'type' => $aProfileResponse['add_paydata[type]'], |
||
118 | 'activation_status_elv' => $aProfileResponse['add_paydata[activation-status-elv]'], |
||
119 | 'activation_status_installment' => $aProfileResponse['add_paydata[activation-status-installment]'], |
||
120 | 'activation_status_invoice' => $aProfileResponse['add_paydata[activation-status-invoice]'], |
||
121 | 'activation_status_prepayment' => $aProfileResponse['add_paydata[activation-status-prepayment]'], |
||
122 | 'amount_min_longrun' => $aProfileResponse['add_paydata[amount-min-longrun]'], |
||
123 | 'b2b_pq_full' => $aProfileResponse['add_paydata[b2b-PQ-full]'], |
||
124 | 'b2b_pq_light' => isset($aProfileResponse['add_paydata[b2b-PQ-light]']) ? $aProfileResponse['add_paydata[b2b-PQ-light]'] : '', |
||
125 | 'b2b_elv' => $aProfileResponse['add_paydata[b2b-elv]'], |
||
126 | 'b2b_installment' => $aProfileResponse['add_paydata[b2b-installment]'], |
||
127 | 'b2b_invoice' => $aProfileResponse['add_paydata[b2b-invoice]'], |
||
128 | 'b2b_prepayment' => $aProfileResponse['add_paydata[b2b-prepayment]'], |
||
129 | 'country_code_billing' => $aProfileResponse['add_paydata[country-code-billing]'], |
||
130 | 'country_code_delivery' => $aProfileResponse['add_paydata[country-code-delivery]'], |
||
131 | 'delivery_address_pq_full' => $aProfileResponse['add_paydata[delivery-address-PQ-full]'], |
||
132 | 'delivery_address_pq_light' => isset($aProfileResponse['add_paydata[delivery-address-PQ-light]']) ? $aProfileResponse['add_paydata[delivery-address-PQ-light]'] : '', |
||
133 | 'delivery_address_elv' => $aProfileResponse['add_paydata[delivery-address-elv]'], |
||
134 | 'delivery_address_installment' => $aProfileResponse['add_paydata[delivery-address-installment]'], |
||
135 | 'delivery_address_invoice' => $aProfileResponse['add_paydata[delivery-address-invoice]'], |
||
136 | 'delivery_address_prepayment' => $aProfileResponse['add_paydata[delivery-address-prepayment]'], |
||
137 | 'device_fingerprint_snippet_id' => isset($aProfileResponse['add_paydata[device-fingerprint-snippet-id]']) ? $aProfileResponse['add_paydata[device-fingerprint-snippet-id]'] : NULL, |
||
138 | 'eligibility_device_fingerprint' => isset($aProfileResponse['add_paydata[eligibility-device-fingerprint]']) ? $aProfileResponse['add_paydata[eligibility-device-fingerprint]'] : NULL, |
||
139 | 'eligibility_ratepay_elv' => isset($aProfileResponse['add_paydata[eligibility-ratepay-elv]']) ? $aProfileResponse['add_paydata[eligibility-ratepay-elv]'] : 'no', |
||
140 | 'eligibility_ratepay_installment' => isset($aProfileResponse['add_paydata[eligibility-ratepay-installment]']) ? $aProfileResponse['add_paydata[eligibility-ratepay-installment]'] : 'no', |
||
141 | 'eligibility_ratepay_invoice' => isset($aProfileResponse['add_paydata[eligibility-ratepay-invoice]']) ? $aProfileResponse['add_paydata[eligibility-ratepay-invoice]'] : 'no', |
||
142 | 'eligibility_ratepay_pq_full' => isset($aProfileResponse['add_paydata[eligibility-ratepay-pq-full]']) ? $aProfileResponse['add_paydata[eligibility-ratepay-pq-full]'] : 'no', |
||
143 | 'eligibility_ratepay_pq_light' => isset($aProfileResponse['add_paydata[eligibility-ratepay-pq-light]']) ? $aProfileResponse['add_paydata[eligibility-ratepay-pq-light]'] : 'no', |
||
144 | 'eligibility_ratepay_prepayment' => $aProfileResponse['add_paydata[eligibility-ratepay-prepayment]'], |
||
145 | 'interest_rate_merchant_towards_bank' => $aProfileResponse['add_paydata[interest-rate-merchant-towards-bank]'], |
||
146 | 'interestrate_default' => $aProfileResponse['add_paydata[interestrate-default]'], |
||
147 | 'interestrate_max' => $aProfileResponse['add_paydata[interestrate-max]'], |
||
148 | 'interestrate_min' => $aProfileResponse['add_paydata[interestrate-min]'], |
||
149 | 'min_difference_dueday' => $aProfileResponse['add_paydata[min-difference-dueday]'], |
||
150 | 'month_allowed' => $aProfileResponse['add_paydata[month-allowed]'], |
||
151 | 'month_longrun' => $aProfileResponse['add_paydata[month-longrun]'], |
||
152 | 'month_number_max' => $aProfileResponse['add_paydata[month-number-max]'], |
||
153 | 'month_number_min' => $aProfileResponse['add_paydata[month-number-min]'], |
||
154 | 'payment_amount' => $aProfileResponse['add_paydata[payment-amount]'], |
||
155 | 'payment_firstday' => $aProfileResponse['add_paydata[payment-firstday]'], |
||
156 | 'payment_lastrate' => $aProfileResponse['add_paydata[payment-lastrate]'], |
||
157 | 'rate_min_longrun' => $aProfileResponse['add_paydata[rate-min-longrun]'], |
||
158 | 'rate_min_normal' => $aProfileResponse['add_paydata[rate-min-normal]'], |
||
159 | 'service_charge' => $aProfileResponse['add_paydata[service-charge]'], |
||
160 | 'tx_limit_elv_max' => isset($aProfileResponse['add_paydata[tx-limit-elv-max]']) ? $aProfileResponse['add_paydata[tx-limit-elv-max]'] : 0, |
||
161 | 'tx_limit_elv_min' => isset($aProfileResponse['add_paydata[tx-limit-elv-min]']) ? $aProfileResponse['add_paydata[tx-limit-elv-min]'] : 0, |
||
162 | 'tx_limit_installment_max' => isset($aProfileResponse['add_paydata[tx-limit-installment-max]']) ? $aProfileResponse['add_paydata[tx-limit-installment-max]'] : 0, |
||
163 | 'tx_limit_installment_min' => isset($aProfileResponse['add_paydata[tx-limit-installment-min]']) ? $aProfileResponse['add_paydata[tx-limit-installment-min]'] : 0, |
||
164 | 'tx_limit_invoice_max' => isset($aProfileResponse['add_paydata[tx-limit-invoice-max]']) ? $aProfileResponse['add_paydata[tx-limit-invoice-max]'] : 0, |
||
165 | 'tx_limit_invoice_min' => isset($aProfileResponse['add_paydata[tx-limit-invoice-min]']) ? $aProfileResponse['add_paydata[tx-limit-invoice-min]'] : 0, |
||
166 | 'tx_limit_prepayment_max' => isset($aProfileResponse['add_paydata[tx-limit-prepayment-max]']) ? $aProfileResponse['add_paydata[tx-limit-prepayment-max]'] : 0, |
||
167 | 'tx_limit_prepayment_min' => isset($aProfileResponse['add_paydata[tx-limit-prepayment-min]']) ? $aProfileResponse['add_paydata[tx-limit-prepayment-min]'] : 0, |
||
168 | 'valid_payment_firstdays' => $aProfileResponse['add_paydata[valid-payment-firstdays]'], |
||
169 | ]; |
||
170 | return $aData; |
||
171 | } |
||
252 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths