Platformsh\Cli\Command\CommandBase::isTerminal PHP Метод

isTerminal() защищенный Метод

Detect automatically whether the output is a TTY terminal.
protected isTerminal ( Symfony\Component\Console\Output\OutputInterface $output ) : boolean
$output Symfony\Component\Console\Output\OutputInterface
Результат boolean
    protected function isTerminal(OutputInterface $output)
    {
        if (!$output instanceof StreamOutput) {
            return false;
        }
        // If the POSIX extension doesn't exist, default to true. It's better
        // for Windows users if we assume the output is a terminal.
        if (!function_exists('posix_isatty')) {
            return true;
        }
        // This uses the same test as StreamOutput::hasColorSupport().
        $stream = $output->getStream();
        /** @noinspection PhpParamsInspection */
        return @posix_isatty($stream);
    }