From 9aed5e12340ad57f5dafb873e81a04bcaebd2d2f Mon Sep 17 00:00:00 2001 From: Nyholm Date: Thu, 4 Mar 2021 20:41:48 +0100 Subject: [PATCH] Dont break BC --- src/Model/Webhook/ShowResponse.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Model/Webhook/ShowResponse.php b/src/Model/Webhook/ShowResponse.php index bf68bbf..7521ce2 100644 --- a/src/Model/Webhook/ShowResponse.php +++ b/src/Model/Webhook/ShowResponse.php @@ -33,8 +33,17 @@ final class ShowResponse implements ApiResponse return $model; } - public function getWebhookUrls(): ?array + public function getWebhookUrl(): ?string { - return $this->webhook['urls'] ?? null; + foreach ($this->getWebhookUrls() as $url) { + return $url; + } + + return null; + } + + public function getWebhookUrls(): array + { + return $this->webhook['urls'] ?? []; } }