mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 04:09:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -131,7 +131,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface
|
||||
private function isRunningOS400()
|
||||
{
|
||||
$checks = array(
|
||||
function_exists('php_uname') ? php_uname('s') : '',
|
||||
\function_exists('php_uname') ? php_uname('s') : '',
|
||||
getenv('OSTYPE'),
|
||||
PHP_OS,
|
||||
);
|
||||
|
||||
2
vendor/symfony/console/Output/Output.php
vendored
2
vendor/symfony/console/Output/Output.php
vendored
@@ -11,8 +11,8 @@
|
||||
|
||||
namespace Symfony\Component\Console\Output;
|
||||
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatter;
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||
|
||||
/**
|
||||
* Base class for output classes.
|
||||
|
||||
@@ -33,7 +33,7 @@ interface OutputInterface
|
||||
/**
|
||||
* Writes a message to the output.
|
||||
*
|
||||
* @param string|iterable $messages The message as an iterable of lines or a single string
|
||||
* @param string|iterable $messages The message as an iterable of strings or a single string
|
||||
* @param bool $newline Whether to add a newline
|
||||
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ interface OutputInterface
|
||||
/**
|
||||
* Writes a message to the output and adds a newline at the end.
|
||||
*
|
||||
* @param string|iterable $messages The message as an iterable of lines of a single string
|
||||
* @param string|iterable $messages The message as an iterable of strings or a single string
|
||||
* @param int $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL
|
||||
*/
|
||||
public function writeln($messages, $options = 0);
|
||||
|
||||
14
vendor/symfony/console/Output/StreamOutput.php
vendored
14
vendor/symfony/console/Output/StreamOutput.php
vendored
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user