ALPHA 3.0.2a

This commit is contained in:
TheGamecraft
2018-09-10 08:51:18 -04:00
parent 7fe13ae0a7
commit 0e0ef86b71
1404 changed files with 10604 additions and 33714 deletions

View File

@@ -42,7 +42,7 @@ class StreamOutput extends Output
*/
public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null)
{
if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) {
if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) {
throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.');
}
@@ -93,19 +93,23 @@ class StreamOutput extends Output
*/
protected function hasColorSupport()
{
if (DIRECTORY_SEPARATOR === '\\') {
return (function_exists('sapi_windows_vt100_support')
if ('Hyper' === getenv('TERM_PROGRAM')) {
return true;
}
if (\DIRECTORY_SEPARATOR === '\\') {
return (\function_exists('sapi_windows_vt100_support')
&& @sapi_windows_vt100_support($this->stream))
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
}
if (function_exists('stream_isatty')) {
if (\function_exists('stream_isatty')) {
return @stream_isatty($this->stream);
}
if (function_exists('posix_isatty')) {
if (\function_exists('posix_isatty')) {
return @posix_isatty($this->stream);
}