Skip to content

Commit

Permalink
feat(examples-prepartor): fix nullable status config
Browse files Browse the repository at this point in the history
  • Loading branch information
sidux committed Apr 4, 2024
1 parent 308a9b4 commit ae44efe
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Preparator/ExamplesPreparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ private function prepareTestCases(Operation $operation): iterable

return $examples

Check failure on line 67 in src/Preparator/ExamplesPreparator.php

View workflow job for this annotation

GitHub Actions / PHPStan

Method APITester\Preparator\ExamplesPreparator::prepareTestCases() should return iterable<APITester\Test\TestCase> but returns Illuminate\Support\Collection<(int|string), void>.
->map(
fn (OperationExample $example) => $this->buildTestCase(
$example
->setStatusCode($this->config->response->statusCode)
->setAutoComplete($this->config->autoComplete)
)
function (OperationExample $example) {
if ($this->config->response->statusCode !== null) {
$example->setStatusCode($this->config->response->statusCode);
}
$example->setAutoComplete($this->config->autoComplete);
$this->buildTestCase($example);
}
)
;
}
Expand Down

0 comments on commit ae44efe

Please sign in to comment.