Skip to content

Commit 15ad85a

Browse files
authored
Merge pull request #114 from mmarynich/feature/fix-error-output
Set the content of the error output
2 parents b7d042d + 38dbf9e commit 15ad85a

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/PhpGitHooks/Module/JsonLint/Infrastructure/Tool/JsonLintProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private function execute($file)
6363
private function setErrors(Process $process)
6464
{
6565
if (false === $process->isSuccessful()) {
66-
return $process->getOutput();
66+
return $process->getErrorOutput();
6767
}
6868
}
6969
}

src/PhpGitHooks/Module/PhpCs/Infrastructure/Tool/PhpCsToolProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private function execute($file, $standard, $ignore)
6969
private function setErrors(Process $process)
7070
{
7171
if (false === $process->isSuccessful()) {
72-
return $process->getOutput();
72+
return $process->getErrorOutput();
7373
}
7474
}
7575
}

src/PhpGitHooks/Module/PhpCsFixer/Infrastructure/Tool/PhpCsFixerToolProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private function processTool($file, $level, $options)
7474
private function setError(Process $process)
7575
{
7676
if (false === $process->isSuccessful()) {
77-
return $process->getOutput();
77+
return $process->getErrorOutput();
7878
}
7979
}
8080
}

src/PhpGitHooks/Module/PhpLint/Infrastructure/Tool/PhpLintToolProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ private function execute($file)
4646
*/
4747
private function setErrors(Process $process)
4848
{
49-
return false === $process->isSuccessful() ? $process->getOutput() : null;
49+
return false === $process->isSuccessful() ? $process->getErrorOutput() : null;
5050
}
5151
}

src/PhpGitHooks/Module/PhpMd/Infrastructure/Tool/PhpMdToolProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ private function execute($file, $options)
5959
*/
6060
private function setError(Process $process)
6161
{
62-
return false === $process->isSuccessful() ? $process->getOutput() : null;
62+
return false === $process->isSuccessful() ? $process->getErrorOutput() : null;
6363
}
6464
}

0 commit comments

Comments
 (0)