Search code examples
phpnetbeansclassnetbeans6.8phpdoc

"No Suggestions" in NetBeans


For a few days now I'm using NetBeans 6.8 for doing PHP work. But even if a class-file is included and the methods are public and there's phpDoc used, NetBeans everytime shows "No Suggestions" in the window.

E.g. I type

$user->

and press CTRL+Space, I do expect all the methods and variables but there aren't shown any. ideas?


Solution

  •  $foo = new Bar();
    

    When ctrl click on Bar (or right click -> Go to definition) you should go the the Bar class.
    To the __construct() to be precise.

    If netbeans doenst jump, that means it doesn't know where the Bar class is defined.
    $foo-> ctrl+space Would then say "No suggestions"

    In your case:

    $user = new User();
    $user->
    

    If $user is a parameter:

    /**
     * @param User $user
     */
     function myFunction($user) {
        $user->
    

    check that you got /** and not just /*

    If $user is retrieved via a function:

     /**
      * @return User
      */
      function getUser() {
         // impl
      }
      $user = getUser();
      $user->