Skip to content

Commit

Permalink
Simplify DiffConsoleFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
kubawerlos committed Dec 15, 2021
1 parent 24999a0 commit cf4dcc4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Differ/DiffConsoleFormatter.php
Expand Up @@ -58,11 +58,7 @@ static function (string $line) use ($isDecorated, $lineTemplate): string {
if ($isDecorated) {
$count = 0;
$line = Preg::replaceCallback(
[
'/^(\+.*)/',
'/^(\-.*)/',
'/^(@.*)/',
],
'/^([+-@].*)/',
static function (array $matches): string {
if ('+' === $matches[0][0]) {
$colour = 'green';
Expand Down

0 comments on commit cf4dcc4

Please sign in to comment.