forked from symfony/maker-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConsoleStyle.php
45 lines (38 loc) · 1.06 KB
/
ConsoleStyle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/*
* This file is part of the Symfony MakerBundle package.
*
* (c) Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\MakerBundle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* @author Javier Eguiluz <[email protected]>
* @author Ryan Weaver <[email protected]>
*/
final class ConsoleStyle extends SymfonyStyle
{
public function __construct(
InputInterface $input,
private OutputInterface $output,
) {
parent::__construct($input, $output);
}
public function success($message): void
{
$this->writeln('<fg=green;options=bold,underscore>OK</> '.$message);
}
public function comment($message): void
{
$this->text($message);
}
public function getOutput(): OutputInterface
{
return $this->output;
}
}