Is there any way to tell PHPStorm to hide the method / function / variable / etc

I am looking for a way to get PHPStorm to hide some methods from code completion. I tried annotating DocBlocks using @access private , but that does not hide them from the view.

Is there a way to hide a private API without writing / generating a stub file with a limited interface and referring to this in my project?

eg:

Suppose the library has the following in it:

 <?php interface IDoABunchOfStuff { /** * My library users use this */ public function doFoo(); /** * My Library needs this but requires that my users don't see it. * * @access private * @visibility none * @package mylib * @internal */ public function doBar(); } class Foo extends Something implements IDoABunchOfStuff { /** * does foo */ public function doFoo() { // ... } /** * does bar. for internal use only * * @access private * @visibility none * @package mylib * @internal */ public function _doBar() { // ... } } 

And the user of my library prints:

 <?php myAwesomeFunction(IDoABunchOfStuff $aFoo) { if($->$oFoo->[CTRL+SPACE] // invoking code completion... 

Is it possible (and if so) to ensure that my user never sees _doBar ?

None of the various annotations I tried seem to have the desired effect.

PS I am using PHPStorm 4.0.3

additional:

In this case, I am implementing ArrayAccess, and I do not want offsetGet, offsetSet, offsetExists and offsetUnset clutter my code completion window, but I had similar problems elsewhere to require a more general question.

+4
source share
1 answer

No - you cannot do this in the current version of PhpStorm.

There is a ticket in the Issue Tracker issue that suggests using the @access tag, but it is not currently planned for any specific version: http://youtrack.jetbrains.com/issue/WI-5788

Feel free to vote / comment / etc. and perhaps it will be implemented sooner.

+2
source

All Articles