Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct(
/**
* {@inheritdoc}
*/
protected function writeProgress($progress)
protected function writeProgress($progress) :void
{
if ($this->debug) {
parent::writeProgress($progress);
Expand All @@ -72,7 +72,7 @@ protected function writeProgress($progress)
/**
* {@inheritdoc}
*/
protected function writeProgressWithColor($color, $buffer)
protected function writeProgressWithColor($color, $buffer): void
{
if ($this->debug) {
parent::writeProgressWithColor($color, $buffer);
Expand Down Expand Up @@ -112,14 +112,14 @@ private function printTestCaseStatus($color, $buffer)
break;
}

echo parent::formatWithColor($color, $buffer);
$this->writeWithColor($color, $buffer);
$this->column++;
}

/**
* {@inheritdoc}
*/
public function startTest(Test $test)
public function startTest(Test $test): void
{
$this->className = get_class($test);
parent::startTest($test);
Expand Down Expand Up @@ -185,4 +185,17 @@ private function isCIEnvironment()

return false;
}


/**
* {@inheritdoc}
*/
protected function writeWithColor(string $color, string $buffer, bool $lf = true): void
{
$this->write($this->colorizeTextBox($color, $buffer));

if ($lf) {
$this->write(\PHP_EOL);
}
}
}