Skip to content

Commit 1574f3c

Browse files
committed
Add LINK_FORMAT_WITHOUT_EDITOR
1 parent 7299eca commit 1574f3c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/TicketSwapErrorFormatter.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
private const string LINK_FORMAT_GITHUB_ACTIONS = "↳ {relativePath}:{line}\n";
1919
private const string LINK_FORMAT_WARP = "↳ {relativePath}:{line}\n";
2020
private const string LINK_FORMAT_PHPSTORM = "↳ file://{absolutePath}:{line}\n";
21+
private const string LINK_FORMAT_WITHOUT_EDITOR = "↳ {relativePath}:{line}\n";
2122

2223
private string $linkFormat;
2324

@@ -89,14 +90,14 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output) : i
8990
(int) $error->getLine(),
9091
$error->getFilePath(),
9192
$this->relativePathHelper->getRelativePath($error->getFilePath()),
92-
$this->editorUrl ,
93+
$this->editorUrl,
9394
),
9495
$error->getTraitFilePath() !== null ? $this::link(
9596
$this->linkFormat,
9697
(int) $error->getLine(),
9798
$error->getTraitFilePath(),
9899
$this->relativePathHelper->getRelativePath($error->getTraitFilePath()),
99-
$this->editorUrl ,
100+
$this->editorUrl,
100101
) : '',
101102
]),
102103
],
@@ -126,7 +127,7 @@ public static function link(
126127
?string $editorUrl
127128
) : string {
128129
if ($editorUrl === null) {
129-
return sprintf('%s:%d', $relativePath, $line);
130+
$format = self::LINK_FORMAT_WITHOUT_EDITOR;
130131
}
131132

132133
return strtr(

0 commit comments

Comments
 (0)