Convert variable names to camel case in PHPDoc
[MAILPOET-1796]
This commit is contained in:
@ -7,7 +7,7 @@ use MailPoet\Entities\CustomFieldEntity;
|
||||
class CustomFieldsResponseBuilder {
|
||||
|
||||
/**
|
||||
* @param CustomFieldEntity[] $custom_fields
|
||||
* @param CustomFieldEntity[] $customFields
|
||||
* @return array
|
||||
*/
|
||||
public function buildBatch(array $customFields) {
|
||||
@ -15,7 +15,7 @@ class CustomFieldsResponseBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CustomFieldEntity $custom_field
|
||||
* @param CustomFieldEntity $customField
|
||||
* @return array
|
||||
*/
|
||||
public function build(CustomFieldEntity $customField) {
|
||||
|
@ -379,7 +379,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a segment
|
||||
*
|
||||
* @param array $list_data List data
|
||||
* @param array $listData List data
|
||||
* @return Segment
|
||||
*/
|
||||
private function importSegment($listData) {
|
||||
@ -453,7 +453,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a custom field
|
||||
*
|
||||
* @param array $custom_field MP2 custom field
|
||||
* @param array $customField MP2 custom field
|
||||
* @return CustomField
|
||||
*/
|
||||
private function importCustomField($customField) {
|
||||
@ -471,7 +471,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Map the MailPoet 2 custom field type with the MailPoet custom field type
|
||||
*
|
||||
* @param string $mp2_type MP2 custom field type
|
||||
* @param string $mp2Type MP2 custom field type
|
||||
* @return string MP3 custom field type
|
||||
*/
|
||||
private function mapCustomFieldType($mp2Type) {
|
||||
@ -536,7 +536,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Map the validate value
|
||||
*
|
||||
* @param string $mp2_value MP2 value
|
||||
* @param string $mp2Value MP2 value
|
||||
* @return string MP3 value
|
||||
*/
|
||||
private function mapCustomFieldValidateValue($mp2Value) {
|
||||
@ -616,7 +616,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a subscriber
|
||||
*
|
||||
* @param array $user_data User data
|
||||
* @param array $userData User data
|
||||
* @return Subscriber
|
||||
*/
|
||||
private function importSubscriber($userData) {
|
||||
@ -649,7 +649,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Map the MailPoet 2 user status with MailPoet 3
|
||||
*
|
||||
* @param int $mp2_user_status MP2 user status
|
||||
* @param int $mp2UserStatus MP2 user status
|
||||
* @return string MP3 user status
|
||||
*/
|
||||
private function mapUserStatus($mp2UserStatus) {
|
||||
@ -678,7 +678,7 @@ class MP2Migrator {
|
||||
* Import the segments for a subscriber
|
||||
*
|
||||
* @param Subscriber $subscriber MP3 subscriber
|
||||
* @param int $user_id MP2 user ID
|
||||
* @param int $userId MP2 user ID
|
||||
*/
|
||||
private function importSubscriberSegments($subscriber, $userId) {
|
||||
$userLists = $this->getUserLists($userId);
|
||||
@ -691,7 +691,7 @@ class MP2Migrator {
|
||||
* Get the lists for a user
|
||||
*
|
||||
* @global object $wpdb
|
||||
* @param int $user_id User ID
|
||||
* @param int $userId User ID
|
||||
* @return array Users Lists
|
||||
*/
|
||||
private function getUserLists($userId) {
|
||||
@ -711,8 +711,8 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a subscriber segment
|
||||
*
|
||||
* @param int $subscriber_id
|
||||
* @param array $user_list
|
||||
* @param int $subscriberId
|
||||
* @param array $userList
|
||||
* @return SubscriberSegment|null
|
||||
*/
|
||||
private function importSubscriberSegment($subscriberId, $userList) {
|
||||
@ -769,9 +769,9 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a subscriber custom field
|
||||
*
|
||||
* @param int $subscriber_id Subscriber ID
|
||||
* @param array $custom_field Custom field
|
||||
* @param string $custom_field_value Custom field value
|
||||
* @param int $subscriberId Subscriber ID
|
||||
* @param array $customField Custom field
|
||||
* @param string $customFieldValue Custom field value
|
||||
* @return SubscriberCustomField
|
||||
*/
|
||||
private function importSubscriberCustomField($subscriberId, $customField, $customFieldValue) {
|
||||
@ -864,7 +864,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Import a form
|
||||
*
|
||||
* @param array $form_data Form data
|
||||
* @param array $formData Form data
|
||||
* @return Form
|
||||
*/
|
||||
private function importForm($formData) {
|
||||
@ -928,7 +928,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Get the MP3 segments IDs of the MP2 lists IDs
|
||||
*
|
||||
* @param array $mp2_list_ids
|
||||
* @param array $mp2ListIds
|
||||
*/
|
||||
private function getMappedSegmentIds($mp2ListIds) {
|
||||
$mp3SegmentIds = [];
|
||||
@ -1105,7 +1105,7 @@ class MP2Migrator {
|
||||
* Get an email
|
||||
*
|
||||
* @global object $wpdb
|
||||
* @param int $email_id
|
||||
* @param int $emailId
|
||||
* @return array Email
|
||||
*/
|
||||
private function getEmail($emailId) {
|
||||
@ -1126,7 +1126,7 @@ class MP2Migrator {
|
||||
/**
|
||||
* Map the Email frequency interval
|
||||
*
|
||||
* @param string $interval_str Interval
|
||||
* @param string $intervalStr Interval
|
||||
* @return string Interval
|
||||
*/
|
||||
private function mapFrequencyInterval($intervalStr) {
|
||||
@ -1156,8 +1156,8 @@ class MP2Migrator {
|
||||
/**
|
||||
* Map the Email frequency number
|
||||
*
|
||||
* @param int $emails_number Emails number
|
||||
* @param string $interval_str Interval
|
||||
* @param int $emailsNumber Emails number
|
||||
* @param string $intervalStr Interval
|
||||
* @return int Emails number
|
||||
*/
|
||||
private function mapFrequencyEmails($emailsNumber, $intervalStr) {
|
||||
|
@ -125,7 +125,7 @@ class DaemonHttpRunner {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $settings_daemon_data
|
||||
* @param array|null $settingsDaemonData
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
|
@ -11,7 +11,7 @@ class NewsletterLinkRepository extends Repository {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $newsletter_id
|
||||
* @param int $newsletterId
|
||||
* @return NewsletterLinkEntity|null
|
||||
*/
|
||||
public function findTopLinkForNewsletter($newsletterId) {
|
||||
|
@ -14,7 +14,7 @@ class StatsNotificationsRepository extends Repository {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $newsletter_id
|
||||
* @param int $newsletterId
|
||||
* @return StatsNotificationEntity|null
|
||||
*/
|
||||
public function findOneByNewsletterId($newsletterId) {
|
||||
|
@ -6,9 +6,9 @@ use MailPoet\Doctrine\Repository;
|
||||
use MailPoet\Entities\CustomFieldEntity;
|
||||
|
||||
/**
|
||||
* @method CustomFieldEntity[] findBy(array $criteria, array $order_by = null, int $limit = null, int $offset = null)
|
||||
* @method CustomFieldEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method CustomFieldEntity[] findAll()
|
||||
* @method CustomFieldEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method CustomFieldEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method CustomFieldEntity|null findOneById(mixed $id)
|
||||
* @method void persist(CustomFieldEntity $entity)
|
||||
* @method void remove(CustomFieldEntity $entity)
|
||||
|
@ -17,7 +17,7 @@ trait DeletedAtTrait {
|
||||
return $this->deletedAt;
|
||||
}
|
||||
|
||||
/** @param DateTimeInterface|null $deleted_at */
|
||||
/** @param DateTimeInterface|null $deletedAt */
|
||||
public function setDeletedAt($deletedAt) {
|
||||
$this->deletedAt = $deletedAt;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ abstract class Repository {
|
||||
|
||||
/**
|
||||
* @param array $criteria
|
||||
* @param array|null $order_by
|
||||
* @param array|null $orderBy
|
||||
* @param int|null $limit
|
||||
* @param int|null $offset
|
||||
* @return array
|
||||
@ -36,7 +36,7 @@ abstract class Repository {
|
||||
|
||||
/**
|
||||
* @param array $criteria
|
||||
* @param array|null $order_by
|
||||
* @param array|null $orderBy
|
||||
* @return object|null
|
||||
*/
|
||||
public function findOneBy(array $criteria, array $orderBy = null) {
|
||||
|
@ -37,8 +37,8 @@ class EmailAction implements Filter {
|
||||
private $connect;
|
||||
|
||||
/**
|
||||
* @param int $newsletter_id
|
||||
* @param int $link_id
|
||||
* @param int $newsletterId
|
||||
* @param int $linkId
|
||||
* @param string $action
|
||||
* @param string $connect
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ class WooCommerceCategory implements Filter {
|
||||
private $connect;
|
||||
|
||||
/**
|
||||
* @param int $category_id
|
||||
* @param int $categoryId
|
||||
* @param string $connect
|
||||
*/
|
||||
public function __construct($categoryId, $connect = null) {
|
||||
|
@ -18,7 +18,7 @@ class WooCommerceProduct implements Filter {
|
||||
private $connect;
|
||||
|
||||
/**
|
||||
* @param int $product_id
|
||||
* @param int $productId
|
||||
* @param string $connect
|
||||
*/
|
||||
public function __construct($productId, $connect = null) {
|
||||
|
@ -19,7 +19,7 @@ class AddToNewslettersSegments {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $initial_segments
|
||||
* @param array $initialSegments
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ class AddToSubscribersFilters {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $segment_filters
|
||||
* @param array $segmentFilters
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ class SendingNewslettersSubscribersFinder {
|
||||
|
||||
/**
|
||||
* @param Segment $segment
|
||||
* @param int[] $subscribers_to_process_ids
|
||||
* @param int[] $subscribersToProcessIds
|
||||
*
|
||||
* @return Subscriber[]
|
||||
*/
|
||||
|
@ -14,8 +14,8 @@ use MailPoet\Models\DynamicSegmentFilter;
|
||||
class DBMapper {
|
||||
|
||||
/**
|
||||
* @param DynamicSegment $segment_data
|
||||
* @param DynamicSegmentFilter[] $filters_data
|
||||
* @param DynamicSegment $segmentData
|
||||
* @param DynamicSegmentFilter[] $filtersData
|
||||
*
|
||||
* @return DynamicSegment
|
||||
*/
|
||||
@ -26,8 +26,8 @@ class DBMapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DynamicSegment[] $segments_data
|
||||
* @param DynamicSegmentFilter[] $filters_data
|
||||
* @param DynamicSegment[] $segmentsData
|
||||
* @param DynamicSegmentFilter[] $filtersData
|
||||
*
|
||||
* @return DynamicSegment[]
|
||||
*/
|
||||
|
@ -15,7 +15,7 @@ class SingleSegmentLoader {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|int $segment_id
|
||||
* @param string|int $segmentId
|
||||
* @return DynamicSegment
|
||||
*/
|
||||
public function load($segmentId) {
|
||||
|
@ -20,7 +20,7 @@ class SubscribersCount {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DynamicSegment $dynamic_segment
|
||||
* @param DynamicSegment $dynamicSegment
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
|
@ -22,8 +22,8 @@ class SubscribersIds {
|
||||
/**
|
||||
* Finds subscribers in a dynamic segment and returns their ids.
|
||||
*
|
||||
* @param DynamicSegment $dynamic_segment
|
||||
* @param array $limit_to_subscribers_ids If passed the result will be limited only to ids within this array
|
||||
* @param DynamicSegment $dynamicSegment
|
||||
* @param array $limitToSubscribersIds If passed the result will be limited only to ids within this array
|
||||
*
|
||||
* @return Subscriber[]
|
||||
*/
|
||||
|
@ -199,7 +199,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sender_address
|
||||
* @param string $senderAddress
|
||||
*/
|
||||
public function setSenderAddress($senderAddress) {
|
||||
$this->senderAddress = $senderAddress;
|
||||
@ -213,7 +213,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sender_name
|
||||
* @param string $senderName
|
||||
*/
|
||||
public function setSenderName($senderName) {
|
||||
$this->senderName = $senderName;
|
||||
@ -241,7 +241,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reply_to_address
|
||||
* @param string $replyToAddress
|
||||
*/
|
||||
public function setReplyToAddress($replyToAddress) {
|
||||
$this->replyToAddress = $replyToAddress;
|
||||
@ -255,7 +255,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $reply_to_name
|
||||
* @param string $replyToName
|
||||
*/
|
||||
public function setReplyToName($replyToName) {
|
||||
$this->replyToName = $replyToName;
|
||||
@ -297,7 +297,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface|null $sent_at
|
||||
* @param DateTimeInterface|null $sentAt
|
||||
*/
|
||||
public function setSentAt($sentAt) {
|
||||
$this->sentAt = $sentAt;
|
||||
@ -318,7 +318,7 @@ class NewsletterEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $ga_campaign
|
||||
* @param string $gaCampaign
|
||||
*/
|
||||
public function setGaCampaign($gaCampaign) {
|
||||
$this->gaCampaign = $gaCampaign;
|
||||
@ -326,7 +326,7 @@ class NewsletterEntity {
|
||||
|
||||
|
||||
/**
|
||||
* @param string|null $unsubscribe_token
|
||||
* @param string|null $unsubscribeToken
|
||||
*/
|
||||
public function setUnsubscribeToken($unsubscribeToken) {
|
||||
$this->unsubscribeToken = $unsubscribeToken;
|
||||
|
@ -70,7 +70,7 @@ class NewsletterOptionEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param NewsletterOptionFieldEntity $option_field
|
||||
* @param NewsletterOptionFieldEntity $optionField
|
||||
*/
|
||||
public function setOptionField($optionField) {
|
||||
$this->optionField = $optionField;
|
||||
|
@ -53,7 +53,7 @@ class NewsletterOptionFieldEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $newsletter_type
|
||||
* @param string $newsletterType
|
||||
*/
|
||||
public function setNewsletterType($newsletterType) {
|
||||
$this->newsletterType = $newsletterType;
|
||||
|
@ -113,7 +113,7 @@ class ScheduledTaskEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface|null $scheduled_at
|
||||
* @param DateTimeInterface|null $scheduledAt
|
||||
*/
|
||||
public function setScheduledAt($scheduledAt) {
|
||||
$this->scheduledAt = $scheduledAt;
|
||||
@ -127,7 +127,7 @@ class ScheduledTaskEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface|null $processed_at
|
||||
* @param DateTimeInterface|null $processedAt
|
||||
*/
|
||||
public function setProcessedAt($processedAt) {
|
||||
$this->processedAt = $processedAt;
|
||||
|
@ -89,7 +89,7 @@ class SendingQueueEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $newsletter_rendered_body
|
||||
* @param array|null $newsletterRenderedBody
|
||||
*/
|
||||
public function setNewsletterRenderedBody($newsletterRenderedBody) {
|
||||
$this->newsletterRenderedBody = $newsletterRenderedBody;
|
||||
@ -103,7 +103,7 @@ class SendingQueueEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $newsletter_rendered_subject
|
||||
* @param string|null $newsletterRenderedSubject
|
||||
*/
|
||||
public function setNewsletterRenderedSubject($newsletterRenderedSubject) {
|
||||
$this->newsletterRenderedSubject = $newsletterRenderedSubject;
|
||||
@ -131,7 +131,7 @@ class SendingQueueEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $count_total
|
||||
* @param int $countTotal
|
||||
*/
|
||||
public function setCountTotal($countTotal) {
|
||||
$this->countTotal = $countTotal;
|
||||
@ -145,7 +145,7 @@ class SendingQueueEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $count_processed
|
||||
* @param int $countProcessed
|
||||
*/
|
||||
public function setCountProcessed($countProcessed) {
|
||||
$this->countProcessed = $countProcessed;
|
||||
@ -159,7 +159,7 @@ class SendingQueueEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $count_to_process
|
||||
* @param int $countToProcess
|
||||
*/
|
||||
public function setCountToProcess($countToProcess) {
|
||||
$this->countToProcess = $countToProcess;
|
||||
|
@ -124,7 +124,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|null $wp_user_id
|
||||
* @param int|null $wpUserId
|
||||
*/
|
||||
public function setWpUserId($wpUserId) {
|
||||
$this->wpUserId = $wpUserId;
|
||||
@ -138,7 +138,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $is_woocommerce_user
|
||||
* @param bool $isWoocommerceUser
|
||||
*/
|
||||
public function setIsWoocommerceUser($isWoocommerceUser) {
|
||||
$this->isWoocommerceUser = $isWoocommerceUser;
|
||||
@ -152,7 +152,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $first_name
|
||||
* @param string $firstName
|
||||
*/
|
||||
public function setFirstName($firstName) {
|
||||
$this->firstName = $firstName;
|
||||
@ -166,7 +166,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $last_name
|
||||
* @param string $lastName
|
||||
*/
|
||||
public function setLastName($lastName) {
|
||||
$this->lastName = $lastName;
|
||||
@ -217,7 +217,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subscribed_ip
|
||||
* @param string $subscribedIp
|
||||
*/
|
||||
public function setSubscribedIp($subscribedIp) {
|
||||
$this->subscribedIp = $subscribedIp;
|
||||
@ -231,7 +231,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $confirmed_ip
|
||||
* @param string|null $confirmedIp
|
||||
*/
|
||||
public function setConfirmedIp($confirmedIp) {
|
||||
$this->confirmedIp = $confirmedIp;
|
||||
@ -245,7 +245,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface|null $confirmed_at
|
||||
* @param DateTimeInterface|null $confirmedAt
|
||||
*/
|
||||
public function setConfirmedAt($confirmedAt) {
|
||||
$this->confirmedAt = $confirmedAt;
|
||||
@ -259,7 +259,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DateTimeInterface|null $last_subscribed_at
|
||||
* @param DateTimeInterface|null $lastSubscribedAt
|
||||
*/
|
||||
public function setLastSubscribedAt($lastSubscribedAt) {
|
||||
$this->lastSubscribedAt = $lastSubscribedAt;
|
||||
@ -273,7 +273,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $unconfirmed_data
|
||||
* @param string|null $unconfirmedData
|
||||
*/
|
||||
public function setUnconfirmedData($unconfirmedData) {
|
||||
$this->unconfirmedData = $unconfirmedData;
|
||||
@ -313,7 +313,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $count_confirmations
|
||||
* @param int $countConfirmations
|
||||
*/
|
||||
public function setConfirmationsCount($countConfirmations) {
|
||||
$this->countConfirmations = $countConfirmations;
|
||||
@ -327,7 +327,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $unsubscribe_token
|
||||
* @param string|null $unsubscribeToken
|
||||
*/
|
||||
public function setUnsubscribeToken($unsubscribeToken) {
|
||||
$this->unsubscribeToken = $unsubscribeToken;
|
||||
@ -341,7 +341,7 @@ class SubscriberEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $link_token
|
||||
* @param string|null $linkToken
|
||||
*/
|
||||
public function setLinkToken($linkToken) {
|
||||
$this->linkToken = $linkToken;
|
||||
|
@ -39,7 +39,7 @@ class UserFlagEntity {
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
/** @param int $user_id */
|
||||
/** @param int $userId */
|
||||
public function setUserId($userId) {
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ use MailPoet\Entities\FeatureFlagEntity;
|
||||
|
||||
/**
|
||||
* @method FeatureFlagEntity[] findAll()
|
||||
* @method FeatureFlagEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method FeatureFlagEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method void persist(FeatureFlagEntity $entity)
|
||||
* @method void remove(FeatureFlagEntity $entity)
|
||||
*/
|
||||
|
@ -85,7 +85,7 @@ EOL;
|
||||
private $featuresController;
|
||||
|
||||
/**
|
||||
* @param FeaturesController $features_controller
|
||||
* @param FeaturesController $featuresController
|
||||
*/
|
||||
public function __construct(
|
||||
FeaturesController $featuresController = null
|
||||
|
@ -42,7 +42,7 @@ class LoggerFactory {
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param bool $attach_processors
|
||||
* @param bool $attachProcessors
|
||||
*
|
||||
* @return \MailPoetVendor\Monolog\Logger
|
||||
*/
|
||||
|
@ -33,8 +33,8 @@ class MailerError {
|
||||
* @param string $operation
|
||||
* @param string $level
|
||||
* @param null|string $message
|
||||
* @param int|null $retry_interval
|
||||
* @param array $subscribers_errors
|
||||
* @param int|null $retryInterval
|
||||
* @param array $subscribersErrors
|
||||
*/
|
||||
public function __construct($operation, $level, $message = null, $retryInterval = null, array $subscribersErrors = []) {
|
||||
$this->operation = $operation;
|
||||
|
@ -81,8 +81,8 @@ class MailerLog {
|
||||
* Process error, doesn't increase retry_attempt so it will not block sending
|
||||
*
|
||||
* @param string $operation
|
||||
* @param string $error_message
|
||||
* @param int $retry_interval
|
||||
* @param string $errorMessage
|
||||
* @param int $retryInterval
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@ -98,9 +98,9 @@ class MailerLog {
|
||||
* Process error, increase retry_attempt and block sending if it goes above RETRY_INTERVAL
|
||||
*
|
||||
* @param string $operation
|
||||
* @param string $error_message
|
||||
* @param string $error_code
|
||||
* @param bool $pause_sending
|
||||
* @param string $errorMessage
|
||||
* @param string $errorCode
|
||||
* @param bool $pauseSending
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
@ -10,8 +10,8 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
* @property string $createdAt
|
||||
* @property string $updatedAt
|
||||
*/
|
||||
class DynamicSegment extends MailPoetSegment {
|
||||
|
||||
|
@ -6,8 +6,8 @@ use MailPoet\Models\Model;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property array|string|null $filter_data
|
||||
* @property string $segment_id
|
||||
* @property array|string|null $filterData
|
||||
* @property string $segmentId
|
||||
*/
|
||||
class DynamicSegmentFilter extends Model {
|
||||
|
||||
|
@ -122,8 +122,8 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
* @method static static distinct()
|
||||
* @method $this set(string|array $key, string|null $value = null)
|
||||
*
|
||||
* @property string|null $created_at
|
||||
* @property string|null $updated_at
|
||||
* @property string|null $createdAt
|
||||
* @property string|null $updatedAt
|
||||
* @property string|null $id
|
||||
* @property string|null $first
|
||||
* @property string|null $last
|
||||
|
@ -20,20 +20,20 @@ use function MailPoetVendor\array_column;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $parent_id
|
||||
* @property int $parentId
|
||||
* @property string $type
|
||||
* @property object|array|boolean $queue
|
||||
* @property string $hash
|
||||
* @property string $sender_address
|
||||
* @property string $senderAddress
|
||||
* @property string $status
|
||||
* @property string|object $meta
|
||||
* @property array $options
|
||||
* @property int $children_count
|
||||
* @property int $childrenCount
|
||||
* @property bool|array $statistics
|
||||
* @property string $sent_at
|
||||
* @property string $deleted_at
|
||||
* @property int $total_sent
|
||||
* @property int $total_scheduled
|
||||
* @property string $sentAt
|
||||
* @property string $deletedAt
|
||||
* @property int $totalSent
|
||||
* @property int $totalScheduled
|
||||
* @property array $segments
|
||||
* @property string $subject
|
||||
* @property string $preheader
|
||||
@ -41,7 +41,7 @@ use function MailPoetVendor\array_column;
|
||||
* @property string|null $schedule
|
||||
* @property boolean|null $isScheduled
|
||||
* @property string|null $scheduledAt
|
||||
* @property string $ga_campaign
|
||||
* @property string $gaCampaign
|
||||
*/
|
||||
|
||||
class Newsletter extends Model {
|
||||
|
@ -3,8 +3,8 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $queue_id
|
||||
* @property int $newsletterId
|
||||
* @property int $queueId
|
||||
* @property string $url
|
||||
* @property string $hash
|
||||
* @property int|null $clicksCount
|
||||
|
@ -3,10 +3,10 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $option_field_id
|
||||
* @property int $newsletterId
|
||||
* @property int $optionFieldId
|
||||
* @property string $value
|
||||
* @property string $updated_at
|
||||
* @property string $updatedAt
|
||||
*/
|
||||
class NewsletterOption extends Model {
|
||||
public static $_table = MP_NEWSLETTER_OPTION_TABLE;
|
||||
|
@ -6,7 +6,7 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
* @property string $newsletter_type
|
||||
* @property string $newsletterType
|
||||
*/
|
||||
|
||||
class NewsletterOptionField extends Model {
|
||||
|
@ -3,9 +3,9 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $post_id
|
||||
* @property string $updated_at
|
||||
* @property int $newsletterId
|
||||
* @property int $postId
|
||||
* @property string $updatedAt
|
||||
*/
|
||||
class NewsletterPost extends Model {
|
||||
public static $_table = MP_NEWSLETTER_POSTS_TABLE;
|
||||
|
@ -3,9 +3,9 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $segment_id
|
||||
* @property string $updated_at
|
||||
* @property int $newsletterId
|
||||
* @property int $segmentId
|
||||
* @property string $updatedAt
|
||||
*/
|
||||
class NewsletterSegment extends Model {
|
||||
public static $_table = MP_NEWSLETTER_SEGMENT_TABLE;
|
||||
|
@ -6,7 +6,7 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property string $name
|
||||
* @property int|null $newsletter_id
|
||||
* @property int|null $newsletterId
|
||||
* @property string $categories
|
||||
* @property string $description
|
||||
* @property string|null $body
|
||||
|
@ -10,13 +10,13 @@ use MailPoetVendor\Idiorm\ORM;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $processed_at
|
||||
* @property string $processedAt
|
||||
* @property string|null $status
|
||||
* @property string|null $type
|
||||
* @property int $priority
|
||||
* @property string|null $scheduled_at
|
||||
* @property boolean|null $in_progress
|
||||
* @property int $reschedule_count
|
||||
* @property string|null $scheduledAt
|
||||
* @property boolean|null $inProgress
|
||||
* @property int $rescheduleCount
|
||||
* @property string|array|null $meta
|
||||
*/
|
||||
class ScheduledTask extends Model {
|
||||
|
@ -5,8 +5,8 @@ namespace MailPoet\Models;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property int $task_id
|
||||
* @property int $subscriber_id
|
||||
* @property int $taskId
|
||||
* @property int $subscriberId
|
||||
* @property int $processed
|
||||
* @property int $failed
|
||||
* @property string $error
|
||||
|
@ -8,8 +8,8 @@ use MailPoet\WooCommerce\Helper as WCHelper;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property array $subscribers_count
|
||||
* @property array $automated_emails_subjects
|
||||
* @property array $subscribersCount
|
||||
* @property array $automatedEmailsSubjects
|
||||
* @property string $name
|
||||
* @property string $type
|
||||
* @property string $description
|
||||
|
@ -8,17 +8,17 @@ use MailPoet\Util\Helpers;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
* @property int $count_processed
|
||||
* @property int $count_to_process
|
||||
* @property int $count_total
|
||||
* @property string|array $newsletter_rendered_body
|
||||
* @property string $newsletter_rendered_subject
|
||||
* @property int $task_id
|
||||
* @property int $newsletter_id
|
||||
* @property int $countProcessed
|
||||
* @property int $countToProcess
|
||||
* @property int $countTotal
|
||||
* @property string|array $newsletterRenderedBody
|
||||
* @property string $newsletterRenderedSubject
|
||||
* @property int $taskId
|
||||
* @property int $newsletterId
|
||||
* @property string|object|null $meta
|
||||
* @property string|array $subscribers
|
||||
* @property string|null $deleted_at
|
||||
* @property string $scheduled_at
|
||||
* @property string|null $deletedAt
|
||||
* @property string $scheduledAt
|
||||
* @property string $status
|
||||
*/
|
||||
|
||||
|
@ -5,10 +5,10 @@ namespace MailPoet\Models;
|
||||
use DateTimeInterface;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $subscriber_id
|
||||
* @property int $queue_id
|
||||
* @property int $link_id
|
||||
* @property int $newsletterId
|
||||
* @property int $subscriberId
|
||||
* @property int $queueId
|
||||
* @property int $linkId
|
||||
* @property int $count
|
||||
*/
|
||||
class StatisticsClicks extends Model {
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property string|null $sent_at
|
||||
* @property string|null $sentAt
|
||||
*/
|
||||
class StatisticsNewsletters extends Model {
|
||||
public static $_table = MP_STATISTICS_NEWSLETTERS_TABLE;
|
||||
|
@ -3,9 +3,9 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $subscriber_id
|
||||
* @property int $queue_id
|
||||
* @property int $newsletterId
|
||||
* @property int $subscriberId
|
||||
* @property int $queueId
|
||||
*/
|
||||
class StatisticsOpens extends Model {
|
||||
public static $_table = MP_STATISTICS_OPENS_TABLE;
|
||||
|
@ -3,9 +3,9 @@
|
||||
namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $subscriber_id
|
||||
* @property int $queue_id
|
||||
* @property int $newsletterId
|
||||
* @property int $subscriberId
|
||||
* @property int $queueId
|
||||
*/
|
||||
class StatisticsUnsubscribes extends Model {
|
||||
public static $_table = MP_STATISTICS_UNSUBSCRIBES_TABLE;
|
||||
|
@ -5,13 +5,13 @@ namespace MailPoet\Models;
|
||||
use WC_Order;
|
||||
|
||||
/**
|
||||
* @property int $newsletter_id
|
||||
* @property int $subscriber_id
|
||||
* @property int $queue_id
|
||||
* @property int $click_id
|
||||
* @property int $order_id
|
||||
* @property string $order_currency
|
||||
* @property float $order_price_total
|
||||
* @property int $newsletterId
|
||||
* @property int $subscriberId
|
||||
* @property int $queueId
|
||||
* @property int $clickId
|
||||
* @property int $orderId
|
||||
* @property string $orderCurrency
|
||||
* @property float $orderPriceTotal
|
||||
*/
|
||||
class StatisticsWooCommercePurchases extends Model {
|
||||
public static $_table = MP_STATISTICS_WOOCOMMERCE_PURCHASES_TABLE;
|
||||
|
@ -13,22 +13,22 @@ use function MailPoetVendor\array_column;
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $email
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $firstName
|
||||
* @property string $lastName
|
||||
* @property string $status
|
||||
* @property string|null $subscribed_ip
|
||||
* @property string|null $confirmed_ip
|
||||
* @property string|null $confirmed_at
|
||||
* @property string|null $last_subscribed_at
|
||||
* @property string|null $deleted_at
|
||||
* @property string|null $subscribedIp
|
||||
* @property string|null $confirmedIp
|
||||
* @property string|null $confirmedAt
|
||||
* @property string|null $lastSubscribedAt
|
||||
* @property string|null $deletedAt
|
||||
* @property string|null $source
|
||||
* @property string|null $link_token
|
||||
* @property int $count_confirmations
|
||||
* @property int $wp_user_id
|
||||
* @property string|null $linkToken
|
||||
* @property int $countConfirmations
|
||||
* @property int $wpUserId
|
||||
* @property array $segments
|
||||
* @property array $subscriptions
|
||||
* @property string $unconfirmed_data
|
||||
* @property int $is_woocommerce_user
|
||||
* @property string $unconfirmedData
|
||||
* @property int $isWoocommerceUser
|
||||
*/
|
||||
|
||||
class Subscriber extends Model {
|
||||
@ -346,7 +346,7 @@ class Subscriber extends Model {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $customer_email
|
||||
* @param string $customerEmail
|
||||
* @return bool|Subscriber
|
||||
*/
|
||||
public static function getWooCommerceSegmentSubscriber($customerEmail) {
|
||||
|
@ -7,8 +7,8 @@ use MailPoet\Util\Helpers;
|
||||
use function MailPoetVendor\array_column;
|
||||
|
||||
/**
|
||||
* @property int $subscriber_id
|
||||
* @property int $custom_field_id
|
||||
* @property int $subscriberId
|
||||
* @property int $customFieldId
|
||||
* @property string $value
|
||||
*/
|
||||
class SubscriberCustomField extends Model {
|
||||
|
@ -4,8 +4,8 @@ namespace MailPoet\Models;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $subscriber_id
|
||||
* @property int $segment_id
|
||||
* @property int $subscriberId
|
||||
* @property int $segmentId
|
||||
* @property string $status
|
||||
*/
|
||||
|
||||
|
@ -6,8 +6,8 @@ use MailPoet\Doctrine\Repository;
|
||||
use MailPoet\Entities\NewsletterEntity;
|
||||
|
||||
/**
|
||||
* @method NewsletterEntity[] findBy(array $criteria, array $order_by = null, int $limit = null, int $offset = null)
|
||||
* @method NewsletterEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method NewsletterEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method NewsletterEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method NewsletterEntity|null findOneById(mixed $id)
|
||||
* @method void persist(NewsletterEntity $entity)
|
||||
* @method void remove(NewsletterEntity $entity)
|
||||
|
@ -162,7 +162,7 @@ class Renderer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DomNode $template_dom
|
||||
* @param DomNode $templateDom
|
||||
* @return string
|
||||
*/
|
||||
private function postProcessTemplate(DomNode $templateDom) {
|
||||
|
@ -8,8 +8,8 @@ use MailPoet\WP\Functions as WPFunctions;
|
||||
use MailPoetVendor\Carbon\Carbon;
|
||||
|
||||
/**
|
||||
* @method SettingEntity[] findBy(array $criteria, array $order_by = null, int $limit = null, int $offset = null)
|
||||
* @method SettingEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method SettingEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method SettingEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method SettingEntity|null findOneById(mixed $id)
|
||||
* @method SettingEntity[] findAll()
|
||||
* @method void persist(SettingEntity $entity)
|
||||
|
@ -6,8 +6,8 @@ use MailPoet\Doctrine\Repository;
|
||||
use MailPoet\Entities\UserFlagEntity;
|
||||
|
||||
/**
|
||||
* @method UserFlagEntity[] findBy(array $criteria, array $order_by = null, int $limit = null, int $offset = null)
|
||||
* @method UserFlagEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method UserFlagEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method UserFlagEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method UserFlagEntity|null findOneById(mixed $id)
|
||||
* @method void persist(UserFlagEntity $entity)
|
||||
* @method void remove(UserFlagEntity $entity)
|
||||
|
@ -24,8 +24,8 @@ class InactiveSubscribersController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $days_to_inactive
|
||||
* @param int $batch_size
|
||||
* @param int $daysToInactive
|
||||
* @param int $batchSize
|
||||
* @return int|boolean
|
||||
*/
|
||||
public function markInactiveSubscribers($daysToInactive, $batchSize, $startId = null) {
|
||||
@ -34,8 +34,8 @@ class InactiveSubscribersController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $days_to_inactive
|
||||
* @param int $batch_size
|
||||
* @param int $daysToInactive
|
||||
* @param int $batchSize
|
||||
* @return int
|
||||
*/
|
||||
public function markActiveSubscribers($daysToInactive, $batchSize) {
|
||||
@ -55,7 +55,7 @@ class InactiveSubscribersController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $days_to_inactive
|
||||
* @param int $daysToInactive
|
||||
* @return Carbon
|
||||
*/
|
||||
private function getThresholdDate($daysToInactive) {
|
||||
@ -64,8 +64,8 @@ class InactiveSubscribersController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $threshold_date
|
||||
* @param int $batch_size
|
||||
* @param Carbon $thresholdDate
|
||||
* @param int $batchSize
|
||||
* @return int|boolean
|
||||
*/
|
||||
private function deactivateSubscribers(Carbon $thresholdDate, $batchSize, $startId = null) {
|
||||
@ -149,8 +149,8 @@ class InactiveSubscribersController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $threshold_date
|
||||
* @param int $batch_size
|
||||
* @param Carbon $thresholdDate
|
||||
* @param int $batchSize
|
||||
* @return int
|
||||
*/
|
||||
private function activateSubscribers(Carbon $thresholdDate, $batchSize) {
|
||||
|
@ -6,8 +6,8 @@ use MailPoet\Doctrine\Repository;
|
||||
use MailPoet\Entities\SubscriberEntity;
|
||||
|
||||
/**
|
||||
* @method SubscriberEntity[] findBy(array $criteria, array $order_by = null, int $limit = null, int $offset = null)
|
||||
* @method SubscriberEntity|null findOneBy(array $criteria, array $order_by = null)
|
||||
* @method SubscriberEntity[] findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null)
|
||||
* @method SubscriberEntity|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method SubscriberEntity|null findOneById(mixed $id)
|
||||
* @method void persist(SubscriberEntity $entity)
|
||||
* @method void remove(SubscriberEntity $entity)
|
||||
|
@ -13,12 +13,12 @@ use function MailPoetVendor\array_column;
|
||||
/**
|
||||
* A facade class containing all necessary models to work with a sending queue
|
||||
* @property string|null $status
|
||||
* @property int $task_id
|
||||
* @property int $taskId
|
||||
* @property int $id
|
||||
* @property int $newsletter_id
|
||||
* @property string $newsletter_rendered_subject
|
||||
* @property string|array $newsletter_rendered_body
|
||||
* @property bool $non_existent_column
|
||||
* @property int $newsletterId
|
||||
* @property string $newsletterRenderedSubject
|
||||
* @property string|array $newsletterRenderedBody
|
||||
* @property bool $nonExistentColumn
|
||||
*/
|
||||
class Sending {
|
||||
const TASK_TYPE = 'sending';
|
||||
|
@ -42,9 +42,9 @@ class Functions {
|
||||
|
||||
/**
|
||||
* @param string $tag
|
||||
* @param callable $function_to_add
|
||||
* @param callable $functionToAdd
|
||||
* @param int $priority
|
||||
* @param int $accepted_args
|
||||
* @param int $acceptedArgs
|
||||
* @return boolean
|
||||
*/
|
||||
public function addAction($tag, $functionToAdd, $priority = 10, $acceptedArgs = 1) {
|
||||
@ -260,14 +260,14 @@ class Functions {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|false $user_id
|
||||
* @param int|false $userId
|
||||
*/
|
||||
public function getTheAuthorMeta($field = '', $userId = false) {
|
||||
return get_the_author_meta($field, $userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int|\WP_User $user_id
|
||||
* @param int|\WP_User $userId
|
||||
*/
|
||||
public function getUserLocale($userId = 0) {
|
||||
return get_user_locale($userId);
|
||||
@ -327,7 +327,7 @@ class Functions {
|
||||
|
||||
/**
|
||||
* @param string|false $deprecated
|
||||
* @param string|false $plugin_rel_path
|
||||
* @param string|false $pluginRelPath
|
||||
*/
|
||||
public function loadPluginTextdomain($domain, $deprecated = false, $pluginRelPath = false) {
|
||||
return load_plugin_textdomain($domain, $deprecated, $pluginRelPath);
|
||||
@ -363,7 +363,7 @@ class Functions {
|
||||
|
||||
/**
|
||||
* @param string $tag
|
||||
* @param callable $function_to_remove
|
||||
* @param callable $functionToRemove
|
||||
* @param int $priority
|
||||
*/
|
||||
public function removeAction($tag, $functionToRemove, $priority = 10) {
|
||||
|
@ -73,7 +73,7 @@ class Newsletter {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $created_at in format Y-m-d H:i:s
|
||||
* @param string $createdAt in format Y-m-d H:i:s
|
||||
* @return Newsletter
|
||||
*/
|
||||
public function withCreatedAt($createdAt) {
|
||||
|
@ -28,7 +28,7 @@ class NewsletterLink {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $created_at in format Y-m-d H:i:s
|
||||
* @param string $createdAt in format Y-m-d H:i:s
|
||||
* @return NewsletterLink
|
||||
*/
|
||||
public function withCreatedAt($createdAt) {
|
||||
|
@ -21,7 +21,7 @@ class Subscriber {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $first_name
|
||||
* @param string $firstName
|
||||
* @return $this
|
||||
*/
|
||||
public function withFirstName($firstName) {
|
||||
@ -30,7 +30,7 @@ class Subscriber {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $last_name
|
||||
* @param string $lastName
|
||||
* @return $this
|
||||
*/
|
||||
public function withLastName($lastName) {
|
||||
|
@ -47,7 +47,7 @@ class WooCommerceOrder {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $customer_data Customer created via WooCommerceCustomer factory
|
||||
* @param array $customerData Customer created via WooCommerceCustomer factory
|
||||
* @return $this
|
||||
*/
|
||||
public function withCustomer($customerData) {
|
||||
|
@ -100,7 +100,7 @@ class RevenueTrackingCookieCest {
|
||||
* Checks that email was received by looking for a subject in inbox.
|
||||
* In case it was not found reloads the inbox and check once more.
|
||||
* Emails are sent via cron and might not be sent immediately.
|
||||
* @param \AcceptanceTester $I
|
||||
* @param \AcceptanceTester $i
|
||||
* @param string $subject
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
@ -87,7 +87,7 @@ class WooCommerceListImportPageCest {
|
||||
/**
|
||||
* Test that admin is always redirected to WooCommerce list import page and
|
||||
* can't go to another page unless he submits the form
|
||||
* @param \AcceptanceTester $I
|
||||
* @param \AcceptanceTester $i
|
||||
*/
|
||||
public function importListPageRedirectionTest(\AcceptanceTester $i) {
|
||||
$this->settings->withWooCommerceListImportPageDisplayed(false);
|
||||
|
@ -391,10 +391,10 @@ class NewslettersTest extends \MailPoetTest {
|
||||
],
|
||||
];
|
||||
$newsletter = $this->endpoint->save($newsletterData);
|
||||
/** @var SendingQueue $sending_queue_1 */
|
||||
/** @var SendingQueue $sendingQueue1 */
|
||||
$sendingQueue1 = SendingQueue::findOne($sendingQueue1->id);
|
||||
$sendingQueue1 = SendingTask::createFromQueue($sendingQueue1);
|
||||
/** @var SendingQueue $sending_queue_2 */
|
||||
/** @var SendingQueue $sendingQueue2 */
|
||||
$sendingQueue2 = SendingQueue::findOne($sendingQueue2->id);
|
||||
$sendingQueue2 = SendingTask::createFromQueue($sendingQueue2);
|
||||
expect($sendingQueue1->scheduledAt)->notEquals($currentTime);
|
||||
|
@ -261,7 +261,7 @@ class SchedulerTest extends \MailPoetTest {
|
||||
], $this);
|
||||
expect($queue->status)->notNull();
|
||||
expect($scheduler->processWelcomeNewsletter($newsletter, $queue))->true();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->null();
|
||||
@ -280,7 +280,7 @@ class SchedulerTest extends \MailPoetTest {
|
||||
expect($queue->status)->notNull();
|
||||
expect($scheduler->processWelcomeNewsletter($newsletter, $queue))->true();
|
||||
// update queue's status to null
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->null();
|
||||
@ -338,7 +338,7 @@ class SchedulerTest extends \MailPoetTest {
|
||||
$result = $scheduler->verifyMailpoetSubscriber($subscriber->id, $newsletter, $queue);
|
||||
expect($result)->false();
|
||||
// update the time queue is scheduled to run at
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect(Carbon::parse($updatedQueue->scheduledAt))->equals(
|
||||
@ -413,7 +413,7 @@ class SchedulerTest extends \MailPoetTest {
|
||||
// return true
|
||||
expect($scheduler->processScheduledStandardNewsletter($newsletter, $queue))->true();
|
||||
// update queue's list of subscribers to process
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
$updatedQueueSubscribers = $updatedQueue->getSubscribers(ScheduledTaskSubscriber::STATUS_UNPROCESSED);
|
||||
@ -480,7 +480,7 @@ class SchedulerTest extends \MailPoetTest {
|
||||
expect($notificationHistory)->notEmpty();
|
||||
// update queue with a list of subscribers to process and change newsletter id
|
||||
// to that of the notification history
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
$updatedQueueSubscribers = $updatedQueue->getSubscribers(ScheduledTaskSubscriber::STATUS_UNPROCESSED);
|
||||
|
@ -357,7 +357,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
expect($updatedNewsletter->status)->equals(Newsletter::STATUS_SENT);
|
||||
|
||||
// queue status is set to completed
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->equals(SendingQueue::STATUS_COMPLETED);
|
||||
@ -409,7 +409,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
expect($updatedNewsletter->status)->equals(Newsletter::STATUS_SENT);
|
||||
|
||||
// queue status is set to completed
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->equals(SendingQueue::STATUS_COMPLETED);
|
||||
@ -454,7 +454,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$sendingQueueWorker->process();
|
||||
|
||||
// queue status is set to completed
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->equals(SendingQueue::STATUS_COMPLETED);
|
||||
@ -535,7 +535,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
expect($updatedNewsletter->status)->equals(Newsletter::STATUS_SENT);
|
||||
|
||||
// queue status is set to completed
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect($updatedQueue->status)->equals(SendingQueue::STATUS_COMPLETED);
|
||||
@ -580,7 +580,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$sendingQueueWorker->process();
|
||||
|
||||
// queue status is set to completed
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
|
||||
@ -611,7 +611,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
);
|
||||
$sendingQueueWorker->process();
|
||||
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
// queue subscriber processed/to process count is updated
|
||||
@ -643,7 +643,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
);
|
||||
$sendingQueueWorker->process();
|
||||
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
// queue subscriber processed/to process count is updated
|
||||
@ -665,7 +665,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
|
||||
// newsletter is sent to existing subscriber
|
||||
$sendingQueueWorker->process();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect((int)$updatedQueue->countTotal)->equals(1);
|
||||
@ -677,7 +677,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$subscriber->deletedAt = Carbon::now();
|
||||
$subscriber->save();
|
||||
$sendingQueueWorker->process();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect((int)$updatedQueue->countTotal)->equals(0);
|
||||
@ -695,7 +695,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$subscriber->status = Subscriber::STATUS_UNSUBSCRIBED;
|
||||
$subscriber->save();
|
||||
$sendingQueueWorker->process();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect((int)$updatedQueue->countTotal)->equals(0);
|
||||
@ -713,7 +713,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$subscriberSegment->status = Subscriber::STATUS_UNSUBSCRIBED;
|
||||
$subscriberSegment->save();
|
||||
$sendingQueueWorker->process();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect((int)$updatedQueue->countTotal)->equals(0);
|
||||
@ -731,7 +731,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$subscriber->status = Subscriber::STATUS_INACTIVE;
|
||||
$subscriber->save();
|
||||
$sendingQueueWorker->process();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
expect((int)$updatedQueue->countTotal)->equals(0);
|
||||
|
@ -159,7 +159,7 @@ class NewsletterTest extends \MailPoetTest {
|
||||
$newsletterTask->preProcessNewsletter($this->newsletter, $this->queue);
|
||||
$link = NewsletterLink::where('newsletter_id', $this->newsletter->id)
|
||||
->findOne();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
$renderedNewsletter = $updatedQueue->getNewsletterRenderedBody();
|
||||
@ -184,7 +184,7 @@ class NewsletterTest extends \MailPoetTest {
|
||||
$link = NewsletterLink::where('newsletter_id', $this->newsletter->id)
|
||||
->findOne();
|
||||
expect($link)->false();
|
||||
/** @var SendingQueue $updated_queue */
|
||||
/** @var SendingQueue $updatedQueue */
|
||||
$updatedQueue = SendingQueue::findOne($this->queue->id);
|
||||
$updatedQueue = SendingTask::createFromQueue($updatedQueue);
|
||||
$renderedNewsletter = $updatedQueue->getNewsletterRenderedBody();
|
||||
|
@ -55,7 +55,7 @@ class SimpleWorkerTest extends \MailPoetTest {
|
||||
|
||||
public function testItCalculatesNextRunDateWithinNextWeekBoundaries() {
|
||||
$currentDate = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
|
||||
/** @var Carbon $next_run_date */
|
||||
/** @var Carbon $nextRunDate */
|
||||
$nextRunDate = (new MockSimpleWorker())->getNextRunDate();
|
||||
$difference = $nextRunDate->diffInDays($currentDate);
|
||||
// Subtract days left in the current week
|
||||
|
@ -44,7 +44,7 @@ class JsonEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $json_data
|
||||
* @param array|null $jsonData
|
||||
*/
|
||||
public function setJsonData($jsonData) {
|
||||
$this->jsonData = $jsonData;
|
||||
@ -58,7 +58,7 @@ class JsonEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $json_or_serialized_data
|
||||
* @param array|null $jsonOrSerializedData
|
||||
*/
|
||||
public function setJsonOrSerializedData($jsonOrSerializedData) {
|
||||
$this->jsonOrSerializedData = $jsonOrSerializedData;
|
||||
|
@ -39,7 +39,7 @@ class AddToNewslettersSegmentsTest extends \MailPoetTest {
|
||||
return [$dynamicSegment];
|
||||
})]);
|
||||
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribers_count_loader */
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribersCountLoader */
|
||||
$subscribersCountLoader = Stub::makeEmpty('\MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount', ['getSubscribersCount']);
|
||||
$subscribersCountLoader
|
||||
->expects($this->once())
|
||||
|
@ -38,7 +38,7 @@ class AddToSubscribersFiltersTest extends \MailPoetTest {
|
||||
return [$dynamicSegment];
|
||||
})]);
|
||||
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribers_count_loader */
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribersCountLoader */
|
||||
$subscribersCountLoader = Stub::makeEmpty('\MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount', ['getSubscribersCount']);
|
||||
$subscribersCountLoader
|
||||
->expects($this->once())
|
||||
@ -79,7 +79,7 @@ class AddToSubscribersFiltersTest extends \MailPoetTest {
|
||||
]
|
||||
);
|
||||
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribers_count_loader */
|
||||
/** @var \MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount|MockObject $subscribersCountLoader */
|
||||
$subscribersCountLoader = Stub::makeEmpty('\MailPoet\DynamicSegments\Persistence\Loading\SubscribersCount', ['getSubscribersCount']);
|
||||
$subscribersCountLoader
|
||||
->expects($this->exactly(2))
|
||||
|
@ -125,7 +125,7 @@ class ScheduledTaskTest extends \MailPoetTest {
|
||||
|
||||
$task = ScheduledTask::findOne($task->id);
|
||||
|
||||
/** @var string $task_meta */
|
||||
/** @var string $taskMeta */
|
||||
$taskMeta = $task->meta;
|
||||
expect(Helpers::isJson($taskMeta))->true();
|
||||
expect(json_decode($taskMeta, true))->equals($meta);
|
||||
|
@ -239,7 +239,7 @@ class InactiveSubscribersControllerTest extends \MailPoetTest {
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
* @param int $created_days_ago
|
||||
* @param int $createdDaysAgo
|
||||
* @param string $status
|
||||
* @return Subscriber
|
||||
*/
|
||||
@ -253,7 +253,7 @@ class InactiveSubscribersControllerTest extends \MailPoetTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $processed_days_ago
|
||||
* @param int $processedDaysAgo
|
||||
* @return array
|
||||
*/
|
||||
private function createCompletedSendingTask($processedDaysAgo = 0) {
|
||||
@ -268,7 +268,7 @@ class InactiveSubscribersControllerTest extends \MailPoetTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $processed_days_ago
|
||||
* @param int $processedDaysAgo
|
||||
* @return array
|
||||
*/
|
||||
private function createCompletedSendingTaskWithOneOpen($processedDaysAgo = 0) {
|
||||
@ -282,7 +282,7 @@ class InactiveSubscribersControllerTest extends \MailPoetTest {
|
||||
/**
|
||||
* @param Subscriber $subscriber
|
||||
* @param ScheduledTask $task
|
||||
* @param int $days_ago
|
||||
* @param int $daysAgo
|
||||
*/
|
||||
private function addSubcriberToTask(Subscriber $subscriber, ScheduledTask $task, $daysAgo = 0) {
|
||||
$createdAt = (new Carbon())->subDays($daysAgo)->toDateTimeString();
|
||||
|
Reference in New Issue
Block a user