1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00

Update composer

This commit is contained in:
Daniel Neto 2024-03-05 19:29:45 -03:00
parent 330cdbe615
commit 0c83c9a678
442 changed files with 9523 additions and 10793 deletions

View file

@ -21,13 +21,15 @@ namespace Symfony\Component\Console\Helper;
class DebugFormatterHelper extends Helper
{
private const COLORS = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'];
private array $started = [];
private int $count = -1;
private $started = [];
private $count = -1;
/**
* Starts a debug formatting session.
*
* @return string
*/
public function start(string $id, string $message, string $prefix = 'RUN'): string
public function start(string $id, string $message, string $prefix = 'RUN')
{
$this->started[$id] = ['border' => ++$this->count % \count(self::COLORS)];
@ -36,8 +38,10 @@ class DebugFormatterHelper extends Helper
/**
* Adds progress to a formatting session.
*
* @return string
*/
public function progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR'): string
public function progress(string $id, string $buffer, bool $error = false, string $prefix = 'OUT', string $errorPrefix = 'ERR')
{
$message = '';
@ -70,8 +74,10 @@ class DebugFormatterHelper extends Helper
/**
* Stops a formatting session.
*
* @return string
*/
public function stop(string $id, string $message, bool $successful, string $prefix = 'RES'): string
public function stop(string $id, string $message, bool $successful, string $prefix = 'RES')
{
$trailingEOL = isset($this->started[$id]['out']) || isset($this->started[$id]['err']) ? "\n" : '';
@ -91,7 +97,10 @@ class DebugFormatterHelper extends Helper
return sprintf('<bg=%s> </>', self::COLORS[$this->started[$id]['border']]);
}
public function getName(): string
/**
* {@inheritdoc}
*/
public function getName()
{
return 'debug_formatter';
}