Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@@ -58,7 +58,7 @@ class EmailAction implements Filter {
|
||||
$this->action = $action;
|
||||
}
|
||||
|
||||
function toSql(ORM $orm) {
|
||||
public function toSql(ORM $orm) {
|
||||
if (($this->action === EmailAction::ACTION_CLICKED) || ($this->action === EmailAction::ACTION_NOT_CLICKED)) {
|
||||
$table = StatisticsClicks::$_table;
|
||||
} else {
|
||||
@@ -98,7 +98,7 @@ class EmailAction implements Filter {
|
||||
return $clause;
|
||||
}
|
||||
|
||||
function toArray() {
|
||||
public function toArray() {
|
||||
return [
|
||||
'action' => $this->action,
|
||||
'newsletter_id' => $this->newsletter_id,
|
||||
|
@@ -6,8 +6,8 @@ use MailPoetVendor\Idiorm\ORM;
|
||||
|
||||
interface Filter {
|
||||
|
||||
function toSql(ORM $orm);
|
||||
public function toSql(ORM $orm);
|
||||
|
||||
function toArray();
|
||||
public function toArray();
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ class UserRole implements Filter {
|
||||
$this->connect = $connect;
|
||||
}
|
||||
|
||||
function toSql(ORM $orm) {
|
||||
public function toSql(ORM $orm) {
|
||||
global $wpdb;
|
||||
$orm->join($wpdb->users, ['wpusers.id', '=', MP_SUBSCRIBERS_TABLE . '.wp_user_id'], 'wpusers')
|
||||
->join($wpdb->usermeta, ['wpusers.ID', '=', 'wpusermeta.user_id'], 'wpusermeta')
|
||||
@@ -40,7 +40,7 @@ class UserRole implements Filter {
|
||||
];
|
||||
}
|
||||
|
||||
function getRole() {
|
||||
public function getRole() {
|
||||
return $this->role;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class WooCommerceCategory implements Filter {
|
||||
$this->connect = $connect;
|
||||
}
|
||||
|
||||
function toSql(ORM $orm) {
|
||||
public function toSql(ORM $orm) {
|
||||
global $wpdb;
|
||||
$orm->distinct();
|
||||
$orm->rawJoin(
|
||||
@@ -45,8 +45,8 @@ class WooCommerceCategory implements Filter {
|
||||
$orm->rawJoin(
|
||||
'INNER JOIN ' . $wpdb->term_taxonomy,
|
||||
'
|
||||
term_taxonomy.term_taxonomy_id=term_relationships.term_taxonomy_id
|
||||
AND
|
||||
term_taxonomy.term_taxonomy_id=term_relationships.term_taxonomy_id
|
||||
AND
|
||||
term_taxonomy.term_id IN (' . join(',', $this->getAllCategoryIds()) . ')',
|
||||
'term_taxonomy'
|
||||
);
|
||||
@@ -64,7 +64,7 @@ class WooCommerceCategory implements Filter {
|
||||
return $ids;
|
||||
}
|
||||
|
||||
function toArray() {
|
||||
public function toArray() {
|
||||
return [
|
||||
'action' => WooCommerceCategory::ACTION_CATEGORY,
|
||||
'category_id' => $this->category_id,
|
||||
|
@@ -26,7 +26,7 @@ class WooCommerceProduct implements Filter {
|
||||
$this->connect = $connect;
|
||||
}
|
||||
|
||||
function toSql(ORM $orm) {
|
||||
public function toSql(ORM $orm) {
|
||||
global $wpdb;
|
||||
$orm->distinct();
|
||||
$orm->rawJoin(
|
||||
@@ -37,8 +37,8 @@ class WooCommerceProduct implements Filter {
|
||||
$orm->join($wpdb->prefix . 'woocommerce_order_items', ['postmeta.post_id', '=', 'items.order_id'], 'items');
|
||||
$orm->rawJoin(
|
||||
'INNER JOIN ' . $wpdb->prefix . 'woocommerce_order_itemmeta',
|
||||
"itemmeta.order_item_id=items.order_item_id
|
||||
AND itemmeta.meta_key='_product_id'
|
||||
"itemmeta.order_item_id=items.order_item_id
|
||||
AND itemmeta.meta_key='_product_id'
|
||||
AND itemmeta.meta_value=" . $this->product_id,
|
||||
'itemmeta'
|
||||
);
|
||||
@@ -46,7 +46,7 @@ class WooCommerceProduct implements Filter {
|
||||
return $orm;
|
||||
}
|
||||
|
||||
function toArray() {
|
||||
public function toArray() {
|
||||
return [
|
||||
'action' => WooCommerceProduct::ACTION_PRODUCT,
|
||||
'product_id' => $this->product_id,
|
||||
|
Reference in New Issue
Block a user