diff --git a/src/Command/ErrorFormatter/TableErrorFormatter.php b/src/Command/ErrorFormatter/TableErrorFormatter.php index f69eca834e..f41e21eb50 100644 --- a/src/Command/ErrorFormatter/TableErrorFormatter.php +++ b/src/Command/ErrorFormatter/TableErrorFormatter.php @@ -84,7 +84,7 @@ public function formatErrors( $filePath = $error->getTraitFilePath() ?? $error->getFilePath(); if ($error->getIdentifier() !== null && $error->canBeIgnored()) { $message .= "\n"; - $message .= '🪪 ' . $error->getIdentifier(); + $message .= '🪪 ' . $error->getIdentifier(); } if ($error->getTip() !== null) { $tip = $error->getTip(); @@ -94,11 +94,11 @@ public function formatErrors( if (str_contains($tip, "\n")) { $lines = explode("\n", $tip); foreach ($lines as $line) { - $message .= '💡 ' . ltrim($line, ' •') . "\n"; + $message .= '💡 ' . ltrim($line, ' •') . "\n"; } $message = rtrim($message, "\n"); } else { - $message .= '💡 ' . $tip; + $message .= '💡 ' . $tip; } } if (is_string($this->editorUrl)) { @@ -118,7 +118,7 @@ public function formatErrors( $title = $this->relativePathHelper->getRelativePath($filePath); } - $message .= "\n✏️ ' . $title . ''; + $message .= "\n✏️ ' . $title . ''; } if ( diff --git a/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php b/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php index 1ada3c4624..1622363910 100644 --- a/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php +++ b/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php @@ -94,14 +94,14 @@ public function dataFormatterOutputProvider(): iterable 4 Foo ------ ------------------------------------------------------------------- - ------ ---------- + ------ ----------- Line foo.php - ------ ---------- + ------ ----------- 1 Foo 5 Bar Bar2 - 💡 a tip - ------ ---------- + 💡 a tip + ------ ----------- [ERROR] Found 4 errors @@ -143,14 +143,14 @@ public function dataFormatterOutputProvider(): iterable 4 Foo ------ ------------------------------------------------------------------- - ------ ---------- + ------ ----------- Line foo.php - ------ ---------- + ------ ----------- 1 Foo 5 Bar Bar2 - 💡 a tip - ------ ---------- + 💡 a tip + ------ ----------- -- ----------------------- Error @@ -190,13 +190,13 @@ public function dataFormatterOutputProvider(): iterable 'numGenericErrors' => 0, 'verbose' => false, 'extraEnvVars' => [], - 'expected' => ' ------ --------------- + 'expected' => ' ------ ---------------- Line foo.php - ------ --------------- + ------ ---------------- 5 Foobar\Buz - 🪪 foobar.buz - 💡 a tip - ------ --------------- + 🪪 foobar.buz + 💡 a tip + ------ ---------------- [ERROR] Found 1 error @@ -211,13 +211,13 @@ public function dataFormatterOutputProvider(): iterable 'numGenericErrors' => 0, 'verbose' => true, 'extraEnvVars' => [], - 'expected' => ' ------ --------------- + 'expected' => ' ------ ---------------- Line foo.php - ------ --------------- + ------ ---------------- 5 Foobar\Buz - 🪪 foobar.buz - 💡 a tip - ------ --------------- + 🪪 foobar.buz + 💡 a tip + ------ ---------------- [ERROR] Found 1 error