Aptana Studio
  1. Aptana Studio
  2. APSTUD-1714

php @var type-hinting has no effect on code assist

    Details

      Description

      {html}<div><p>When using a @var annotation no code assist is being displayed
      on a variable not otherwise explicitly declared in current
      scope.</p>
      <pre>
      <code class="php"><?php
      class Foo {
      public function bar() {}
      }

      $foo = new Foo();
      $foo->bar(); // When typing $foo-> code assist shows bar() as option

      /* @var $definedOutsideScope Foo */
      $definedOutsideScope->bar(); // After typing $definedOutsideScope-> I would expect the same code assist

      $arrayOfFoo = array(new Foo(), new Foo(), new Foo());
      foreach ($arrayOfFoo as $oneFoo) { /* @var $oneFoo Foo */ $oneFoo->bar(); // Again, after typing $oneFoo-> I would expect the code assist the appear }
      ?></code>
      </pre></div>{html}

        Issue Links

          Activity

            People

            • Assignee:
              Shalom Gibly
              Reporter:
              Joram van den Boezem
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: