title: Generic autocompletion on properties
body: <p>I'm trying to implement basic Collection wrapper for array with use of generics to help me with autocomplete.</p>
  <p>Collection code implementation:</p>
  <pre><code>/**
  * @template T
  */
  class Collection {
  
      /** @var array&lt;int, T&gt; */
      public array $items;
  
      /**
       * @param array|null $array
       * @var class-string&lt;T&gt; $className
       */
      public function __construct(?array $array = null, ?string $className = null) {
          $this-&gt;items = $array
      }
  
      /** @return T */
      public function get(int $key): mixed {
          return $this-&gt;items[$key];
      }
  
  }
  </code></pre>
  <p>Definition:</p>
  <pre><code>/** @return Collection&lt;UserVM&gt; */
  function sessions(): Collection { return $this-&gt;sessions; }
  
  /** @var Collection&lt;UserVM&gt; */
  private Collection $sessions;
  </code></pre>
  <p>Case 1: <code>$this-&gt;$sessions-&gt;get(0)-&gt; (Doesn't have autocompletion)</code></p>
  <p>Case 2: <code>$this-&gt;$sessions()-&gt;get(0)-&gt; (Has autocompletion)</code></p>
  <p>Is there any way configure the generics definition for properties in order to have the autocompletion working for Case 1? Maybe through php storm meta. Or am I missing something?</p>