You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nearly identical to Rector\Php71\Rector\ClassConst\PublicConstantVisibilityRector: it would be a great addition to have a rule to add missing visibility declarations to class methods.
Note: I was able to achieve this locally by changing the aforementioned class's getNodeTypes() to include \PhpParser\Node\Stmt\ClassMethod::class. That alone seemed to be sufficient, and I didn't get any false-positives with global functions or closures.
Diff
class Foo
{
- function bar()+ public function bar()
{
The text was updated successfully, but these errors were encountered:
Feature Request
Nearly identical to
Rector\Php71\Rector\ClassConst\PublicConstantVisibilityRector
: it would be a great addition to have a rule to add missing visibility declarations to class methods.Note: I was able to achieve this locally by changing the aforementioned class's
getNodeTypes()
to include\PhpParser\Node\Stmt\ClassMethod::class
. That alone seemed to be sufficient, and I didn't get any false-positives with global functions or closures.Diff
The text was updated successfully, but these errors were encountered: