Fixed coding standards

This commit is contained in:
Claudio Sanches 2017-03-21 12:38:35 -03:00
parent fa472689d6
commit f1dab3fdce
4 changed files with 14 additions and 8 deletions

View File

@ -12,10 +12,10 @@
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 2.5.0
* @see https://docs.woocommerce.com/document/template-structure/
* @author WooThemes
* @package WooCommerce/Templates/Emails
* @version 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -23,7 +23,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
<?php if ( ! empty( $fields ) ): ?>
<?php if ( ! empty( $fields ) ) : ?>
<h2><?php _e( 'Customer details', 'woocommerce' ); ?></h2>
<ul>
<?php foreach ( $fields as $field ) : ?>

View File

@ -106,7 +106,7 @@ class WC_Tests_Coupon_Data_Store extends WC_Unit_Test_Case {
function test_coupon_date_saving() {
$expiry_date = time() - 10;
$coupon = WC_Helper_Coupon::create_coupon( 'coupon-' . time());
$coupon = WC_Helper_Coupon::create_coupon( 'coupon-' . time() );
$coupon->set_date_expires( $expiry_date );
$coupon->save();

View File

@ -384,17 +384,23 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
*/
function test_set_date_prop_server_timezone() {
// Repeat all tests with different server timezone.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'Pacific/Fiji' );
// @codingStandardsIgnoreEnd
$this->test_set_date_prop_gmt_offset();
$this->test_set_date_prop_timezone_string();
// Repeat all tests with different server timezone.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'Pacific/Tahiti' );
// @codingStandardsIgnoreEnd
$this->test_set_date_prop_gmt_offset();
$this->test_set_date_prop_timezone_string();
// Restore to UTC.
// @codingStandardsIgnoreStart
date_default_timezone_set( 'UTC' );
// @codingStandardsIgnoreEnd
}
/**
@ -408,7 +414,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
$changes = array(
'prop1' => 'new_value1',
'prop3' => 'value3'
'prop3' => 'value3',
);
$object = new WC_Mock_WC_Data;

View File

@ -33,7 +33,7 @@ class WC_Tests_Order_Item_Functions extends WC_Unit_Test_Case {
$item_id = $item->get_id();
// Test that the initial key doesn't exist.
$item = new WC_Order_Item_Product( $item_id );;
$item = new WC_Order_Item_Product( $item_id );
$this->assertEmpty( $item->get_meta( '_test_key' ) );
$this->assertEmpty( wc_get_order_item_meta( $item_id, '_test_key' ) );