Failed Conditions
Push — develop ( c64194...2e2bde )
by Reüel
04:54
created
src/DirectLink/Gateway.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@
 block discarded – undo
193 193
 		$signature_out = Security::get_signature( $fields, $this->config->sha_out_pass_phrase, $this->config->hash_algorithm );
194 194
 
195 195
 		if ( 0 === strcasecmp( $signature, $signature_out ) ) {
196
-			$status = Statuses::transform( $data[ Parameters::STATUS ] );
196
+			$status = Statuses::transform( $data[Parameters::STATUS] );
197 197
 
198 198
 			$payment->set_status( $status );
199 199
 		}
Please login to merge, or discard this patch.
src/Data.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	public function get_field( $name ) {
45 45
 		$value = null;
46 46
 
47
-		if ( isset( $this->fields[ $name ] ) ) {
48
-			$value = $this->fields[ $name ];
47
+		if ( isset( $this->fields[$name] ) ) {
48
+			$value = $this->fields[$name];
49 49
 		}
50 50
 
51 51
 		return $value;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @return Data
61 61
 	 */
62 62
 	public function set_field( $name, $value ) {
63
-		$this->fields[ $name ] = $value;
63
+		$this->fields[$name] = $value;
64 64
 
65 65
 		return $this;
66 66
 	}
Please login to merge, or discard this patch.
src/XML/OrderResponseParser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@
 block discarded – undo
32 32
 
33 33
 		$order_response->order_id      = Security::filter( $xml['orderID'] );
34 34
 		$order_response->pay_id        = Security::filter( $xml['PAYID'] );
35
-		$order_response->nc_status     = Security::filter( $xml[ Parameters::NC_STATUS ] );
36
-		$order_response->nc_error      = Security::filter( $xml[ Parameters::NC_ERROR ] );
37
-		$order_response->nc_error_plus = Security::filter( $xml[ Parameters::NC_ERROR_PLUS ] );
35
+		$order_response->nc_status     = Security::filter( $xml[Parameters::NC_STATUS] );
36
+		$order_response->nc_error      = Security::filter( $xml[Parameters::NC_ERROR] );
37
+		$order_response->nc_error_plus = Security::filter( $xml[Parameters::NC_ERROR_PLUS] );
38 38
 		$order_response->acceptance    = Security::filter( $xml['ACCEPTANCE'] );
39
-		$order_response->status        = Security::filter( $xml[ Parameters::STATUS ] );
39
+		$order_response->status        = Security::filter( $xml[Parameters::STATUS] );
40 40
 		$order_response->eci           = Security::filter( $xml['ECI'] );
41
-		$order_response->amount        = Security::filter( $xml[ Parameters::AMOUNT ] );
42
-		$order_response->currency      = Security::filter( $xml[ Parameters::CURRENCY ] );
41
+		$order_response->amount        = Security::filter( $xml[Parameters::AMOUNT] );
42
+		$order_response->currency      = Security::filter( $xml[Parameters::CURRENCY] );
43 43
 		$order_response->pm            = Security::filter( $xml['PM'] );
44 44
 		$order_response->brand         = Security::filter( $xml['BRAND'] );
45 45
 
Please login to merge, or discard this patch.
src/Listener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@
 block discarded – undo
21 21
 		$data = array_change_key_case( $data, CASE_UPPER );
22 22
 
23 23
 		if ( isset(
24
-			$data[ Parameters::NC_ERROR ],
24
+			$data[Parameters::NC_ERROR],
25 25
 			$data['PAYID'],
26
-			$data[ Parameters::ORDERID ],
27
-			$data[ Parameters::STATUS ]
26
+			$data[Parameters::ORDERID],
27
+			$data[Parameters::STATUS]
28 28
 		) ) {
29
-			$payment_id = $data[ Parameters::ORDERID ];
29
+			$payment_id = $data[Parameters::ORDERID];
30 30
 
31 31
 			if ( isset( $data['PAYMENT_ID'] ) ) {
32 32
 				$payment_id = filter_var( $data['PAYMENT_ID'], FILTER_SANITIZE_NUMBER_INT );
Please login to merge, or discard this patch.
tests/wp-config.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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]' );
Please login to merge, or discard this patch.
src/OrderStandard/Gateway.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,13 +235,13 @@  discard block
 block discarded – undo
235 235
 		$data = $this->client->verify_request( $data );
236 236
 
237 237
 		if ( false !== $data ) {
238
-			$status = Statuses::transform( $data[ Parameters::STATUS ] );
238
+			$status = Statuses::transform( $data[Parameters::STATUS] );
239 239
 
240 240
 			$payment->set_status( $status );
241 241
 
242 242
 			// Update transaction ID.
243 243
 			if ( \array_key_exists( Parameters::PAY_ID, $data ) ) {
244
-				$payment->set_transaction_id( $data[ Parameters::PAY_ID ] );
244
+				$payment->set_transaction_id( $data[Parameters::PAY_ID] );
245 245
 			}
246 246
 
247 247
 			// Add payment note.
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 		$note .= '<dl>';
301 301
 
302 302
 		foreach ( $labels as $key => $label ) {
303
-			if ( isset( $data[ $key ] ) && '' !== $data[ $key ] ) {
303
+			if ( isset( $data[$key] ) && '' !== $data[$key] ) {
304 304
 				$note .= sprintf( '<dt>%s</dt>', esc_html( $label ) );
305
-				$note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) );
305
+				$note .= sprintf( '<dd>%s</dd>', esc_html( $data[$key] ) );
306 306
 			}
307 307
 		}
308 308
 
Please login to merge, or discard this patch.