Skip to content

Commit 4c67031

Browse files
committed
Run php-cs-fixer
1 parent 161375f commit 4c67031

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/Swagger/Serializer/DocumentationNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ private function addRequestBody(bool $v3, \ArrayObject $pathOperation, \ArrayObj
557557
private function isBodyParameterAlreadyExists(array $parameters): bool
558558
{
559559
foreach ($parameters as $parameter) {
560-
if (array_key_exists('in', $parameter) && $parameter['in'] === 'body') {
560+
if (\array_key_exists('in', $parameter) && 'body' === $parameter['in']) {
561561
return true;
562562
}
563563
}

tests/Swagger/Serializer/DocumentationNormalizerV2Test.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -828,18 +828,18 @@ public function testNormalizeNotAddExtraBodyParameters(): void
828828
[
829829
'get' => ['method' => 'GET'] + self::OPERATION_FORMATS,
830830
'post' => [
831-
'method' => 'POST',
832-
'swagger_context' => [
833-
'parameters' => [
834-
[
835-
'name' => 'dummy',
836-
'in' => 'body',
837-
'description' => 'The new custom Dummy resource',
838-
'schema' => ['$ref' => '#/definitions/Dummy'],
839-
]
840-
]
841-
]
842-
] + self::OPERATION_FORMATS,
831+
'method' => 'POST',
832+
'swagger_context' => [
833+
'parameters' => [
834+
[
835+
'name' => 'dummy',
836+
'in' => 'body',
837+
'description' => 'The new custom Dummy resource',
838+
'schema' => ['$ref' => '#/definitions/Dummy'],
839+
],
840+
],
841+
],
842+
] + self::OPERATION_FORMATS,
843843
]
844844
);
845845
$resourceMetadataFactoryProphecy = $this->prophesize(ResourceMetadataFactoryInterface::class);

0 commit comments

Comments
 (0)