Skip to content

Commit 5f13655

Browse files
committed
update php samples
1 parent 7070255 commit 5f13655

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/server/petstore/php-flight/RegisterRoutes.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static public function registerRoutes(\OpenAPIServer\Api\AbstractPetApi|\OpenAPI
4747
\Flight::route('DELETE /pet/@petId', function (string $petId) use ($handler) {
4848
$r = \Flight::request();
4949
$handler->deletePet(
50-
parseParam($petId, 'int'),
50+
parseParam($petId, 'int'),
5151
parseParam($r->getHeader('api_key'), '?string')
5252
);
5353
\Flight::halt(204);
@@ -313,7 +313,7 @@ static public function registerRoutes(\OpenAPIServer\Api\AbstractPetApi|\OpenAPI
313313
\Flight::route('GET /user/login', function () use ($handler) {
314314
$r = \Flight::request();
315315
$result = $handler->loginUser(
316-
parseParam($r->query['username'] ?? null, 'string'),
316+
parseParam($r->query['username'] ?? null, 'string'),
317317
parseParam($r->query['password'] ?? null, 'string')
318318
);
319319
if ($result === null) {
@@ -343,7 +343,7 @@ static public function registerRoutes(\OpenAPIServer\Api\AbstractPetApi|\OpenAPI
343343
\Flight::route('PUT /user/@username', function (string $username) use ($handler) {
344344
$r = \Flight::request();
345345
$handler->updateUser(
346-
parseParam($username, 'string'),
346+
parseParam($username, 'string'),
347347
parseParam(json_decode($r->getBody(), true), '\\OpenAPIServer\\Model\\User')
348348
);
349349
\Flight::halt(204);

0 commit comments

Comments
 (0)