Skip to content

Commit

Permalink
Removed @psalm-param array{...} annotations
Browse files Browse the repository at this point in the history
These annotations were too specific, since the returned type would never match anyway.

Specifically, psalm cannot yet declare `ArrayType1&ArrayType2`, so an union type of two
arrays is not currently something we can declare explicitly.

Ref: api-platform#3402 (comment)
  • Loading branch information
Ocramius committed Feb 19, 2020
1 parent e67cf42 commit a68808d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/JsonSchema/TypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ private function getClassType(?string $className, string $format = 'json', ?bool
* @param array<string, mixed> $jsonSchema
*
* @return array<string, mixed>
*
* @psalm-param array{type=: string|list<string>} $jsonSchema
*
* @psalm-return array{type=: string|list<string>, $ref=: string}
*/
private function addNullabilityToTypeDefinition(array $jsonSchema, Type $type): array
{
Expand Down

0 comments on commit a68808d

Please sign in to comment.