Conditions | 1 |
Paths | 1 |
Total Lines | 186 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
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 |
||
16 | function pronamic_pay_gateway_integrations() { |
||
17 | // ABN AMRO iDEAL Easy. |
||
18 | $abn_amro_ideal_easy = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandardEasy\Integration(); |
||
19 | $abn_amro_ideal_easy->set_id( 'abnamro-ideal-easy' ); |
||
20 | $abn_amro_ideal_easy->set_name( 'ABN AMRO - iDEAL Easy' ); |
||
21 | $abn_amro_ideal_easy->url = 'https://internetkassa.abnamro.nl/'; |
||
22 | $abn_amro_ideal_easy->product_url = 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/'; |
||
23 | $abn_amro_ideal_easy->dashboard_url = 'https://internetkassa.abnamro.nl/'; |
||
24 | $abn_amro_ideal_easy->provider = 'abnamro'; |
||
25 | |||
26 | // ABN AMRO - iDEAL Only Kassa. |
||
27 | $abn_amro_ideal_only_kassa = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(); |
||
28 | $abn_amro_ideal_only_kassa->set_id( 'abnamro-ideal-only-kassa' ); |
||
29 | $abn_amro_ideal_only_kassa->set_name( 'ABN AMRO - iDEAL Only Kassa' ); |
||
30 | $abn_amro_ideal_only_kassa->url = 'https://internetkassa.abnamro.nl/'; |
||
31 | $abn_amro_ideal_only_kassa->product_url = 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/'; |
||
32 | $abn_amro_ideal_only_kassa->dashboard_url = 'https://internetkassa.abnamro.nl/'; |
||
33 | $abn_amro_ideal_only_kassa->provider = 'abnamro'; |
||
34 | |||
35 | // ABN AMRO - Internetkassa. |
||
36 | $abn_amro_internetkassa = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(); |
||
37 | $abn_amro_internetkassa->set_id( 'abnamro-internetkassa' ); |
||
38 | $abn_amro_internetkassa->set_name( 'ABN AMRO - Internetkassa' ); |
||
39 | $abn_amro_internetkassa->url = 'https://internetkassa.abnamro.nl/'; |
||
40 | $abn_amro_internetkassa->product_url = 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/'; |
||
41 | $abn_amro_internetkassa->dashboard_url = 'https://internetkassa.abnamro.nl/'; |
||
42 | $abn_amro_internetkassa->provider = 'abnamro'; |
||
43 | |||
44 | // ABN AMRO - iDEAL Zelfbouw (v3). |
||
45 | $abn_amro_ideal_zelfbouw_v3 = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
46 | $abn_amro_ideal_zelfbouw_v3->set_id( 'abnamro-ideal-zelfbouw-v3' ); |
||
47 | $abn_amro_ideal_zelfbouw_v3->set_name( 'ABN AMRO - iDEAL Zelfbouw (v3)' ); |
||
48 | $abn_amro_ideal_zelfbouw_v3->url = 'https://abnamro.ideal-payment.de/'; |
||
49 | $abn_amro_ideal_zelfbouw_v3->product_url = 'https://www.abnamro.nl/nl/zakelijk/betalen/online-betalen/betaaloplossing/'; |
||
50 | $abn_amro_ideal_zelfbouw_v3->dashboard_url = array( |
||
51 | 'test' => 'https://abnamro-test.ideal-payment.de/', |
||
52 | 'live' => 'https://abnamro.ideal-payment.de/', |
||
53 | ); |
||
54 | $abn_amro_ideal_zelfbouw_v3->provider = 'abnamro'; |
||
55 | |||
56 | // Deutsche Bank - iDEAL via Ogone. |
||
57 | $deutsche_bank_ideal_ogone = new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandardEasy\Integration(); |
||
58 | $deutsche_bank_ideal_ogone->set_id( 'deutschebank-ideal-via-ogone' ); |
||
59 | $deutsche_bank_ideal_ogone->set_name( 'Deutsche Bank - iDEAL via Ogone' ); |
||
60 | $deutsche_bank_ideal_ogone->product_url = 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html'; |
||
61 | $deutsche_bank_ideal_ogone->provider = 'deutschebank'; |
||
62 | |||
63 | // Deutsche Bank - iDEAL Expert (v3). |
||
64 | $deutsche_bank_ideal_expert_v3 = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
65 | $deutsche_bank_ideal_expert_v3->set_id( 'deutschebank-ideal-expert-v3' ); |
||
66 | $deutsche_bank_ideal_expert_v3->set_name( 'Deutsche Bank - iDEAL Expert (v3)' ); |
||
67 | $deutsche_bank_ideal_expert_v3->product_url = 'https://www.deutschebank.nl/nl/content/producten_en_services_commercial_banking_cash_management_betalen_ideal.html'; |
||
68 | $deutsche_bank_ideal_expert_v3->dashboard_url = array( |
||
69 | 'test' => 'https://myideal.test.db.com/', |
||
70 | 'live' => 'https://myideal.db.com/', |
||
71 | ); |
||
72 | $deutsche_bank_ideal_expert_v3->provider = 'deutschebank'; |
||
73 | |||
74 | // Fibonacci ORANGE. |
||
75 | $fibonacci_orange = new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(); |
||
76 | $fibonacci_orange->set_id( 'fibonacciorange' ); |
||
77 | $fibonacci_orange->set_name( 'Fibonacci ORANGE' ); |
||
78 | $fibonacci_orange->product_url = 'http://www.fibonacciorange.nl/'; |
||
79 | $fibonacci_orange->provider = 'fibonacciorange'; |
||
80 | |||
81 | // iDEAL Simulator - iDEAL Lite / Basic. |
||
82 | $ideal_simulator_ideal_basic = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(); |
||
83 | $ideal_simulator_ideal_basic->set_id( 'ideal-simulator-ideal-basic' ); |
||
84 | $ideal_simulator_ideal_basic->set_name( 'iDEAL Simulator - iDEAL Lite / Basic' ); |
||
85 | $ideal_simulator_ideal_basic->provider = 'ideal-simulator'; |
||
86 | |||
87 | // iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3). |
||
88 | $ideal_simulator_ideal_advanced_v3 = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
89 | $ideal_simulator_ideal_advanced_v3->set_id( 'ideal-simulator-ideal-advanced-v3' ); |
||
90 | $ideal_simulator_ideal_advanced_v3->set_name( 'iDEAL Simulator - iDEAL Professional / Advanced / Zelfbouw (v3)' ); |
||
91 | $ideal_simulator_ideal_advanced_v3->provider = 'ideal-simulator'; |
||
92 | $ideal_simulator_ideal_advanced_v3->product_url = 'https://www.ideal-checkout.nl/support/ideal-simulator'; |
||
93 | |||
94 | // ING - iDEAL Basic. |
||
95 | $ing_ideal_basic = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(); |
||
96 | $ing_ideal_basic->set_id( 'ing-ideal-basic' ); |
||
97 | $ing_ideal_basic->set_name( 'ING - iDEAL Basic' ); |
||
98 | $ing_ideal_basic->provider = 'ing'; |
||
99 | $ing_ideal_basic->product_url = 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/'; |
||
100 | $ing_ideal_basic->dashboard_url = array( |
||
101 | 'test' => 'https://idealtest.secure-ing.com/', |
||
102 | 'live' => 'https://ideal.secure-ing.com/', |
||
103 | ); |
||
104 | |||
105 | // ING - iDEAL Advanced (v3). |
||
106 | $ing_ideal_advanced_v3 = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
107 | $ing_ideal_advanced_v3->set_id( 'ing-ideal-advanced-v3' ); |
||
108 | $ing_ideal_advanced_v3->set_name( 'ING - iDEAL Advanced (v3)' ); |
||
109 | $ing_ideal_advanced_v3->provider = 'ing'; |
||
110 | $ing_ideal_advanced_v3->product_url = 'https://www.ing.nl/zakelijk/betalen/geld-ontvangen/ideal/'; |
||
111 | $ing_ideal_advanced_v3->dashboard_url = array( |
||
112 | 'test' => 'https://idealtest.secure-ing.com/', |
||
113 | 'live' => 'https://ideal.secure-ing.com/', |
||
114 | ); |
||
115 | |||
116 | // Mollie - iDEAL Basic. |
||
117 | $mollie_ideal_basic = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(); |
||
118 | $mollie_ideal_basic->set_id( 'mollie-ideal-basic' ); |
||
119 | $mollie_ideal_basic->set_name( 'Mollie - iDEAL Basic' ); |
||
120 | $mollie_ideal_basic->dashboard_url = 'http://www.mollie.nl/beheer/'; |
||
121 | $mollie_ideal_basic->provider = 'mollie'; |
||
122 | $mollie_ideal_basic->deprecated = true; |
||
|
|||
123 | |||
124 | // Paytor. |
||
125 | $paytor = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(); |
||
126 | $paytor->set_id( 'paytor' ); |
||
127 | $paytor->set_name( 'Paytor' ); |
||
128 | $paytor->url = 'http://paytor.com/'; |
||
129 | $paytor->product_url = 'http://paytor.com/'; |
||
130 | $paytor->provider = 'paytor'; |
||
131 | |||
132 | // Postcode iDEAL. |
||
133 | $postcode_ideal = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
134 | $postcode_ideal->set_id( 'postcode-ideal' ); |
||
135 | $postcode_ideal->set_name( 'Postcode iDEAL' ); |
||
136 | $postcode_ideal->provider = 'postcode.nl'; |
||
137 | $postcode_ideal->product_url = 'https://services.postcode.nl/ideal'; |
||
138 | $postcode_ideal->dashboard_url = 'https://services.postcode.nl/ideal'; |
||
139 | |||
140 | // Qantani (new platform). |
||
141 | $qantani_mollie = new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(); |
||
142 | $qantani_mollie->set_id( 'qantani-mollie' ); |
||
143 | $qantani_mollie->set_name( __( 'Qantani (new platform)', 'pronamic_ideal' ) ); |
||
144 | $qantani_mollie->url = 'https://www.qantani.com/'; |
||
145 | $qantani_mollie->product_url = 'https://www.qantani.com/tarieven/'; |
||
146 | $qantani_mollie->dashboard_url = 'https://www.qantani.eu/'; |
||
147 | $qantani_mollie->provider = 'qantani'; |
||
148 | |||
149 | // Rabobank - iDEAL Professional (v3). |
||
150 | $rabobank_ideal_professional_v3 = new \Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3\Integration(); |
||
151 | $rabobank_ideal_professional_v3->set_id( 'rabobank-ideal-professional-v3' ); |
||
152 | $rabobank_ideal_professional_v3->set_name( 'Rabobank - iDEAL Professional (v3)' ); |
||
153 | $rabobank_ideal_professional_v3->provider = 'rabobank'; |
||
154 | $rabobank_ideal_professional_v3->product_url = 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/ideal-professional/'; |
||
155 | $rabobank_ideal_professional_v3->dashboard_url = array( |
||
156 | 'test' => 'https://idealtest.rabobank.nl/', |
||
157 | 'live' => 'https://ideal.rabobank.nl/', |
||
158 | ); |
||
159 | |||
160 | // Sisow - iDEAL Basic. |
||
161 | $sisow_ideal_basic = new \Pronamic\WordPress\Pay\Gateways\IDealBasic\Integration(); |
||
162 | $sisow_ideal_basic->set_id( 'sisow-ideal-basic' ); |
||
163 | $sisow_ideal_basic->set_name( 'Sisow - iDEAL Basic' ); |
||
164 | $sisow_ideal_basic->url = 'https://www.sisow.nl/'; |
||
165 | $sisow_ideal_basic->dashboard_url = 'https://www.sisow.nl/Sisow/iDeal/Login.aspx'; |
||
166 | $sisow_ideal_basic->provider = 'sisow'; |
||
167 | $sisow_ideal_basic->deprecated = true; |
||
168 | |||
169 | return array( |
||
170 | $abn_amro_ideal_easy, |
||
171 | $abn_amro_ideal_only_kassa, |
||
172 | $abn_amro_internetkassa, |
||
173 | $abn_amro_ideal_zelfbouw_v3, |
||
174 | new \Pronamic\WordPress\Pay\Gateways\Buckaroo\Integration(), |
||
175 | $deutsche_bank_ideal_ogone, |
||
176 | $deutsche_bank_ideal_expert_v3, |
||
177 | new \Pronamic\WordPress\Pay\Gateways\EMS\ECommerce\Integration(), |
||
178 | $fibonacci_orange, |
||
179 | new \Pronamic\WordPress\Pay\Gateways\Icepay\Integration(), |
||
180 | $ideal_simulator_ideal_basic, |
||
181 | $ideal_simulator_ideal_advanced_v3, |
||
182 | $ing_ideal_basic, |
||
183 | $ing_ideal_advanced_v3, |
||
184 | new \Pronamic\WordPress\Pay\Gateways\ING\KassaCompleet\Integration(), |
||
185 | new \Pronamic\WordPress\Pay\Gateways\Mollie\Integration(), |
||
186 | new \Pronamic\WordPress\Pay\Gateways\MollieIDeal\Integration(), |
||
187 | $mollie_ideal_basic, |
||
188 | new \Pronamic\WordPress\Pay\Gateways\MultiSafepay\Connect\Integration(), |
||
189 | new \Pronamic\WordPress\Pay\Gateways\Nocks\Integration(), |
||
190 | new \Pronamic\WordPress\Pay\Gateways\Ingenico\DirectLink\Integration(), |
||
191 | new \Pronamic\WordPress\Pay\Gateways\Ingenico\OrderStandard\Integration(), |
||
192 | new \Pronamic\WordPress\Pay\Gateways\OmniKassa\Integration(), |
||
193 | new \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Integration(), |
||
194 | new \Pronamic\WordPress\Pay\Gateways\PayNL\Integration(), |
||
195 | $paytor, |
||
196 | $postcode_ideal, |
||
197 | $qantani_mollie, |
||
198 | $rabobank_ideal_professional_v3, |
||
199 | new \Pronamic\WordPress\Pay\Gateways\Sisow\Integration(), |
||
200 | $sisow_ideal_basic, |
||
201 | new \Pronamic\WordPress\Pay\Gateways\TargetPay\Integration(), |
||
202 | ); |
||
204 |