PSR-4ify the reports data store interface class.

This commit is contained in:
Jeff Stieler 2019-08-06 11:39:28 -06:00
parent b7912bc579
commit 3e9ef793a7
16 changed files with 62 additions and 17 deletions

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Categories;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Categories_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Coupons;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Coupons_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -8,12 +8,13 @@
namespace Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore as CouponsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Reports_Coupons_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\Coupons\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends CouponsDataStore implements DataStoreInterface {
/**
* Mapping columns to data type to return correct response types.
*

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Customers;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Customers_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Customers\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore as CustomersDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Customers_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\Customers\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends CustomersDataStore implements DataStoreInterface {
/**
* Mapping columns to data type to return correct response types.
*

View File

@ -5,6 +5,8 @@
* @package WooCommerce Admin/Interface
*/
namespace Automattic\WooCommerce\Admin\API\Reports;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@ -14,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
*
* @since 3.5.0
*/
interface WC_Admin_Reports_Data_Store_Interface {
interface DataStoreInterface {
/**
* Get the data based on args.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Downloads;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Downloads_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Downloads\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore as DownloadsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Downloads_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\Downloads\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends DownloadsDataStore implements DataStoreInterface {
/**
* Mapping columns to data type to return correct response types.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Orders;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Orders_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Orders\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Orders_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Products;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Products_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Products\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\Products\DataStore as ProductsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Reports_Products_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\Products\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ProductsDataStore implements DataStoreInterface {
/**
* Mapping columns to data type to return correct response types.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Stock\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Reports_Stock_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Get stock counts for the whole store.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Taxes;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Taxes_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Reports_Taxes_Stats_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.

View File

@ -9,10 +9,13 @@ namespace Automattic\WooCommerce\Admin\API\Reports\Variations;
defined( 'ABSPATH' ) || exit;
use \Automattic\WooCommerce\Admin\API\Reports\DataStore as ReportsDataStore;
use \Automattic\WooCommerce\Admin\API\Reports\DataStoreInterface;
/**
* WC_Admin_Reports_Products_Data_Store.
*/
class DataStore extends \Automattic\WooCommerce\Admin\API\Reports\DataStore implements \WC_Admin_Reports_Data_Store_Interface {
class DataStore extends ReportsDataStore implements DataStoreInterface {
/**
* Table used to get the data.