@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | /** |
| 35 | 35 | * Construct and initialize money object. |
| 36 | 36 | * |
| 37 | - * @param string|int|float $amount Amount. |
|
| 38 | - * @param Currency|string|null $currency Currency. |
|
| 37 | + * @param integer $amount Amount. |
|
| 38 | + * @param string $currency Currency. |
|
| 39 | 39 | */ |
| 40 | 40 | public function __construct( $amount = 0, $currency = null ) { |
| 41 | 41 | $this->set_amount( $amount ); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | /** |
| 93 | 93 | * Set amount. |
| 94 | 94 | * |
| 95 | - * @param mixed $amount Amount. |
|
| 95 | + * @param integer $amount Amount. |
|
| 96 | 96 | */ |
| 97 | 97 | public function set_amount( $amount ) { |
| 98 | 98 | $this->amount = floatval( $amount ); |
@@ -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]' ); |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $currencies = self::get_currencies(); |
| 54 | 54 | |
| 55 | - if ( isset( $currencies[ $alphabetic_code ] ) ) { |
|
| 56 | - $currency = $currencies[ $alphabetic_code ]; |
|
| 55 | + if ( isset( $currencies[$alphabetic_code] ) ) { |
|
| 56 | + $currency = $currencies[$alphabetic_code]; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | return $currency; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $currency->set_symbol( $info['symbol'] ); |
| 85 | 85 | $currency->set_number_decimals( $info['number_decimals'] ); |
| 86 | 86 | |
| 87 | - $currencies[ $currency->get_alphabetic_code() ] = $currency; |
|
| 87 | + $currencies[$currency->get_alphabetic_code()] = $currency; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | return $currencies; |