diff --git a/src/Definition/Example/OperationExample.php b/src/Definition/Example/OperationExample.php index 832775b..bed5a6c 100644 --- a/src/Definition/Example/OperationExample.php +++ b/src/Definition/Example/OperationExample.php @@ -235,8 +235,8 @@ public function getQueryParameters(): array ->count() ; if ($this->forceRandom || ($this->autoComplete && \count( - $this->queryParameters - ) < $definitionParamsCount)) { + $this->queryParameters + ) < $definitionParamsCount)) { $randomQueryParams = $this->parent ->getQueryParameters() ->getRandomExamples() @@ -274,8 +274,8 @@ public function getHeaders(): array if ($this->parent !== null) { $definitionHeadersCount = $this->parent - ->getHeaders() - ->count() + 1 // content-type + ->getHeaders() + ->count() + 1 // content-type ; if ($this->parent->getSecurities()->count() > 0) { diff --git a/src/Preparator/Error404Preparator.php b/src/Preparator/Error404Preparator.php index e7cbcac..f6a1b76 100644 --- a/src/Preparator/Error404Preparator.php +++ b/src/Preparator/Error404Preparator.php @@ -41,8 +41,11 @@ private function prepareTestCase(DefinitionResponse $response): array $testcases = []; - $pathParameters = array_map(fn ($parameter) => $parameter->getName(), - $operation->getPathParameters()->toArray()); + $pathParameters = array_map( + static fn ($parameter) => $parameter->getName(), + $operation->getPathParameters() + ->toArray() + ); $pathParameters = array_fill_keys(array_values($pathParameters), self::INT32_MAX); if ($operation->getRequestBodies()->count() === 0) {