Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
arneee authored and aalbarca committed Nov 19, 2023
1 parent 8ec015e commit 6e205be
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/WebHook/NotificationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ public function buildAllFromPayload(array $payload): array

$notifications = [];

foreach($payload['entry'] as $entry) {

if(!is_array($entry['changes'])) {
foreach ($payload['entry'] as $entry) {
if (!is_array($entry['changes'])) {
continue;
}

foreach($entry['changes'] as $change) {

foreach ($entry['changes'] as $change) {
$message = $change['value']['messages'][0] ?? [];
$status = $change['value']['statuses'][0] ?? [];
$contact = $change['value']['contacts'][0] ?? [];
Expand Down

0 comments on commit 6e205be

Please sign in to comment.