@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $html = $gateway->get_input_html(); |
45 | 45 | |
46 | 46 | if ( ! empty( $html ) ) { |
47 | - $inputs[ $payment_method ] = array( |
|
47 | + $inputs[$payment_method] = array( |
|
48 | 48 | 'label' => $method_name, |
49 | 49 | 'html' => $html, |
50 | 50 | ); |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | foreach ( $options as $key => $label ) { |
168 | 168 | $interval_suffix = ''; |
169 | 169 | |
170 | - if ( isset( $options_interval_suffix[ $key ] ) ) { |
|
171 | - $interval_suffix = $options_interval_suffix[ $key ]; |
|
170 | + if ( isset( $options_interval_suffix[$key] ) ) { |
|
171 | + $interval_suffix = $options_interval_suffix[$key]; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | printf( |
@@ -16,13 +16,13 @@ discard block |
||
16 | 16 | $sections_fields = array(); |
17 | 17 | |
18 | 18 | foreach ( $sections as $id => $section ) { |
19 | - $sections_fields[ $id ] = array(); |
|
19 | + $sections_fields[$id] = array(); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | foreach ( $fields as $id => $field ) { |
23 | 23 | $section = $field['section']; |
24 | 24 | |
25 | - $sections_fields[ $section ][ $id ] = $field; |
|
25 | + $sections_fields[$section][$id] = $field; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | // Sections. |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | <?php |
182 | 182 | |
183 | - foreach ( $sections_fields[ $id ] as $field ) : |
|
183 | + foreach ( $sections_fields[$id] as $field ) : |
|
184 | 184 | |
185 | 185 | $classes = array(); |
186 | 186 | if ( isset( $field['methods'] ) ) { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $config_ids = $wpdb->get_results( $query ); // WPCS: unprepared SQL ok. |
230 | 230 | |
231 | 231 | foreach ( $config_ids as $config_id ) { |
232 | - $config_ids_map[ $config_id->id ] = $config_id->post_id; |
|
232 | + $config_ids_map[$config_id->id] = $config_id->post_id; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $feed_meta = json_decode( $feed->meta, true ); |
302 | 302 | |
303 | 303 | $meta['form_id'] = $feed->form_id; |
304 | - $meta['config_id'] = @$config_ids_map[ $feed->configuration_id ]; |
|
304 | + $meta['config_id'] = @$config_ids_map[$feed->configuration_id]; |
|
305 | 305 | $meta['is_active'] = $feed->is_active; |
306 | 306 | $meta['transaction_description'] = @$feed_meta['transactionDescription']; |
307 | 307 | $meta['delay_notification_ids'] = @$feed_meta['delayNotificationIds']; |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | |
416 | 416 | // Meta |
417 | 417 | $meta = array( |
418 | - 'config_id' => @$config_ids_map[ $payment->configuration_id ], |
|
418 | + 'config_id' => @$config_ids_map[$payment->configuration_id], |
|
419 | 419 | 'purchase_id' => $payment->purchase_id, |
420 | 420 | 'transaction_id' => $payment->transaction_id, |
421 | 421 | 'currency' => $payment->currency, |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | $value = get_option( $key_old ); |
475 | 475 | |
476 | 476 | if ( ! empty( $value ) ) { |
477 | - $value_new = @$config_ids_map[ $value ]; |
|
477 | + $value_new = @$config_ids_map[$value]; |
|
478 | 478 | |
479 | 479 | update_option( $key_new, $value_new ); |
480 | 480 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | if ( is_array( $settings ) && isset( $settings['pronamic_shopp_ideal_configuration'] ) ) { |
501 | 501 | $value = $settings['pronamic_shopp_ideal_configuration']; |
502 | 502 | |
503 | - $settings['config_id'] = @$config_ids_map[ $value ]; |
|
503 | + $settings['config_id'] = @$config_ids_map[$value]; |
|
504 | 504 | |
505 | 505 | $wpdb->update( |
506 | 506 | $shopp_meta_table, |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | if ( is_array( $settings ) && isset( $settings['configuration_id'] ) ) { |
523 | 523 | $value = $settings['configuration_id']; |
524 | 524 | |
525 | - $settings['config_id'] = @$config_ids_map[ $value ]; |
|
525 | + $settings['config_id'] = @$config_ids_map[$value]; |
|
526 | 526 | |
527 | 527 | unset( $settings['configuration_id'] ); |
528 | 528 |
@@ -74,13 +74,13 @@ |
||
74 | 74 | $files = require $file; |
75 | 75 | |
76 | 76 | foreach ( $files as $identifier => $path ) { |
77 | - if ( ! empty( $GLOBALS['__composer_autoload_files'][ $identifier ] ) ) { |
|
77 | + if ( ! empty( $GLOBALS['__composer_autoload_files'][$identifier] ) ) { |
|
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | |
81 | 81 | require $path; |
82 | 82 | |
83 | - $GLOBALS['__composer_autoload_files'][ $identifier ] = true; |
|
83 | + $GLOBALS['__composer_autoload_files'][$identifier] = true; |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | } |
@@ -646,8 +646,8 @@ discard block |
||
646 | 646 | <td> |
647 | 647 | <?php |
648 | 648 | |
649 | - if ( isset( $source['components'][ $key ] ) ) { |
|
650 | - $component = $source['components'][ $key ]; |
|
649 | + if ( isset( $source['components'][$key] ) ) { |
|
650 | + $component = $source['components'][$key]; |
|
651 | 651 | |
652 | 652 | $name = null; |
653 | 653 | $tip = null; |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | $warning = null; |
656 | 656 | |
657 | 657 | if ( is_array( $component ) ) { |
658 | - $name = $component['name']; |
|
658 | + $name = $component['name']; |
|
659 | 659 | |
660 | 660 | if ( array_key_exists( 'description', $component ) ) { |
661 | 661 | $description = $component['description']; |
@@ -504,8 +504,8 @@ |
||
504 | 504 | <td> |
505 | 505 | <?php |
506 | 506 | |
507 | - if ( isset( $source['components'][ $key ] ) ) { |
|
508 | - $component = $source['components'][ $key ]; |
|
507 | + if ( isset( $source['components'][$key] ) ) { |
|
508 | + $component = $source['components'][$key]; |
|
509 | 509 | |
510 | 510 | $name = null; |
511 | 511 | $tip = null; |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | <?php |
112 | 112 | |
113 | 113 | $values = array_map( |
114 | - function ( PaymentLine $line ) { |
|
114 | + function( PaymentLine $line ) { |
|
115 | 115 | return $line->get_total_amount()->get_excluding_tax()->get_value(); |
116 | 116 | }, |
117 | 117 | $lines->get_array() |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | if ( $payment->get_total_amount()->has_tax() ) { |
131 | 131 | $values = array_map( |
132 | - function ( PaymentLine $line ) { |
|
132 | + function( PaymentLine $line ) { |
|
133 | 133 | return $line->get_total_amount()->get_including_tax()->get_value(); |
134 | 134 | }, |
135 | 135 | $lines->get_array() |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $providers = array(); |
16 | 16 | |
17 | 17 | foreach ( $data as $provider ) { |
18 | - $providers[ $provider->slug ] = $provider; |
|
18 | + $providers[$provider->slug] = $provider; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | // Gateways. |
@@ -23,17 +23,17 @@ discard block |
||
23 | 23 | $gateways = json_decode( $data ); |
24 | 24 | |
25 | 25 | foreach ( $gateways as $gateway ) { |
26 | - if ( ! isset( $providers[ $gateway->provider ] ) ) { |
|
26 | + if ( ! isset( $providers[$gateway->provider] ) ) { |
|
27 | 27 | continue; |
28 | 28 | } |
29 | 29 | |
30 | - $provider = $providers[ $gateway->provider ]; |
|
30 | + $provider = $providers[$gateway->provider]; |
|
31 | 31 | |
32 | 32 | if ( ! isset( $provider->gateways ) ) { |
33 | 33 | $provider->gateways = array(); |
34 | 34 | } |
35 | 35 | |
36 | - $provider->gateways[ $gateway->slug ] = $gateway; |
|
36 | + $provider->gateways[$gateway->slug] = $gateway; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | // Print providers with gateways. |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | \WP_CLI::add_hook( |
19 | 19 | 'after_add_command:i18n make-pot', |
20 | - function () { |
|
20 | + function() { |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Title: Make pot command. |