title: What is the return value of getSomethings in a Doctrine / Symfony One-To-Many Relationship?
body: <p>I like to either type-hint or starting in PHP7 actually show the return value of a getter function. But with One-To-Many relationships in Doctrine / Symfony, I'm still stuck and am not sure what to add to the <code>@var</code> tag.</p>
  
  <pre><code>[...]
  
  /**
   * @var string
   * @ORM\Column(name="name", type="string")
   */
  private $features;
  
  
  /**
   * What goes into var here?
   *
   * One Product has Many Features.
   * @ORM\OneToMany(targetEntity="Feature", mappedBy="product")
   */
  private $features;
  
  public function __construct()
  {
      $this-&gt;features = new ArrayCollection();
      $this-&gt;name = 'New Product Name';
  }
  
  /**
   * @return Collection
   */
  public function getFeatures(): Collection
  {
      return $this-&gt;features;
  }
  
  
  [...]
  </code></pre>
  
  <p>Currently I’m using <code>@var Collection</code> and can then use the Collection functions. But what would be the »proper« thing to return? Is it indeed <code>Collection</code>? Or is it <code>ArrayCollection</code>? I’m tempted to use <code>Features[]</code> in order to use the functions of Feature, if I need to (instead of typehinting), but it doesn’t feel right.</p>
  
  <p>What would be the »cleanest« / stable way to do this?</p>