Skip to content

Commit

Permalink
Update 2020-03-23-doctrine-entity-typed-properties-with-php74.md (#1065)
Browse files Browse the repository at this point in the history
With `@var Collection<Trainer>`, PhpStan gives me (on level 6) - see https://stackoverflow.com/a/64242837/1668200
> Property ... with generic interface Doctrine\Common\Collections\Collection does not specify its types: TKey, T
  • Loading branch information
ThomasLandauer authored Oct 13, 2020
1 parent dab3ff4 commit 96d2b42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ You might also use this PHPStan format, but I'm not sure how PHPStorm handles th
/**
* @ORM\OneToMany(targetEntity=Training::class, mappedBy="trainer")
- * @var Collection|Trainer[]
+ * @var Collection<Trainer>
+ * @var Collection<int, Trainer>
*/
private Collection $trainings;
```
Expand Down

0 comments on commit 96d2b42

Please sign in to comment.