src/Annotation/Generate.php
public static function getMostLimitedVisibility(...$requirements): string
    {
        foreach ([self::VISIBILITY_NONE, self::VISIBILITY_PRIVATE, self::VISIBILITY_PROTECTED] as $search_string) {
            foreach ($requirements as $requirement) {
                if ($requirement === $search_string) {
                    return $search_string;
                }
            }
        }

        return self::VISIBILITY_PUBLIC;
    }
public static function getMostLimitedVisibility(...$requirements): string
    {
        foreach ([self::VISIBILITY_NONE, self::VISIBILITY_PRIVATE, self::VISIBILITY_PROTECTED] as $search_string) {
            foreach ($requirements as $requirement) {
                if ($requirement === $search_string) {
                    return $search_string;
                }
            }
        }

        return self::VISIBILITY_PUBLIC;
    }
public static function getMostLimitedVisibility ( ... $ requirements ) : string { foreach ( [ self :: VISIBILITY_NONE , self :: VISIBILITY_PRIVATE , self :: VISIBILITY_PROTECTED ] as $ search_string ) { foreach ( $ requirements as $ requirement ) { if ( $ requirement === $ search_string ) { return $ search_string ; } } } return self :: VISIBILITY_PUBLIC ; }
Resolves the most limited visibility for method generation.

If A defines public and B defines private, the returned visibility
modifier will be private. Precedence is as following:
- none
- private
- protected
- public

@param array ...$requirements

@return string
Resolves the most limited visibility for method generation .