Fixing autocompletion in extremely simple PhpStorm example -


i've downloaded , installed phpstorm 7.1, , i'm wondering why won't understand following piece of code:

<?php   /**  * class whatever  */ class whatever {    /**    * prints "hello."    */   function foo() {     echo "hello.\n";   } }   $test = new whatever();  $test->foo();  ?> 

it appears ignore whatever class definition.

when typing $this-> , pressing ctrl+enter says "no suggestions" , after typing new whatever class never part of suggestion list. in other cases can't reproduced said "undefined class definition: whateer".

what doing wrong?

update

see following screenshot. please note message in bottom left corner after typing $test->foo.

screenshot showing phpstorm error message

also, happens when press ctrl+b:

screenshot showing phpstrom can't find declaration of "foo"

however, pressing ctrl+b caret @ new whatever finds class , same works when using ctrl+b on $test itself... weird...

the problem had test file outside project folder. lazyone pointed out, how phpstorm works. moving file project dir solved problem

see comments question..


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -