From d186ec7dc30c949308d3149cd7be9fe3c30eb6f6 Mon Sep 17 00:00:00 2001 From: Ron Rennick Date: Thu, 5 Sep 2019 16:49:06 -0300 Subject: [PATCH] indent cleanup, remove blank line before class closing brace --- plugins/woocommerce-admin/src/API/Coupons.php | 1 - plugins/woocommerce-admin/src/API/Data.php | 1 - .../src/API/DataCountries.php | 1 - .../src/API/ProductCategories.php | 1 - .../src/API/Reports/Categories/Controller.php | 1 - .../src/API/Reports/Categories/DataStore.php | 1 - .../src/API/Reports/Categories/Query.php | 1 - .../src/API/Reports/Customers/DataStore.php | 1 - .../src/API/Reports/Customers/Query.php | 1 - .../src/API/Reports/Customers/Stats/Query.php | 1 - .../src/API/Reports/DataStore.php | 1 - .../src/API/Reports/Downloads/DataStore.php | 1 - .../src/API/Reports/Downloads/Query.php | 1 - .../API/Reports/Downloads/Stats/DataStore.php | 1 - .../src/API/Reports/Downloads/Stats/Query.php | 1 - .../src/API/Reports/Orders/DataStore.php | 1 - .../src/API/Reports/Orders/Query.php | 1 - .../API/Reports/Orders/Stats/Controller.php | 1 - .../src/API/Reports/Orders/Stats/Query.php | 1 - .../src/API/Reports/Products/Query.php | 1 - .../API/Reports/Products/Stats/DataStore.php | 1 - .../src/API/Reports/Query.php | 1 - .../src/API/Reports/Revenue/Query.php | 1 - .../src/API/Reports/Stock/Stats/Query.php | 1 - .../src/API/Reports/Taxes/Query.php | 1 - .../src/API/Reports/Taxes/Stats/DataStore.php | 1 - .../src/API/Reports/Taxes/Stats/Query.php | 1 - .../src/API/Reports/Variations/DataStore.php | 1 - .../src/API/Reports/Variations/Query.php | 1 - .../src/API/SettingOptions.php | 1 - .../woocommerce-admin/src/Notes/DataStore.php | 1 - .../src/Notes/NoteTraits.php | 28 +++++++++---------- 32 files changed, 14 insertions(+), 45 deletions(-) diff --git a/plugins/woocommerce-admin/src/API/Coupons.php b/plugins/woocommerce-admin/src/API/Coupons.php index 5107077bf45..28e4ef744de 100644 --- a/plugins/woocommerce-admin/src/API/Coupons.php +++ b/plugins/woocommerce-admin/src/API/Coupons.php @@ -91,5 +91,4 @@ class Coupons extends \WC_REST_Coupons_Controller { return $where; } - } diff --git a/plugins/woocommerce-admin/src/API/Data.php b/plugins/woocommerce-admin/src/API/Data.php index 729ca36b073..2abee27c74a 100644 --- a/plugins/woocommerce-admin/src/API/Data.php +++ b/plugins/woocommerce-admin/src/API/Data.php @@ -45,5 +45,4 @@ class Data extends \WC_REST_Data_Controller { ); return $response; } - } diff --git a/plugins/woocommerce-admin/src/API/DataCountries.php b/plugins/woocommerce-admin/src/API/DataCountries.php index 4916f67cbd5..670da2e0bec 100644 --- a/plugins/woocommerce-admin/src/API/DataCountries.php +++ b/plugins/woocommerce-admin/src/API/DataCountries.php @@ -25,5 +25,4 @@ class DataCountries extends \WC_REST_Data_Countries_Controller { * @var string */ protected $namespace = 'wc/v4'; - } diff --git a/plugins/woocommerce-admin/src/API/ProductCategories.php b/plugins/woocommerce-admin/src/API/ProductCategories.php index efa01a517bc..c9d688032cb 100644 --- a/plugins/woocommerce-admin/src/API/ProductCategories.php +++ b/plugins/woocommerce-admin/src/API/ProductCategories.php @@ -24,5 +24,4 @@ class ProductCategories extends \WC_REST_Product_Categories_Controller { * @var string */ protected $namespace = 'wc/v4'; - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Categories/Controller.php b/plugins/woocommerce-admin/src/API/Reports/Categories/Controller.php index 847c2f0c134..07081dc66a1 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Categories/Controller.php +++ b/plugins/woocommerce-admin/src/API/Reports/Categories/Controller.php @@ -318,5 +318,4 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { return $params; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Categories/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Categories/DataStore.php index bc17c97690e..b44a9a1a87d 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Categories/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Categories/DataStore.php @@ -334,5 +334,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { protected function get_cache_key( $params ) { return 'woocommerce_' . self::TABLE_NAME . '_' . md5( wp_json_encode( $params ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Categories/Query.php b/plugins/woocommerce-admin/src/API/Reports/Categories/Query.php index 843007e5d60..d10b3013431 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Categories/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Categories/Query.php @@ -48,5 +48,4 @@ class Query extends ReportsQuery { $results = \WC_Data_Store::load( self::REPORT_NAME )->get_data( $args ); return apply_filters( 'woocommerce_reports_categories_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Customers/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Customers/DataStore.php index 6cb44b601f2..985c6a24c1b 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Customers/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Customers/DataStore.php @@ -734,5 +734,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { protected function get_cache_key( $params ) { return 'woocommerce_' . self::TABLE_NAME . '_' . md5( wp_json_encode( $params ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Customers/Query.php b/plugins/woocommerce-admin/src/API/Reports/Customers/Query.php index c510c57dd18..ae2703601f6 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Customers/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Customers/Query.php @@ -54,5 +54,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_customers_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Customers/Stats/Query.php b/plugins/woocommerce-admin/src/API/Reports/Customers/Stats/Query.php index bd4ba8486b1..e9ffc53d0da 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Customers/Stats/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Customers/Stats/Query.php @@ -54,5 +54,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_customers_stats_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/DataStore.php index 46da2696846..5fc1e1a5fcd 100644 --- a/plugins/woocommerce-admin/src/API/Reports/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/DataStore.php @@ -1031,5 +1031,4 @@ class DataStore { } return $operator; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Downloads/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Downloads/DataStore.php index 6f3cff518f1..81cbf6b4553 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Downloads/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Downloads/DataStore.php @@ -426,5 +426,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { return $order_by; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Downloads/Query.php b/plugins/woocommerce-admin/src/API/Reports/Downloads/Query.php index f40a2b6cbd2..b36babb1dd8 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Downloads/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Downloads/Query.php @@ -47,5 +47,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_downloads_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/DataStore.php index c1e7a1dcb15..dac03210a84 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/DataStore.php @@ -202,5 +202,4 @@ class DataStore extends DownloadsDataStore implements DataStoreInterface { return $order_by; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/Query.php b/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/Query.php index 7329428ca30..41329fe08f3 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Downloads/Stats/Query.php @@ -37,5 +37,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_downloads_stats_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Orders/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Orders/DataStore.php index 339b624dcbe..00dcac21d57 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Orders/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Orders/DataStore.php @@ -432,5 +432,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { protected function get_cache_key( $params ) { return 'woocommerce_' . self::TABLE_NAME . '_' . md5( wp_json_encode( $params ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Orders/Query.php b/plugins/woocommerce-admin/src/API/Reports/Orders/Query.php index 838bf2119be..023ed32f302 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Orders/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Orders/Query.php @@ -41,5 +41,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_orders_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Controller.php b/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Controller.php index e35655c6db7..029d297eb50 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Controller.php +++ b/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Controller.php @@ -494,5 +494,4 @@ class Controller extends \Automattic\WooCommerce\Admin\API\Reports\Controller { return $params; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Query.php b/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Query.php index aade12b7054..3059eaa8a00 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Orders/Stats/Query.php @@ -61,5 +61,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_orders_stats_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Products/Query.php b/plugins/woocommerce-admin/src/API/Reports/Products/Query.php index 39d27335f4d..ac4296a8baf 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Products/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Products/Query.php @@ -48,5 +48,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_products_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Products/Stats/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Products/Stats/DataStore.php index fe4339c207b..ef696b94963 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Products/Stats/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Products/Stats/DataStore.php @@ -244,5 +244,4 @@ class DataStore extends ProductsDataStore implements DataStoreInterface { return $order_by; } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Query.php b/plugins/woocommerce-admin/src/API/Reports/Query.php index d0237ea32f5..6f9626f59e0 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Query.php @@ -23,5 +23,4 @@ abstract class Query extends \WC_Object_Query { /* translators: %s: Method name */ return new \WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'woocommerce-admin' ), __METHOD__ ), array( 'status' => 405 ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Revenue/Query.php b/plugins/woocommerce-admin/src/API/Reports/Revenue/Query.php index 45371cdf28f..da3e64daa94 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Revenue/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Revenue/Query.php @@ -65,5 +65,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_revenue_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Stock/Stats/Query.php b/plugins/woocommerce-admin/src/API/Reports/Stock/Stats/Query.php index b24c489f2c0..a266245fe02 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Stock/Stats/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Stock/Stats/Query.php @@ -29,5 +29,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data(); return apply_filters( 'woocommerce_reports_stock_stats_query', $results ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Taxes/Query.php b/plugins/woocommerce-admin/src/API/Reports/Taxes/Query.php index e4f9aa5c0d6..30d67896224 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Taxes/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Taxes/Query.php @@ -47,5 +47,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_taxes_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/DataStore.php index ec2dac18a78..f87bc6664db 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/DataStore.php @@ -294,5 +294,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { protected function get_cache_key( $params ) { return 'woocommerce_' . self::TABLE_NAME . '_stats_' . md5( wp_json_encode( $params ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/Query.php b/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/Query.php index 0f3326e2a26..828d44fb7a9 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Taxes/Stats/Query.php @@ -48,5 +48,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_taxes_stats_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Variations/DataStore.php b/plugins/woocommerce-admin/src/API/Reports/Variations/DataStore.php index 1291783f074..c0d4fea666d 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Variations/DataStore.php +++ b/plugins/woocommerce-admin/src/API/Reports/Variations/DataStore.php @@ -364,5 +364,4 @@ class DataStore extends ReportsDataStore implements DataStoreInterface { protected function get_cache_key( $params ) { return 'woocommerce_' . self::TABLE_NAME . '_' . md5( wp_json_encode( $params ) ); } - } diff --git a/plugins/woocommerce-admin/src/API/Reports/Variations/Query.php b/plugins/woocommerce-admin/src/API/Reports/Variations/Query.php index ec09977ca3c..f5788a1e4d9 100644 --- a/plugins/woocommerce-admin/src/API/Reports/Variations/Query.php +++ b/plugins/woocommerce-admin/src/API/Reports/Variations/Query.php @@ -48,5 +48,4 @@ class Query extends ReportsQuery { $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_variations_select_query', $results, $args ); } - } diff --git a/plugins/woocommerce-admin/src/API/SettingOptions.php b/plugins/woocommerce-admin/src/API/SettingOptions.php index 64567cbc492..2c22786b20a 100644 --- a/plugins/woocommerce-admin/src/API/SettingOptions.php +++ b/plugins/woocommerce-admin/src/API/SettingOptions.php @@ -25,5 +25,4 @@ class SettingOptions extends \WC_REST_Setting_Options_Controller { * @var string */ protected $namespace = 'wc/v4'; - } diff --git a/plugins/woocommerce-admin/src/Notes/DataStore.php b/plugins/woocommerce-admin/src/Notes/DataStore.php index f62a0a0c42e..d7c68023ceb 100644 --- a/plugins/woocommerce-admin/src/Notes/DataStore.php +++ b/plugins/woocommerce-admin/src/Notes/DataStore.php @@ -389,5 +389,4 @@ class DataStore extends \WC_Data_Store_WP implements \WC_Object_Data_Store_Inter ) ); } - } diff --git a/plugins/woocommerce-admin/src/Notes/NoteTraits.php b/plugins/woocommerce-admin/src/Notes/NoteTraits.php index 4e63bfe75c6..c9c41e45ced 100644 --- a/plugins/woocommerce-admin/src/Notes/NoteTraits.php +++ b/plugins/woocommerce-admin/src/Notes/NoteTraits.php @@ -15,22 +15,22 @@ defined( 'ABSPATH' ) || exit; * NoteTraits class. */ trait NoteTraits { - /** - * Test how long WooCommerce Admin has been active. - * - * @param int $seconds Time in seconds to check. - * @return bool Whether or not WooCommerce admin has been active for $seconds. - */ - public static function wc_admin_active_for( $seconds ) { - // Getting install timestamp reference class-wc-admin-install.php. + /** + * Test how long WooCommerce Admin has been active. + * + * @param int $seconds Time in seconds to check. + * @return bool Whether or not WooCommerce admin has been active for $seconds. + */ + public static function wc_admin_active_for( $seconds ) { + // Getting install timestamp reference class-wc-admin-install.php. $wc_admin_installed = get_option( 'wc_admin_install_timestamp', false ); - if ( false === $wc_admin_installed ) { - update_option( 'wc_admin_install_timestamp', time() ); - - return false; + if ( false === $wc_admin_installed ) { + update_option( 'wc_admin_install_timestamp', time() ); + + return false; } - return ( ( time() - $wc_admin_installed ) >= $seconds ); - } + return ( ( time() - $wc_admin_installed ) >= $seconds ); + } }