From 6e205bea959e8f8d75f54d5ef2a5c08c23d53241 Mon Sep 17 00:00:00 2001 From: arneee <1255879+arneee@users.noreply.github.com> Date: Tue, 22 Aug 2023 21:22:07 +0200 Subject: [PATCH] Code style --- src/WebHook/NotificationFactory.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/WebHook/NotificationFactory.php b/src/WebHook/NotificationFactory.php index 359281e..6a1886b 100644 --- a/src/WebHook/NotificationFactory.php +++ b/src/WebHook/NotificationFactory.php @@ -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] ?? [];