From 75d80d8b6e6168b9832398740aba902af0f10391 Mon Sep 17 00:00:00 2001 From: Benjamin Blake Date: Sun, 1 Mar 2020 16:39:22 -0700 Subject: [PATCH] PushEvent - Fixed a "Too few arguments" error + Fixed a "Too few arguments" error that was produced by code in the `fromJson()` method --- src/PushEvent.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PushEvent.php b/src/PushEvent.php index 25be356..92694be 100644 --- a/src/PushEvent.php +++ b/src/PushEvent.php @@ -101,7 +101,10 @@ class PushEvent extends AbstractApiModel { * @return static The instance corresponding to the specified JSON map. */ static function fromJson(object &$client, ?object $caller, object $map): self { - return (new static) + return (new static( + $client, + $caller + )) ->setAfter(isset($map->after) && is_string($map->after) ? $map->after : '') ->setBefore(isset($map->before) && is_string($map->before) ? $map->before : '') ->setCompareUrl(isset($map->compare_url) && is_string($map->compare_url) ? new Uri($map->compare_url) : null)