update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+5 -6
View File
@@ -23,7 +23,6 @@ use function Symfony\Component\String\b;
*/
class OutputFormatter implements WrappableOutputFormatterInterface
{
private bool $decorated;
private array $styles = [];
private OutputFormatterStyleStack $styleStack;
@@ -67,10 +66,10 @@ class OutputFormatter implements WrappableOutputFormatterInterface
*
* @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances
*/
public function __construct(bool $decorated = false, array $styles = [])
{
$this->decorated = $decorated;
public function __construct(
private bool $decorated = false,
array $styles = [],
) {
$this->setStyle('error', new OutputFormatterStyle('white', 'red'));
$this->setStyle('info', new OutputFormatterStyle('green'));
$this->setStyle('comment', new OutputFormatterStyle('yellow'));
@@ -106,7 +105,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
public function getStyle(string $name): OutputFormatterStyleInterface
{
if (!$this->hasStyle($name)) {
throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name));
throw new InvalidArgumentException(\sprintf('Undefined style: "%s".', $name));
}
return $this->styles[strtolower($name)];