Skip to content

Commit ee972b4

Browse files
committed
refactor(formatters): code style
1 parent d9402bd commit ee972b4

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Command/ErrorFormatter/CheckstyleErrorFormatter.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ public function formatErrors(
4444

4545
foreach ($errors as $error) {
4646

47-
$identifier = null !== $error->getIdentifier()
48-
? " // @phpstan-ignore {$error->getIdentifier()}" :
49-
'';
47+
$identifier = $error->getIdentifier();
5048

5149
$output->writeRaw(sprintf(
5250
' <error line="%d" column="1" severity="error" message="%s"%s />',
5351
$this->escape((string) $error->getLine()),
54-
$this->escape($error->getMessage() . $identifier),
55-
$error->getIdentifier() !== null ? sprintf(' source="%s"', $this->escape($error->getIdentifier())) : '',
52+
$this->escape($error->getMessage() . ($identifier !== null ? sprintf(' // @phpstan-ignore %s', $identifier) : '')),
53+
$identifier !== null ? sprintf(' source="%s"', $this->escape($identifier)) : '',
5654
));
5755
$output->writeLineFormatted('');
5856
}

0 commit comments

Comments
 (0)