Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Aptana Studio 3.0.7
-
Component/s: Content Assist, Editor, PHP
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}
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}
Attachments
Issue Links
- is cloned into
-
APSTUD-7800 php @var type-hinting has no effect on code assist when class is in external files
-
- Open
-