public static function umask(int $umask = null): int
    {
        $oldUmask = self::$umask;
        if (null !== $umask) {
            self::$umask = $umask;
        }

        return $oldUmask;
    }
public static function umask(int $umask = null): int
    {
        $oldUmask = self::$umask;
        if (null !== $umask) {
            self::$umask = $umask;
        }

        return $oldUmask;
    }
public static function umask ( int $ umask = null ) : int { $ oldUmask = self :: $ umask ; if ( null !== $ umask ) { self :: $ umask = $ umask ; } return $ oldUmask ; }
sets new umask setting and returns previous umask setting

If no value is given only the current umask setting is returned.

@param   int|null  $umask  new umask setting
@return  int
@since   0.8.0
sets new umask setting and returns previous umask setting