Skip to content

Commit

Permalink
Fix early return when property $status of JsonResponse is typed int.
Browse files Browse the repository at this point in the history
  • Loading branch information
liquid207 committed Feb 13, 2025
1 parent b297c9a commit c03c954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Support/TypeToSchemaExtensions/ResponseTypeToSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Dedoc\Scramble\Support\Generator\Response;
use Dedoc\Scramble\Support\Generator\Schema;
use Dedoc\Scramble\Support\Type\Generic;
use Dedoc\Scramble\Support\Type\Literal\LiteralIntegerType;
use Dedoc\Scramble\Support\Type\IntegerType;
use Dedoc\Scramble\Support\Type\ObjectType;
use Dedoc\Scramble\Support\Type\Type;
use Dedoc\Scramble\Support\Type\UnknownType;
Expand Down Expand Up @@ -34,7 +34,7 @@ public function toResponse(Type $type)
return $responsableResponse;
}

if (! $type->templateTypes[1] instanceof LiteralIntegerType) {
if (! $type->templateTypes[1] instanceof IntegerType) {
return null;
}

Expand Down

0 comments on commit c03c954

Please sign in to comment.