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: #3402 (comment)
  • Loading branch information
Ocramius committed Feb 19, 2020
1 parent e853b4e commit 899f1e3
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 @@ -159,10 +159,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 899f1e3

Please sign in to comment.