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/core#3402 (comment)
  • Loading branch information
Ocramius authored and teohhanhui committed Feb 27, 2020
1 parent affdd7d commit 44566de
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions 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 44566de

Please sign in to comment.