Skip to content

Commit

Permalink
Update src from PHP Codesniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Feb 6, 2024
1 parent 6a6d513 commit 6eed159
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Service/NotificationsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,19 @@ private function handleEmail(): ?array
$allowEmpty = false;
if (str_ends_with($condition, '||empty') === true) {
$allowEmpty = true;
$condition = substr($condition,0, -7);
$condition = substr($condition, 0, -7);
}

if ($allowEmpty === true && ($objectDot->has($key) === false || empty($objectDot->get($key)) === true)) {
continue;
}

if ($objectDot->has($key) === false || $objectDot->get($key) != $condition) {
$this->logger->info("Action configuration emailConfig objectConditions are not met for: $key, we don't need to send an email.", ['plugin' => 'common-gateway/customer-notifications-bundle', 'condition' => $condition]);
return null;
}
}
}
}//end if

// Throw email event
return $this->throwEvent($emailConfig, ($object ?? null));
Expand Down Expand Up @@ -325,19 +325,19 @@ private function handleSMS(): ?array
$allowEmpty = false;
if (str_ends_with($condition, '||empty') === true) {
$allowEmpty = true;
$condition = substr($condition,0, -7);
$condition = substr($condition, 0, -7);
}

if ($allowEmpty === true && ($objectDot->has($key) === false || empty($objectDot->get($key)) === true)) {
continue;
}

if ($objectDot->has($key) === false || $objectDot->get($key) != $condition) {
$this->logger->info("Action configuration smsConfig objectConditions are not met for: $key, we don't need to send an SMS.", ['plugin' => 'common-gateway/customer-notifications-bundle', 'condition' => $condition]);
return null;
}
}
}
}//end if

// Throw SMS event
return $this->throwEvent($smsConfig, ($object ?? null));
Expand Down

0 comments on commit 6eed159

Please sign in to comment.