Search code examples
packagevisibilityphp-5.3phpdocphpstorm

Is there a @visibility package concept in PHPDoc / PHPStorm?


I have a domain model written in PHP, and some of my classes (entities inside an aggregate) have public methods, which should never be called from outside the aggregate.

PHP does not have the package visibility concept, so I'm wondering if there is some kind of standardized way to define @package and @visibility package in the docblocks, and to have a static analysis tool that would report violations of the visibility scope.

I'm currently trying out PHPStorm, which I've found very good so far, so I'm wondering if this software has support for this feature; if not, do you know any static code analysis tool that would?


Solution

  • So far, PHPStorm does not seem to provide this feature.