Returns true if the stream supports colorization.

Colorization is disabled if not supported by the stream:

-  Windows without Ansicon and ConEmu
-  non tty consoles

@return Boolean true if the stream supports colorization, false otherwise
543570
protected function hasColorSupport()
    {
        // @codeCoverageIgnoreStart
        if (DIRECTORY_SEPARATOR == '\\') {
            return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
        }

        return function_exists('posix_isatty') && @posix_isatty($this->stream->stream);
        // @codeCoverageIgnoreEnd
    }
1160929
public static function hasColorSupport(): bool
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            $winColor = Env::get('ANSICON', Env::VAR_BOOL)
                || 'ON' === Env::get('ConEmuANSI')
                || 'xterm' === Env::get('TERM');

            return $winColor;
        }

        if (!defined('STDOUT')) {
            return false;
        }

        return self::isInteractive(STDOUT);
    }
953876
public boolean isSupported(ICalVersion version) {
		for (ICalVersion supportedVersion : supportedVersions) {
			if (supportedVersion == version) {
				return true;
			}
		}
		return false;
	}
15240
public static function supports_colour()
    {
        // Special case for buildbot
        if (isset($_ENV['_']) && strpos($_ENV['_'], 'buildbot') !== false) {
            return false;
        }

        if (!defined('STDOUT')) {
            define('STDOUT', fopen("php://stdout", "w"));
        }
        return function_exists('posix_isatty') ? @posix_isatty(STDOUT) : false;
    }
310387
public static function isSupportedShell()
        {
            if (isset($_ENV['TERM'])) {
                if (isset(self::$_supportedShells[$_ENV['TERM']])) {
                    return true;
                }
            } elseif (isset($_SERVER['TERM'])) {
                if (isset(self::$_supportedShells[$_SERVER['TERM']])) {
                    return true;
                }
            } elseif (isset($_SERVER['ConEmuANSI']) && $_SERVER['ConEmuANSI'] == 'ON') {
                return true;
            }

            return isAke($_SERVER, 'CLI', false);
        }
1129306
public static function isEnabled() {
		$enable_cloning = get_site_option( 'pressbooks_sharingandprivacy_options', [] );
		$enable_cloning = isset( $enable_cloning['enable_cloning'] ) ? $enable_cloning['enable_cloning'] : SharingAndPrivacyOptions::getDefaults()['enable_cloning'];
		return (bool) $enable_cloning;
	}
1266247
public function isAbsolute() {
		//Stream urls are always absolute
		if ($this->isStream()) {
			return true;
		}

		if (realpath($this->pathname->toString()) == $this->pathname->toString()) {
			return true;
		}
		
		if ($this->pathname->length() == 0 || $this->pathname->startsWith('.')) {
			return false;
		}
		
		// Windows allows absolute paths like this.
		if ($this->pathname->match('#^[a-zA-Z]:\\\\#')) {
			return true;
		}

		// A path starting with / or \ is absolute; anything else is relative.
		return $this->pathname->startsWith('/') || $this->pathname->startsWith('\\');
	}
767560
private function hasColorSupport($stream)
    {
        if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {
            return false;
        }

        if ('Hyper' === getenv('TERM_PROGRAM')) {
            return true;
        }

        if (\DIRECTORY_SEPARATOR === '\\') {
            return (\function_exists('sapi_windows_vt100_support')
                && @sapi_windows_vt100_support($stream))
                || false !== getenv('ANSICON')
                || 'ON' === getenv('ConEmuANSI')
                || 'xterm' === getenv('TERM');
        }

        if (\function_exists('stream_isatty')) {
            return @stream_isatty($stream);
        }

        if (\function_exists('posix_isatty')) {
            return @posix_isatty($stream);
        }

        $stat = @fstat($stream);
        // Check if formatted mode is S_IFCHR
        return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
    }
75405
public function isDisabled()
    {
        if (parent::isDisabled() && 'select' === $this->type) {
            return true;
        }

        foreach ($this->options as $option) {
            if ($option['value'] == $this->value && $option['disabled']) {
                return true;
            }
        }

        return false;
    }
824105
public static function isPtySupported()
    {
        static $result;

        if (null !== $result) {
            return $result;
        }

        if ('\\' === \DIRECTORY_SEPARATOR) {
            return $result = false;
        }

        return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes);
    }
79061
def disable(cls):
        
        # Skip if not on Windows.
        if not IS_WINDOWS:
            return False

        # Restore default colors.
        if hasattr(sys.stderr, '_original_stream'):
            getattr(sys, 'stderr').color = None
        if hasattr(sys.stdout, '_original_stream'):
            getattr(sys, 'stdout').color = None

        # Restore original streams.
        changed = False
        if hasattr(sys.stderr, '_original_stream'):
            changed = True
            sys.stderr = getattr(sys.stderr, '_original_stream')
        if hasattr(sys.stdout, '_original_stream'):
            changed = True
            sys.stdout = getattr(sys.stdout, '_original_stream')

        return changed
990371
public boolean isStandardFont() {
		return (family == UNDEFINED && size == UNDEFINED && style == UNDEFINED
				&& color == null && baseFont == null);
	}
973428
@Override
    public boolean affectsDisplay()
    {
        boolean ret = containsFlow();
        //non-zero top or left border
        if (border.top > 0 || border.bottom > 0)
            ret = true;
        //the same with padding
        if (padding.top > 0 || padding.bottom > 0)
            ret = true;
        
        return ret;
    }
54459
public function hasAlpha(): bool
    {
        return $this->bands === 2 ||
            ($this->bands === 4 &&
                $this->interpretation !== Interpretation::CMYK) ||
            $this->bands > 4;
    }
929048
private boolean isInWhiteList(String tpl)
	{
		if ((!whiteList.isEmpty() && whiteList.contains(tpl))
				|| (whiteList.isEmpty())) {
			return true;
		}
		return false;
	}
263513
public function isSupported()
    {
        $row = $this->getMixer();

        if($row instanceof DatabaseRowInterface)
        {
            if(!$row->hasProperty($this->_parent_column))  {
                return false;
            }
        }

        return true;
    }
1294937
public static boolean supportsNative() {
        if (!testedLibLoading) {
            LiblasJNALibrary wrapper = LiblasWrapper.getWrapper();
            if (wrapper != null) {
                isNativeLibAvailable = true;
            }
            testedLibLoading = true;
        }
        return isNativeLibAvailable;
    }