Skip to content
This repository was archived by the owner on Oct 19, 2020. It is now read-only.

Commit aa492f2

Browse files
committed
--ansi is default
1 parent d102282 commit aa492f2

File tree

14 files changed

+31
-29
lines changed

14 files changed

+31
-29
lines changed

src/Command/All.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5757
$provider = new Provider();
5858
$commands = $provider->getCommands();
5959
$style = new SymfonyStyle($input, $output);
60+
$style->setDecorated(true);
6061
$output->write(sprintf("\033\143"));
6162
$style->title('Running all');
6263
$ignore = array('qa:all', 'qa:fixer', 'qa:paratest');

src/Command/CodeBeautifierFixer/CodeBeautifierFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6969
{
7070
$start = microtime(true);
7171
$style = new SymfonyStyle($input, $output);
72+
$style->setDecorated(true);
7273
$style->title($this->description);
7374

7475
$util = new Util();

src/Command/CodeCoverage/CodeCoverage.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ protected function configure()
6262
protected function execute(InputInterface $input, OutputInterface $output)
6363
{
6464
$start = microtime(true);
65-
$this->output = $output;
66-
$command = $this;
6765
$style = new SymfonyStyle($input, $output);
66+
$style->setDecorated(true);
6867
$style->title($this->description);
6968

7069
$util = new Util();
@@ -84,8 +83,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
8483
$output->writeln('<info>Command: '.$cmd.'</>');
8584
$process = new Process($cmd);
8685
$process->setTimeout(3600);
87-
$process->run(function ($type, $buffer) use ($command) {
88-
$command->output->write($buffer);
86+
$process->run(function ($type, $buffer) use ($style) {
87+
$style->write($buffer);
8988
});
9089
$exitCode = $process->getExitCode();
9190

@@ -98,8 +97,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
9897
$output->writeln('<info>Command: '.$cmd.'</>');
9998
$style->newLine();
10099
$process = new Process($cmd);
101-
$process->run(function ($type, $buffer) use ($command) {
102-
$command->output->write($buffer);
100+
$process->run(function ($type, $buffer) use ($style) {
101+
$style->write($buffer);
103102
});
104103

105104
$cmd = $cov.' merge --text coverage';

src/Command/CodeSniffer/CodeSniffer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ protected function configure()
6767
protected function execute(InputInterface $input, OutputInterface $output)
6868
{
6969
$start = microtime(true);
70-
$this->output = $output;
7170
$style = new SymfonyStyle($input, $output);
71+
$style->setDecorated(true);
7272
$style->title($this->description);
7373

7474
$util = new Util();

src/Command/CopyPasteDetector/CopyPasteDetector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ protected function configure()
6060
protected function execute(InputInterface $input, OutputInterface $output)
6161
{
6262
$start = microtime(true);
63-
$this->output = $output;
6463
$style = new SymfonyStyle($input, $output);
64+
$style->setDecorated(true);
6565
$style->title($this->description);
6666

6767
$util = new Util();

src/Command/Fixer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function configure()
3737
->addArgument(
3838
'source',
3939
InputArgument::IS_ARRAY | InputArgument::OPTIONAL,
40-
'List of directories to search Default:src,app,tests'
40+
'List of directories/files to search <comment>[Default:"src,app,tests"]</>'
4141
)
4242
->addOption(
4343
'standard',
@@ -61,6 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6161
$start = microtime(true);
6262
$commands = array('qa:cbf', 'qa:csf');
6363
$style = new SymfonyStyle($input, $output);
64+
$style->setDecorated(true);
6465
$output->write(sprintf("\033\143"));
6566

6667
foreach ($commands as $command) {

src/Command/LineOfCode/LineOfCode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ protected function configure()
6060
protected function execute(InputInterface $input, OutputInterface $output)
6161
{
6262
$start = microtime(true);
63-
$this->output = $output;
6463
$style = new SymfonyStyle($input, $output);
64+
$style->setDecorated(true);
6565
$style->title($this->description);
6666

6767
$util = new Util();

src/Command/Lint/Lint.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ protected function configure()
6262
protected function execute(InputInterface $input, OutputInterface $output)
6363
{
6464
$start = microtime(true);
65-
$this->output = $output;
66-
$command = $this;
6765
$style = new SymfonyStyle($input, $output);
66+
$style->setDecorated(true);
6867
$style->title($this->description);
6968

7069
$util = new Util();
@@ -84,13 +83,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
8483

8584
$cmd = 'php -l '.$source;
8685
$process = new Process($cmd);
87-
$process->setTimeout(3600)->run(function ($type, $buffer) use ($command, &$errors) {
86+
$process->setTimeout(3600)->run(function ($type, $buffer) use ($style, &$errors) {
8887
if (strpos($buffer, 'No syntax errors') !== false || Process::ERR == $type) {
89-
$command->output->write('.');
88+
$style->write('.');
9089
return;
9190
}
9291

93-
$command->output->write('<error>E</>');
92+
$style->write('<error>E</>');
9493
$errors = $buffer;
9594
});
9695

src/Command/MessDetector/MessDetector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6161
{
6262
$start = microtime(true);
6363
$style = new SymfonyStyle($input, $output);
64+
$style->setDecorated(true);
6465
$style->title($this->description);
6566

6667
$util = new Util();

src/Command/PHPCSFixer/PHPCSFixer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function configure()
3939
->addArgument(
4040
'source',
4141
InputArgument::IS_ARRAY | InputArgument::OPTIONAL,
42-
'List of directories to search <comment>[Default:"src,app,tests"]</>'
42+
'List of directories/files to search <comment>[Default:"src,app,tests"]</>'
4343
)
4444
->addOption(
4545
'standard',
@@ -74,6 +74,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
7474
{
7575
$start = microtime(true);
7676
$style = new SymfonyStyle($input, $output);
77+
$style->setDecorated(true);
7778
$style->title($this->description);
7879

7980
$util = new Util();

0 commit comments

Comments
 (0)