Remove useless constructors

This commit is contained in:
Tautvidas Sipavičius
2016-06-29 20:42:03 +03:00
parent c62cd6c023
commit 168540d6d2
13 changed files with 9 additions and 57 deletions

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class NewsletterLink extends Model {
public static $_table = MP_NEWSLETTER_LINKS_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class NewsletterOption extends Model {
public static $_table = MP_NEWSLETTER_OPTION_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class NewsletterPost extends Model {
public static $_table = MP_NEWSLETTER_POSTS_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class NewsletterSegment extends Model {
public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -10,10 +10,6 @@ class SendingQueue extends Model {
const STATUS_SCHEDULED = 'scheduled';
const STATUS_PAUSED = 'paused';
function __construct() {
parent::__construct();
}
function pause() {
if($this->count_processed === $this->count_total) {
return false;

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class StatisticsClicks extends Model {
public static $_table = MP_STATISTICS_CLICKS_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -6,10 +6,6 @@ if(!defined('ABSPATH')) exit;
class StatisticsForms extends Model {
public static $_table = MP_STATISTICS_FORMS_TABLE;
function __construct() {
parent::__construct();
}
public static function record($form_id, $subscriber_id) {
if($form_id > 0 && $subscriber_id > 0) {
// check if we already have a record for today

View File

@ -6,10 +6,6 @@ if(!defined('ABSPATH')) exit;
class StatisticsNewsletters extends Model {
public static $_table = MP_STATISTICS_NEWSLETTERS_TABLE;
function __construct() {
parent::__construct();
}
static function createMultiple(array $data) {
$values = array();
foreach($data as $value) {

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class StatisticsOpens extends Model {
public static $_table = MP_STATISTICS_OPENS_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -5,8 +5,4 @@ if(!defined('ABSPATH')) exit;
class StatisticsUnsubscribes extends Model {
public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
function __construct() {
parent::__construct();
}
}

View File

@ -8,10 +8,6 @@ if(!defined('ABSPATH')) exit;
class SubscriberCustomField extends Model {
public static $_table = MP_SUBSCRIBER_CUSTOM_FIELD_TABLE;
function __construct() {
parent::__construct();
}
static function createOrUpdate($data = array()) {
$custom_field = CustomField::findOne($data['custom_field_id']);
if($custom_field === false) {

View File

@ -8,10 +8,6 @@ if(!defined('ABSPATH')) exit;
class SubscriberSegment extends Model {
public static $_table = MP_SUBSCRIBER_SEGMENT_TABLE;
function __construct() {
parent::__construct();
}
function subscriber() {
return $this->has_one(__NAMESPACE__.'\Subscriber', 'id', 'subscriber_id');
}