Fix code style by updated ruleset

[MAILPOET-3912]
This commit is contained in:
Jan Lysý
2021-12-20 15:13:17 +01:00
committed by Veljko V
parent c0302d8284
commit 09c2ce653c
55 changed files with 201 additions and 133 deletions

View File

@@ -257,13 +257,15 @@ class SubscriberEntity {
* @param string $status
*/
public function setStatus($status) {
if (!in_array($status, [
self::STATUS_BOUNCED,
self::STATUS_INACTIVE,
self::STATUS_SUBSCRIBED,
self::STATUS_UNCONFIRMED,
self::STATUS_UNSUBSCRIBED,
])) {
if (
!in_array($status, [
self::STATUS_BOUNCED,
self::STATUS_INACTIVE,
self::STATUS_SUBSCRIBED,
self::STATUS_UNCONFIRMED,
self::STATUS_UNSUBSCRIBED,
])
) {
throw new \InvalidArgumentException("Invalid status '{$status}' given to subscriber!");
}
$this->status = $status;
@@ -350,16 +352,18 @@ class SubscriberEntity {
* @param string $source
*/
public function setSource($source) {
if (!in_array($source, [
'api',
'form',
'unknown',
'imported',
'administrator',
'wordpress_user',
'woocommerce_user',
'woocommerce_checkout',
])) {
if (
!in_array($source, [
'api',
'form',
'unknown',
'imported',
'administrator',
'wordpress_user',
'woocommerce_user',
'woocommerce_checkout',
])
) {
throw new \InvalidArgumentException("Invalid source '{$source}' given to subscriber!");
}
$this->source = $source;