PSR-4ify the reports data store interface class.
This commit is contained in:
parent
b7912bc579
commit
3e9ef793a7
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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.
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue