Skip to content

Commit

Permalink
WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Aug 27, 2016
1 parent 7d571be commit 58b9df6
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions includes/abstracts/abstract-wc-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ public function get_formatted_line_subtotal( $item, $tax_display = '' ) {

$subtotal = wc_price( $this->get_line_subtotal( $item ), array( 'ex_tax_label' => $ex_tax_label, 'currency' => $this->get_currency() ) );
} else {
$subtotal = wc_price( $this->get_line_subtotal( $item, true ), array('currency' => $this->get_currency()) );
$subtotal = wc_price( $this->get_line_subtotal( $item, true ), array( 'currency' => $this->get_currency() ) );
}

return apply_filters( 'woocommerce_order_formatted_line_subtotal', $subtotal, $item, $this );
Expand Down Expand Up @@ -1510,7 +1510,7 @@ public function get_shipping_to_display( $tax_display = '' ) {
if ( $tax_display == 'excl' ) {

// Show shipping excluding tax.
$shipping = wc_price( $this->get_shipping_total(), array('currency' => $this->get_currency()) );
$shipping = wc_price( $this->get_shipping_total(), array( 'currency' => $this->get_currency() ) );

if ( $this->get_shipping_tax() != 0 && $this->get_prices_include_tax() ) {
$shipping .= apply_filters( 'woocommerce_order_shipping_to_display_tax_label', '&nbsp;<small class="tax_label">' . WC()->countries->ex_tax_or_vat() . '</small>', $this, $tax_display );
Expand All @@ -1519,7 +1519,7 @@ public function get_shipping_to_display( $tax_display = '' ) {
} else {

// Show shipping including tax.
$shipping = wc_price( $this->get_shipping_total() + $this->get_shipping_tax(), array('currency' => $this->get_currency()) );
$shipping = wc_price( $this->get_shipping_total() + $this->get_shipping_tax(), array( 'currency' => $this->get_currency() ) );

if ( $this->get_shipping_tax() != 0 && ! $this->get_prices_include_tax() ) {
$shipping .= apply_filters( 'woocommerce_order_shipping_to_display_tax_label', '&nbsp;<small class="tax_label">' . WC()->countries->inc_tax_or_vat() . '</small>', $this, $tax_display );
Expand Down Expand Up @@ -1586,7 +1586,7 @@ public function get_order_item_totals( $tax_display = '' ) {
}
$total_rows[ 'fee_' . $fee->get_id() ] = array(
'label' => $fee->get_name() . ':',
'value' => wc_price( 'excl' === $tax_display ? $fee->get_total() : $fee->get_total() + $fee->get_total_tax(), array('currency' => $this->get_currency()) ),
'value' => wc_price( 'excl' === $tax_display ? $fee->get_total() : $fee->get_total() + $fee->get_total_tax(), array( 'currency' => $this->get_currency() ) ),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion includes/abstracts/abstract-wc-product.php
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ public function get_formatted_name() {
* @return array
*/
protected function get_related_terms( $term ) {
$terms_array = array(0);
$terms_array = array( 0 );

$terms = apply_filters( 'woocommerce_get_related_' . $term . '_terms', wp_get_post_terms( $this->id, $term ), $this->id );
foreach ( $terms as $term ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/settings/class-wc-settings-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function get_settings() {
'autoload' => false,
),

array( 'type' => 'sectionend', 'id' => 'general_options'),
array( 'type' => 'sectionend', 'id' => 'general_options' ),

array( 'title' => __( 'Currency Options', 'woocommerce' ), 'type' => 'title', 'desc' => __( 'The following options affect how prices are displayed on the frontend.', 'woocommerce' ), 'id' => 'pricing_options' ),

Expand Down
2 changes: 1 addition & 1 deletion includes/api/legacy/v1/class-wc-api-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ public function format_datetime( $timestamp, $convert_to_utc = false ) {
public function get_headers($server) {
$headers = array();
// CONTENT_* headers are not prefixed with HTTP_
$additional = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);
$additional = array( 'CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true );

foreach ($server as $key => $value) {
if ( strpos( $key, 'HTTP_' ) === 0) {
Expand Down
2 changes: 1 addition & 1 deletion includes/api/legacy/v2/class-wc-api-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ public function format_datetime( $timestamp, $convert_to_utc = false ) {
public function get_headers($server) {
$headers = array();
// CONTENT_* headers are not prefixed with HTTP_
$additional = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);
$additional = array( 'CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true );

foreach ($server as $key => $value) {
if ( strpos( $key, 'HTTP_' ) === 0) {
Expand Down
2 changes: 1 addition & 1 deletion includes/api/legacy/v3/class-wc-api-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ public function format_datetime( $timestamp, $convert_to_utc = false ) {
public function get_headers($server) {
$headers = array();
// CONTENT_* headers are not prefixed with HTTP_
$additional = array('CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true);
$additional = array( 'CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true );

foreach ($server as $key => $value) {
if ( strpos( $key, 'HTTP_' ) === 0) {
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct () {
$this->checkout_fields['order'] = array(
'order_comments' => array(
'type' => 'textarea',
'class' => array('notes'),
'class' => array( 'notes' ),
'label' => __( 'Order Notes', 'woocommerce' ),
'placeholder' => _x('Notes about your order, e.g. special notes for delivery.', 'placeholder', 'woocommerce'),
),
Expand Down
4 changes: 2 additions & 2 deletions includes/class-wc-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public function __construct() {
add_action( 'init', array( $this, 'add_endpoints' ) );
if ( ! is_admin() ) {
add_action( 'wp_loaded', array( $this, 'get_errors' ), 20 );
add_filter( 'query_vars', array( $this, 'add_query_vars'), 0 );
add_action( 'parse_request', array( $this, 'parse_request'), 0 );
add_filter( 'query_vars', array( $this, 'add_query_vars' ), 0 );
add_action( 'parse_request', array( $this, 'parse_request' ), 0 );
add_action( 'pre_get_posts', array( $this, 'pre_get_posts' ) );
add_action( 'wp', array( $this, 'remove_product_query' ) );
add_action( 'wp', array( $this, 'remove_ordering_args' ) );
Expand Down
2 changes: 1 addition & 1 deletion includes/gateways/paypal/class-wc-gateway-paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function get_icon() {
*/
protected function get_icon_url( $country ) {
$url = 'https://www.paypal.com/' . strtolower( $country );
$home_counties = array( 'BE', 'CZ', 'DK', 'HU', 'IT', 'JP', 'NL', 'NO', 'ES', 'SE', 'TR');
$home_counties = array( 'BE', 'CZ', 'DK', 'HU', 'IT', 'JP', 'NL', 'NO', 'ES', 'SE', 'TR' );
$countries = array( 'DZ', 'AU', 'BH', 'BQ', 'BW', 'CA', 'CN', 'CW', 'FI', 'FR', 'DE', 'GR', 'HK', 'IN', 'ID', 'JO', 'KE', 'KW', 'LU', 'MY', 'MA', 'OM', 'PH', 'PL', 'PT', 'QA', 'IE', 'RU', 'BL', 'SX', 'MF', 'SA', 'SG', 'SK', 'KR', 'SS', 'TW', 'TH', 'AE', 'GB', 'US', 'VN' );

if ( in_array( $country, $home_counties ) ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/libraries/class-emogrifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ private function splitCssAndMediaQuery($css) {
);
// clean CSS before output
$css = preg_replace($search, $replace, $css);
return array('css' => $css, 'media' => self::$_media);
return array( 'css' => $css, 'media' => self::$_media );
}

private function _media_concat( $matches ) {
Expand Down
2 changes: 1 addition & 1 deletion includes/wc-product-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function wc_get_featured_product_ids() {
'meta_query' => array(
array(
'key' => '_visibility',
'value' => array('catalog', 'visible'),
'value' => array( 'catalog', 'visible' ),
'compare' => 'IN',
),
array(
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/class-wc-api-unit-test-case.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function setUp() {
$_SERVER['REQUEST_METHOD'] = null;

// mock the API server to prevent headers from being sent
$this->mock_server = $this->getMock( 'WC_API_Server', array ('header' ), array( '/' ) );
$this->mock_server = $this->getMock( 'WC_API_Server', array ( 'header' ), array( '/' ) );

WC()->api->register_resources( $this->mock_server );
}
Expand Down

0 comments on commit 58b9df6

Please sign in to comment.