| @@ -461,7 +461,7 @@ discard block | ||
| 461 | 461 | |
| 462 | 462 | $signature = Security::create_signature( $data, $this->get_secret_key() ); | 
| 463 | 463 | |
| 464 | - $data[ Parameters::SIGNATURE ] = $signature; | |
| 464 | + $data[Parameters::SIGNATURE] = $signature; | |
| 465 | 465 | |
| 466 | 466 | $result = wp_remote_post( | 
| 467 | 467 | $url, | 
| @@ -527,7 +527,7 @@ discard block | ||
| 527 | 527 | } | 
| 528 | 528 | |
| 529 | 529 |  					foreach ( $parameter['LISTITEMDESCRIPTION'] as $issuer ) { | 
| 530 | - $issuers[ $issuer['VALUE'] ] = $issuer['DESCRIPTION']; | |
| 530 | + $issuers[$issuer['VALUE']] = $issuer['DESCRIPTION']; | |
| 531 | 531 | } | 
| 532 | 532 | |
| 533 | 533 | break; | 
| @@ -567,7 +567,7 @@ discard block | ||
| 567 | 567 | |
| 568 | 568 | $signature = Security::create_signature( $data, $this->get_secret_key() ); | 
| 569 | 569 | |
| 570 | - $data[ Parameters::SIGNATURE ] = $signature; | |
| 570 | + $data[Parameters::SIGNATURE] = $signature; | |
| 571 | 571 | |
| 572 | 572 | return $data; | 
| 573 | 573 | } | 
| @@ -197,11 +197,11 @@ discard block | ||
| 197 | 197 | $data = $this->client->verify_request( $data ); | 
| 198 | 198 | |
| 199 | 199 |  		if ( $data ) { | 
| 200 | - $payment->set_transaction_id( $data[ Parameters::PAYMENT ] ); | |
| 201 | - $payment->set_status( Statuses::transform( $data[ Parameters::STATUS_CODE ] ) ); | |
| 202 | - $payment->set_consumer_iban( $data[ Parameters::SERVICE_IDEAL_CONSUMER_IBAN ] ); | |
| 203 | - $payment->set_consumer_bic( $data[ Parameters::SERVICE_IDEAL_CONSUMER_BIC ] ); | |
| 204 | - $payment->set_consumer_name( $data[ Parameters::SERVICE_IDEAL_CONSUMER_NAME ] ); | |
| 200 | + $payment->set_transaction_id( $data[Parameters::PAYMENT] ); | |
| 201 | + $payment->set_status( Statuses::transform( $data[Parameters::STATUS_CODE] ) ); | |
| 202 | + $payment->set_consumer_iban( $data[Parameters::SERVICE_IDEAL_CONSUMER_IBAN] ); | |
| 203 | + $payment->set_consumer_bic( $data[Parameters::SERVICE_IDEAL_CONSUMER_BIC] ); | |
| 204 | + $payment->set_consumer_name( $data[Parameters::SERVICE_IDEAL_CONSUMER_NAME] ); | |
| 205 | 205 | |
| 206 | 206 | $labels = array( | 
| 207 | 207 | Parameters::PAYMENT => __( 'Payment', 'pronamic_ideal' ), | 
| @@ -229,9 +229,9 @@ discard block | ||
| 229 | 229 | $note .= '<dl>'; | 
| 230 | 230 | |
| 231 | 231 |  			foreach ( $labels as $key => $label ) { | 
| 232 | -				if ( isset( $data[ $key ] ) ) { | |
| 232 | +				if ( isset( $data[$key] ) ) { | |
| 233 | 233 | $note .= sprintf( '<dt>%s</dt>', esc_html( $label ) ); | 
| 234 | - $note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) ); | |
| 234 | + $note .= sprintf( '<dd>%s</dd>', esc_html( $data[$key] ) ); | |
| 235 | 235 | } | 
| 236 | 236 | } | 
| 237 | 237 | |
| @@ -44,16 +44,16 @@ | ||
| 44 | 44 | $payment_id = null; | 
| 45 | 45 | |
| 46 | 46 | if ( isset( | 
| 47 | - $data[ Parameters::ADD_PRONAMIC_PAYMENT_ID ], | |
| 48 | - $data[ Parameters::STATUS_CODE ] | |
| 47 | + $data[Parameters::ADD_PRONAMIC_PAYMENT_ID], | |
| 48 | + $data[Parameters::STATUS_CODE] | |
| 49 | 49 |  		) ) { | 
| 50 | - $payment_id = $data[ Parameters::ADD_PRONAMIC_PAYMENT_ID ]; | |
| 50 | + $payment_id = $data[Parameters::ADD_PRONAMIC_PAYMENT_ID]; | |
| 51 | 51 | } elseif ( isset( | 
| 52 | - $data[ Parameters::INVOICE_NUMBER ], | |
| 53 | - $data[ Parameters::STATUS_CODE ] | |
| 52 | + $data[Parameters::INVOICE_NUMBER], | |
| 53 | + $data[Parameters::STATUS_CODE] | |
| 54 | 54 |  		) ) { | 
| 55 | 55 | // Fallback for payments started with plugin version <= 4.5.5. | 
| 56 | - $payment_id = $data[ Parameters::INVOICE_NUMBER ]; | |
| 56 | + $payment_id = $data[Parameters::INVOICE_NUMBER]; | |
| 57 | 57 | } | 
| 58 | 58 | |
| 59 | 59 |  		if ( $payment_id ) { | 
| @@ -54,7 +54,7 @@ | ||
| 54 | 54 | continue; | 
| 55 | 55 | } | 
| 56 | 56 | |
| 57 | - $filter[ $key ] = $value; | |
| 57 | + $filter[$key] = $value; | |
| 58 | 58 | } | 
| 59 | 59 | |
| 60 | 60 | return $filter; | 
| @@ -143,8 +143,8 @@ | ||
| 143 | 143 | return null; | 
| 144 | 144 | } | 
| 145 | 145 | |
| 146 | -		if ( isset( self::$map[ $payment_method ] ) ) { | |
| 147 | - return self::$map[ $payment_method ]; | |
| 146 | +		if ( isset( self::$map[$payment_method] ) ) { | |
| 147 | + return self::$map[$payment_method]; | |
| 148 | 148 | } | 
| 149 | 149 | |
| 150 | 150 | return $default; | 
| @@ -97,7 +97,7 @@ discard block | ||
| 97 | 97 | |
| 98 | 98 |  		if ( is_array( $response ) ) { | 
| 99 | 99 |  			foreach ( $response as $flat_key => $value ) { | 
| 100 | - unset( $response[ $flat_key ] ); | |
| 100 | + unset( $response[$flat_key] ); | |
| 101 | 101 | |
| 102 | 102 | $is_brq = ( 'BRQ_' === substr( $flat_key, 0, 4 ) ); | 
| 103 | 103 | |
| @@ -113,15 +113,15 @@ discard block | ||
| 113 | 113 | $parts[0] = sprintf( 'BRQ_%s', $parts[0] ); | 
| 114 | 114 | } | 
| 115 | 115 | |
| 116 | - $item =& $return; | |
| 116 | + $item = & $return; | |
| 117 | 117 | |
| 118 | 118 | // Define key parts as array and set current item | 
| 119 | 119 |  				foreach ( $parts as $key ) { | 
| 120 | -					if ( ! isset( $item[ $key ] ) ) { | |
| 121 | - $item[ $key ] = array(); | |
| 120 | +					if ( ! isset( $item[$key] ) ) { | |
| 121 | + $item[$key] = array(); | |
| 122 | 122 | } | 
| 123 | 123 | |
| 124 | - $item =& $item[ $key ]; | |
| 124 | + $item = & $item[$key]; | |
| 125 | 125 | } | 
| 126 | 126 | |
| 127 | 127 | // Set value of item | 
| @@ -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,14 +43,14 @@ 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 | 55 | define( 'WP_TESTS_DOMAIN', 'example.org' ); | 
| 56 | 56 | define( 'WP_TESTS_EMAIL', '[email protected]' ); | 
| @@ -49,7 +49,7 @@ discard block | ||
| 49 | 49 | * @param string $file File with HTTP response. | 
| 50 | 50 | */ | 
| 51 | 51 |  	public function mock_http_response( $url, $file ) { | 
| 52 | - $this->mock_http_responses[ $url ] = $file; | |
| 52 | + $this->mock_http_responses[$url] = $file; | |
| 53 | 53 | } | 
| 54 | 54 | |
| 55 | 55 | /** | 
| @@ -64,13 +64,13 @@ discard block | ||
| 64 | 64 | * @return array | 
| 65 | 65 | */ | 
| 66 | 66 |  	public function pre_http_request( $preempt, $r, $url ) { | 
| 67 | -		if ( ! isset( $this->mock_http_responses[ $url ] ) ) { | |
| 67 | +		if ( ! isset( $this->mock_http_responses[$url] ) ) { | |
| 68 | 68 | return $preempt; | 
| 69 | 69 | } | 
| 70 | 70 | |
| 71 | - $file = $this->mock_http_responses[ $url ]; | |
| 71 | + $file = $this->mock_http_responses[$url]; | |
| 72 | 72 | |
| 73 | - unset( $this->mock_http_responses[ $url ] ); | |
| 73 | + unset( $this->mock_http_responses[$url] ); | |
| 74 | 74 | |
| 75 | 75 | $response = file_get_contents( $file, true ); | 
| 76 | 76 | |