public static function getVisibility(Node\Stmt\ClassMethod $method): int
    {
        if ($method->isPrivate()) {
            return VisibilityInterface::PRIVATE;
        }
        if ($method->isProtected()) {
            return VisibilityInterface::PROTECTED;
        }
        return VisibilityInterface::PUBLIC;
    }
public static function getVisibility(Node\Stmt\ClassMethod $method): int
    {
        if ($method->isPrivate()) {
            return VisibilityInterface::PRIVATE;
        }
        if ($method->isProtected()) {
            return VisibilityInterface::PROTECTED;
        }
        return VisibilityInterface::PUBLIC;
    }
public static function getVisibility ( Node \ Stmt \ ClassMethod $ method ) : int { if ( $ method -> isPrivate ( ) ) { return VisibilityInterface :: PRIVATE ; } if ( $ method -> isProtected ( ) ) { return VisibilityInterface :: PROTECTED ; } return VisibilityInterface :: PUBLIC ; }
Get the visibility of a method.

@param Node\Stmt\ClassMethod $method The method.

@return int The visibility method.

@see VisibilityInterface For different constants of visibility.
Get the visibility of a method .