private function buildVisibility(ClassMethod $node): Visibility
    {
        if ($node->isPrivate()) {
            return new Visibility(Visibility::PRIVATE_);
        } elseif ($node->isProtected()) {
            return new Visibility(Visibility::PROTECTED_);
        }

        return new Visibility(Visibility::PUBLIC_);
    }
private function buildVisibility(ClassMethod $node): Visibility
    {
        if ($node->isPrivate()) {
            return new Visibility(Visibility::PRIVATE_);
        } elseif ($node->isProtected()) {
            return new Visibility(Visibility::PROTECTED_);
        }

        return new Visibility(Visibility::PUBLIC_);
    }
private function buildVisibility ( ClassMethod $ node ) : Visibility { if ( $ node -> isPrivate ( ) ) { return new Visibility ( Visibility :: PRIVATE_ ) ; } elseif ( $ node -> isProtected ( ) ) { return new Visibility ( Visibility :: PROTECTED_ ) ; } return new Visibility ( Visibility :: PUBLIC_ ) ; }
Converts the visibility of the method to a valid Visibility object.
Converts the visibility of the method to a valid Visibility object .