Skip to content

Commit

Permalink
fix ecs errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericjaume-oc committed Jun 24, 2024
1 parent 1935dbf commit d617b21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Definition/Example/OperationExample.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down
7 changes: 5 additions & 2 deletions src/Preparator/Error404Preparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d617b21

Please sign in to comment.