Add public keyword to methods

[MAILPOET-2413]
This commit is contained in:
Amine Ben hammou
2019-12-26 12:56:49 +01:00
committed by wxa
parent ec409042d5
commit 43df66d162
823 changed files with 4440 additions and 4440 deletions

View File

@@ -15,13 +15,13 @@ class AutomatedLatestContent {
/** @var LoggerFactory */
private $logger_factory;
function __construct($newsletter_id = false, $newer_than_timestamp = false) {
public function __construct($newsletter_id = false, $newer_than_timestamp = false) {
$this->newsletter_id = $newsletter_id;
$this->newer_than_timestamp = $newer_than_timestamp;
$this->logger_factory = LoggerFactory::getInstance();
}
function filterOutSentPosts($where) {
public function filterOutSentPosts($where) {
$sentPostsQuery = 'SELECT ' . MP_NEWSLETTER_POSTS_TABLE . '.post_id FROM '
. MP_NEWSLETTER_POSTS_TABLE . ' WHERE '
. MP_NEWSLETTER_POSTS_TABLE . ".newsletter_id='" . $this->newsletter_id . "'";
@@ -41,7 +41,7 @@ class AutomatedLatestContent {
$query->is_home = false;
}
function getPosts($args, $posts_to_exclude = []) {
public function getPosts($args, $posts_to_exclude = []) {
// Get posts as logged out user, so private posts hidden by other plugins (e.g. UAM) are also excluded
$current_user_id = WPFunctions::get()->getCurrentUserId();
WPFunctions::get()->wpSetCurrentUser(0);
@@ -108,12 +108,12 @@ class AutomatedLatestContent {
return $posts;
}
function transformPosts($args, $posts) {
public function transformPosts($args, $posts) {
$transformer = new Transformer($args);
return $transformer->transform($posts);
}
function constructTaxonomiesQuery($args) {
public function constructTaxonomiesQuery($args) {
$taxonomies_query = [];
if (isset($args['terms']) && is_array($args['terms'])) {
$taxonomies = [];