@@ -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]' ); |
@@ -81,9 +81,11 @@ |
||
| 81 | 81 | |
| 82 | 82 | <?php |
| 83 | 83 | |
| 84 | - else : |
|
| 84 | + else { |
|
| 85 | + : |
|
| 85 | 86 | |
| 86 | 87 | echo esc_html( $subscription->get_amount()->format_i18n() ); |
| 88 | + } |
|
| 87 | 89 | |
| 88 | 90 | endif; |
| 89 | 91 | |
@@ -18,13 +18,16 @@ |
||
| 18 | 18 | <?php esc_html_e( 'No payment lines found.', 'pronamic_ideal' ); ?> |
| 19 | 19 | </p> |
| 20 | 20 | |
| 21 | -<?php else : ?> |
|
| 21 | +<?php else { |
|
| 22 | + : ?> |
|
| 22 | 23 | |
| 23 | 24 | <div class="pronamic-pay-table-responsive"> |
| 24 | 25 | <table class="pronamic-pay-table widefat"> |
| 25 | 26 | <thead> |
| 26 | 27 | <tr> |
| 27 | - <th scope="col"><?php esc_html_e( 'ID', 'pronamic_ideal' ); ?></th> |
|
| 28 | + <th scope="col"><?php esc_html_e( 'ID', 'pronamic_ideal' ); |
|
| 29 | +} |
|
| 30 | +?></th> |
|
| 28 | 31 | <th scope="col"><?php esc_html_e( 'SKU', 'pronamic_ideal' ); ?></th> |
| 29 | 32 | <th scope="col"><?php esc_html_e( 'Image', 'pronamic_ideal' ); ?></th> |
| 30 | 33 | <th scope="col"><?php esc_html_e( 'Name', 'pronamic_ideal' ); ?></th> |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | <?php |
| 111 | 111 | |
| 112 | 112 | $values = array_map( |
| 113 | - function ( PaymentLine $line ) { |
|
| 113 | + function( PaymentLine $line ) { |
|
| 114 | 114 | return $line->get_total_amount()->get_excluding_tax()->get_amount(); |
| 115 | 115 | }, |
| 116 | 116 | $lines->get_array() |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | if ( $payment->get_total_amount()->has_tax() ) { |
| 130 | 130 | $values = array_map( |
| 131 | - function ( PaymentLine $line ) { |
|
| 131 | + function( PaymentLine $line ) { |
|
| 132 | 132 | return $line->get_total_amount()->get_including_tax()->get_amount(); |
| 133 | 133 | }, |
| 134 | 134 | $lines->get_array() |
@@ -389,9 +389,11 @@ |
||
| 389 | 389 | |
| 390 | 390 | esc_html_e( 'Ecommerce conversion tracked', 'pronamic_ideal' ); |
| 391 | 391 | |
| 392 | - else : |
|
| 392 | + else { |
|
| 393 | + : |
|
| 393 | 394 | |
| 394 | 395 | esc_html_e( 'Ecommerce conversion not tracked', 'pronamic_ideal' ); |
| 396 | + } |
|
| 395 | 397 | |
| 396 | 398 | endif; |
| 397 | 399 | |
@@ -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; |