This commit is contained in:
Torsten 2018-08-07 10:42:11 +02:00
parent 98419bd18d
commit 8a69e45efa
4919 changed files with 28311 additions and 224136 deletions

5
pfosten/vendor/symfony/console/Style/OutputStyle.php vendored Executable file → Normal file
View file

@ -13,8 +13,8 @@ namespace Symfony\Component\Console\Style;
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Decorates output to add console style guide helpers.
@ -25,9 +25,6 @@ abstract class OutputStyle implements OutputInterface, StyleInterface
{
private $output;
/**
* @param OutputInterface $output
*/
public function __construct(OutputInterface $output)
{
$this->output = $output;

11
pfosten/vendor/symfony/console/Style/StyleInterface.php vendored Executable file → Normal file
View file

@ -34,8 +34,6 @@ interface StyleInterface
/**
* Formats a list.
*
* @param array $elements
*/
public function listing(array $elements);
@ -83,9 +81,6 @@ interface StyleInterface
/**
* Formats a table.
*
* @param array $headers
* @param array $rows
*/
public function table(array $headers, array $rows);
@ -96,7 +91,7 @@ interface StyleInterface
* @param string|null $default
* @param callable|null $validator
*
* @return string
* @return mixed
*/
public function ask($question, $default = null, $validator = null);
@ -106,7 +101,7 @@ interface StyleInterface
* @param string $question
* @param callable|null $validator
*
* @return string
* @return mixed
*/
public function askHidden($question, $validator = null);
@ -127,7 +122,7 @@ interface StyleInterface
* @param array $choices
* @param string|int|null $default
*
* @return string
* @return mixed
*/
public function choice($question, array $choices, $default = null);

20
pfosten/vendor/symfony/console/Style/SymfonyStyle.php vendored Executable file → Normal file
View file

@ -40,17 +40,13 @@ class SymfonyStyle extends OutputStyle
private $lineLength;
private $bufferedOutput;
/**
* @param InputInterface $input
* @param OutputInterface $output
*/
public function __construct(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
$width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
$this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
$this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
parent::__construct($output);
}
@ -67,7 +63,7 @@ class SymfonyStyle extends OutputStyle
*/
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true)
{
$messages = is_array($messages) ? array_values($messages) : array($messages);
$messages = \is_array($messages) ? array_values($messages) : array($messages);
$this->autoPrependBlock();
$this->writeln($this->createBlock($messages, $type, $style, $prefix, $padding, $escape));
@ -121,7 +117,7 @@ class SymfonyStyle extends OutputStyle
{
$this->autoPrependText();
$messages = is_array($message) ? array_values($message) : array($message);
$messages = \is_array($message) ? array_values($message) : array($message);
foreach ($messages as $message) {
$this->writeln(sprintf(' %s', $message));
}
@ -273,7 +269,7 @@ class SymfonyStyle extends OutputStyle
{
$progressBar = parent::createProgressBar($max);
if ('\\' !== DIRECTORY_SEPARATOR) {
if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
$progressBar->setEmptyBarCharacter('░'); // light shade character \u2591
$progressBar->setProgressCharacter('');
$progressBar->setBarCharacter('▓'); // dark shade character \u2593
@ -283,9 +279,7 @@ class SymfonyStyle extends OutputStyle
}
/**
* @param Question $question
*
* @return string
* @return mixed
*/
public function askQuestion(Question $question)
{
@ -393,7 +387,7 @@ class SymfonyStyle extends OutputStyle
if (null !== $type) {
$type = sprintf('[%s] ', $type);
$indentLength = strlen($type);
$indentLength = \strlen($type);
$lineIndentation = str_repeat(' ', $indentLength);
}
@ -405,7 +399,7 @@ class SymfonyStyle extends OutputStyle
$lines = array_merge($lines, explode(PHP_EOL, wordwrap($message, $this->lineLength - $prefixLength - $indentLength, PHP_EOL, true)));
if (count($messages) > 1 && $key < count($messages) - 1) {
if (\count($messages) > 1 && $key < \count($messages) - 1) {
$lines[] = '';
}
}