Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
WordPress Coding Standards optimizations.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Apr 30, 2015
1 parent 3db8c00 commit 241853c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions phpcs.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@

<exclude name="WordPress.VIP.RestrictedVariables.cache_constraints" />
</rule>

<rule ref="WordPress.VIP.RestrictedFunctions.file_get_contents">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function start( Pronamic_Pay_PaymentDataInterface $data, Pronamic_Pay_Pay
$transaction->gateway = '';
$transaction->days_active = '';

if ( Pronamic_WP_Pay_PaymentMethods::IDEAL == $payment_method ) {
if ( Pronamic_WP_Pay_PaymentMethods::IDEAL === $payment_method ) {
$gateway_info = new Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_GatewayInfo();
$gateway_info->issuer_id = $data->get_issuer_id();

Expand Down
2 changes: 1 addition & 1 deletion src/XML/DirectTransactionResponseMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function parse( SimpleXMLElement $xml ) {

// Result
$message->result = Pronamic_WP_Pay_XML_Security::filter( $xml['result'] );

// Transaction
$message->transaction = Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_XML_TransactionParser::parse( $xml->transaction );

Expand Down
4 changes: 1 addition & 3 deletions tests/DirectTransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ public function pre_http_request( $preempt, $request, $url ) {
}

public function http_api_debug( $response, $context, $class, $args, $url ) {
var_dump( $response );

echo $response['body'];
}

public function test_init() {
Expand Down Expand Up @@ -93,7 +91,7 @@ public function test_init() {
$gateway_info->issuer_id = '3151';

$message = new Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_XML_DirectTransactionRequestMessage( $merchant, $customer, $transaction, $gateway_info );

$signature = Pronamic_WP_Pay_Gateways_MultiSafepay_Connect_Signature::generate( $transaction->amount, $transaction->currency, $merchant->account, $merchant->site_id, $transaction->id );

$message->signature = $signature;
Expand Down
2 changes: 1 addition & 1 deletion tests/GatewaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function pre_http_request( $preempt, $request, $url ) {
}

public function http_api_debug( $response, $context, $class, $args, $url ) {
var_dump( $response );

}

function test_init() {
Expand Down

0 comments on commit 241853c

Please sign in to comment.