@@ -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'] ) ) { |
@@ -5,21 +5,21 @@ discard block |
||
| 5 | 5 | |
| 6 | 6 | $providers = array(); |
| 7 | 7 | foreach ( $data as $provider ) { |
| 8 | - $providers[ $provider->slug ] = $provider; |
|
| 8 | + $providers[$provider->slug] = $provider; |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | $data = file_get_contents( __DIR__ . '/../gateways.json' ); |
| 12 | 12 | $gateways = json_decode( $data ); |
| 13 | 13 | |
| 14 | 14 | foreach ( $gateways as $gateway ) { |
| 15 | - if ( isset( $providers[ $gateway->provider ] ) ) { |
|
| 16 | - $provider = $providers[ $gateway->provider ]; |
|
| 15 | + if ( isset( $providers[$gateway->provider] ) ) { |
|
| 16 | + $provider = $providers[$gateway->provider]; |
|
| 17 | 17 | |
| 18 | 18 | if ( ! isset( $provider->gateways ) ) { |
| 19 | 19 | $provider->gateways = array(); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - $provider->gateways[ $gateway->slug ] = $gateway; |
|
| 22 | + $provider->gateways[$gateway->slug] = $gateway; |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | <?php foreach ( $gateways as $gateway ) : ?> |
| 30 | 30 | | <?php |
| 31 | 31 | |
| 32 | -if ( isset( $gateway->provider, $providers[ $gateway->provider ] ) ) { |
|
| 33 | - $provider = $providers[ $gateway->provider ]; |
|
| 32 | +if ( isset( $gateway->provider, $providers[$gateway->provider] ) ) { |
|
| 33 | + $provider = $providers[$gateway->provider]; |
|
| 34 | 34 | |
| 35 | 35 | if ( isset( $provider->url ) ) { |
| 36 | 36 | printf( '[%s](%s)', $provider->name, $provider->url ); |
@@ -5,21 +5,21 @@ |
||
| 5 | 5 | |
| 6 | 6 | $providers = array(); |
| 7 | 7 | foreach ( $data as $provider ) { |
| 8 | - $providers[ $provider->slug ] = $provider; |
|
| 8 | + $providers[$provider->slug] = $provider; |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | $data = file_get_contents( __DIR__ . '/../gateways.json' ); |
| 12 | 12 | $gateways = json_decode( $data ); |
| 13 | 13 | |
| 14 | 14 | foreach ( $gateways as $gateway ) { |
| 15 | - if ( isset( $providers[ $gateway->provider ] ) ) { |
|
| 16 | - $provider = $providers[ $gateway->provider ]; |
|
| 15 | + if ( isset( $providers[$gateway->provider] ) ) { |
|
| 16 | + $provider = $providers[$gateway->provider]; |
|
| 17 | 17 | |
| 18 | 18 | if ( ! isset( $provider->gateways ) ) { |
| 19 | 19 | $provider->gateways = array(); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - $provider->gateways[ $gateway->slug ] = $gateway; |
|
| 22 | + $provider->gateways[$gateway->slug] = $gateway; |
|
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | |
@@ -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 | } |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | // WARNING WARNING WARNING! |
| 31 | 31 | // These tests will DROP ALL TABLES in the database with the prefix named below. |
| 32 | 32 | // DO NOT use a production database or one that is shared with something else. |
| 33 | -define( 'DB_NAME' , getenv( 'WP_TESTS_DB_NAME' ) ?: 'wp_phpunit_tests' ); |
|
| 34 | -define( 'DB_USER' , getenv( 'WP_TESTS_DB_USER' ) ?: 'root' ); |
|
| 35 | -define( 'DB_PASSWORD' , getenv( 'WP_TESTS_DB_PASS' ) ?: '' ); |
|
| 36 | -define( 'DB_HOST' , getenv( 'WP_TESTS_DB_HOST' ) ?: 'localhost' ); |
|
| 37 | -define( 'DB_CHARSET' , 'utf8' ); |
|
| 38 | -define( 'DB_COLLATE' , '' ); |
|
| 33 | +define( 'DB_NAME', getenv( 'WP_TESTS_DB_NAME' ) ?: 'wp_phpunit_tests' ); |
|
| 34 | +define( 'DB_USER', getenv( 'WP_TESTS_DB_USER' ) ?: 'root' ); |
|
| 35 | +define( 'DB_PASSWORD', getenv( 'WP_TESTS_DB_PASS' ) ?: '' ); |
|
| 36 | +define( 'DB_HOST', getenv( 'WP_TESTS_DB_HOST' ) ?: 'localhost' ); |
|
| 37 | +define( 'DB_CHARSET', 'utf8' ); |
|
| 38 | +define( 'DB_COLLATE', '' ); |
|
| 39 | 39 | |
| 40 | 40 | /**#@+ |
| 41 | 41 | * Authentication Unique Keys and Salts. |
@@ -43,16 +43,16 @@ discard block |
||
| 43 | 43 | * Change these to different unique phrases! |
| 44 | 44 | * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} |
| 45 | 45 | */ |
| 46 | -define( 'AUTH_KEY', 'put your unique phrase here' ); |
|
| 47 | -define( 'SECURE_AUTH_KEY', 'put your unique phrase here' ); |
|
| 48 | -define( 'LOGGED_IN_KEY', 'put your unique phrase here' ); |
|
| 49 | -define( 'NONCE_KEY', 'put your unique phrase here' ); |
|
| 50 | -define( 'AUTH_SALT', 'put your unique phrase here' ); |
|
| 46 | +define( 'AUTH_KEY', 'put your unique phrase here' ); |
|
| 47 | +define( 'SECURE_AUTH_KEY', 'put your unique phrase here' ); |
|
| 48 | +define( 'LOGGED_IN_KEY', 'put your unique phrase here' ); |
|
| 49 | +define( 'NONCE_KEY', 'put your unique phrase here' ); |
|
| 50 | +define( 'AUTH_SALT', 'put your unique phrase here' ); |
|
| 51 | 51 | define( 'SECURE_AUTH_SALT', 'put your unique phrase here' ); |
| 52 | -define( 'LOGGED_IN_SALT', 'put your unique phrase here' ); |
|
| 53 | -define( 'NONCE_SALT', 'put your unique phrase here' ); |
|
| 52 | +define( 'LOGGED_IN_SALT', 'put your unique phrase here' ); |
|
| 53 | +define( 'NONCE_SALT', 'put your unique phrase here' ); |
|
| 54 | 54 | |
| 55 | -$table_prefix = 'tests_'; // Only numbers, letters, and underscores please! |
|
| 55 | +$table_prefix = 'tests_'; // Only numbers, letters, and underscores please! |
|
| 56 | 56 | |
| 57 | 57 | define( 'WP_TESTS_DOMAIN', 'example.org' ); |
| 58 | 58 | define( 'WP_TESTS_EMAIL', '[email protected]' ); |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | printf( |
| 63 | 63 | '<th class="column-%1$s">%2$s</th>', |
| 64 | 64 | esc_attr( $custom_column ), |
| 65 | - wp_kses_post( $column_titles[ $custom_column ] ) |
|
| 65 | + wp_kses_post( $column_titles[$custom_column] ) |
|
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | endforeach; |
@@ -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']; |