atom-autocomplete-php icon indicating copy to clipboard operation
atom-autocomplete-php copied to clipboard

Own class functions not showing parameters

Open texelate opened this issue 7 years ago • 1 comments

I'm not sure if this is an issue, expected behaviour or just me doing it wrong…

This package is picking up on my class's function names in my vendor directory as suggestions but it does not autocomplete the parameters per the @param comments above the class's function names. It does it for PHP's built-in functions but not from anything “custom”, i.e. in the vendor directory.

Is this expected behaviour?

Thanks!

texelate avatar Jun 24 '17 20:06 texelate

Do you have the "use" for the classes in your @param ?

For example :

namespace A;

class MyClass
{
     /**
      * @param YourClass $yourClass
      */
     public function setYourClass($yourClass) {}
}

It will not work if YourClass is not in the same namespace as MyClass

This will work :

namespace A;

use B\YourClass;

class MyClass
{
     /**
      * @param YourClass $yourClass
      */
     public function setYourClass($yourClass) {}
}

Peekmo avatar Jul 05 '17 11:07 Peekmo