Skip to content

Commit 75f412f

Browse files
committed
DEFAULT_METHODS
1 parent 9dd95c9 commit 75f412f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/SS14/Endpoints/OAuth2Endpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function get(
7575
string &$body
7676
): void
7777
{
78-
if (! $request instanceof ServerRequestInterface) {
78+
if (!$request instanceof ServerRequestInterface) {
7979
$response = Response::STATUS_METHOD_NOT_ALLOWED;
8080
$headers = ['Content-Type' => 'text/plain'];
8181
$body = 'Method Not Allowed';

src/VerifierServer/Server.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ protected function route(
249249
}
250250

251251
$allowed_methods = (isset($this->endpoints[$uri]) && ($endpoint = $this->endpoints[$uri]) instanceof EndpointInterface)
252-
? array_merge($endpoint->getAllowedMethods(), HttpMethodsTrait::DEFAULT_METHODS)
253-
: HttpMethodsTrait::DEFAULT_METHODS;
252+
? array_merge($endpoint->getAllowedMethods(), self::DEFAULT_METHODS)
253+
: self::DEFAULT_METHODS;
254254

255255
if ($method == 'OPTIONS') {
256256
$this->options(
@@ -303,17 +303,17 @@ public function handleEndpoint(
303303
*
304304
* @return ResponseInterface The generated HTTP response.
305305
*/
306-
private function handleReact(ServerRequestInterface $client): ResponseInterface
306+
private function handleReact(ServerRequestInterface $request): ResponseInterface
307307
{
308-
$method = $client->getMethod();
309-
$uri = $client->getUri()->getPath();
308+
$method = $request->getMethod();
309+
$uri = $request->getUri()->getPath();
310310

311311
// Defaults
312312
$response = Response::STATUS_NOT_FOUND;
313313
$headers = ['Content-Type' => 'text/plain'];
314314
$body = "Not Found";
315315

316-
$this->route($uri, $method, $client, $response, $headers, $body);
316+
$this->route($uri, $method, $request, $response, $headers, $body);
317317

318318
return new Response(
319319
$response,

0 commit comments

Comments
 (0)