Skip to content

Commit

Permalink
fix phpstan error in Error404Preparator
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericjaume-oc committed Jun 24, 2024
1 parent cce0103 commit 1935dbf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Preparator/Error404Preparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ private function prepareTestCase(DefinitionResponse $response): array

$testcases = [];

$pathParameters = $operation->getPathParameters()
->map(static fn ($parameter) => $parameter->getName())
->toArray();

$pathParameters = array_fill_keys($pathParameters, self::INT32_MAX);
$pathParameters = array_map(fn ($parameter) => $parameter->getName(),
$operation->getPathParameters()->toArray());
$pathParameters = array_fill_keys(array_values($pathParameters), self::INT32_MAX);

if ($operation->getRequestBodies()->count() === 0) {
$testcases[] = $this->buildTestCase(
Expand Down

0 comments on commit 1935dbf

Please sign in to comment.