Skip to content

Commit 89e236f

Browse files
authored
feature #1544 [make:webhook] phpstan types and single quotes
1 parent 08772de commit 89e236f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Maker/MakeWebhook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ private function getRequestMatcherArguments(string $requestMatcherClass): string
300300
IsJsonRequestMatcher::class => '',
301301
MethodRequestMatcher::class => '\'POST\'',
302302
PortRequestMatcher::class => '443',
303-
SchemeRequestMatcher::class => 'https',
303+
SchemeRequestMatcher::class => '\'https\'',
304304
default => '[]',
305305
};
306306
}

src/Resources/skeleton/webhook/RequestParser.tpl.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ protected function doParse(Request $request, #[\SensitiveParameter] string $secr
4141
}
4242

4343
// Parse the request payload and return a RemoteEvent object.
44-
$payload = $request->getPayload()->all();
44+
$payload = $request->getPayload();
4545

4646
return new RemoteEvent(
47-
$payload['name'],
48-
$payload['id'],
49-
$payload,
47+
$payload->getString('name'),
48+
$payload->getString('id'),
49+
$payload->all(),
5050
);
5151
}
5252
}

0 commit comments

Comments
 (0)