Skip to content

Commit

Permalink
feat(404-prepartor): handle int example name
Browse files Browse the repository at this point in the history
  • Loading branch information
sidux committed Jun 27, 2024
1 parent 7ea6335 commit fa0d27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Definition/Loader/OpenApiDefinitionLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ private function getHeaders(array $headers): Parameters
/**
* @param array<OperationExample> $examples
*/
private function getExample(string $name, array &$examples, ?int $statusCode = null): OperationExample
private function getExample(string|int $name, array &$examples, ?int $statusCode = null): OperationExample
{
if (!isset($examples[$name])) {
$examples[$name] = new OperationExample($name, null, $statusCode);

Check failure on line 555 in src/Definition/Loader/OpenApiDefinitionLoader.php

View workflow job for this annotation

GitHub Actions / PHPStan

Parameter #1 $name of class APITester\Definition\Example\OperationExample constructor expects string, int|string given.
Expand Down

0 comments on commit fa0d27c

Please sign in to comment.