Skip to content

Commit

Permalink
Merge pull request #178 from martin-helmich/chore/bump-psalm
Browse files Browse the repository at this point in the history
Bump Psalm to ^5.22
  • Loading branch information
martin-helmich authored Feb 26, 2024
2 parents 68e70b9 + 4a840dd commit 2677608
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"require-dev": {
"phpunit/phpunit": "^9.6.8",
"mikey179/vfsstream": "^1.6.11",
"vimeo/psalm": "^4.29.0",
"vimeo/psalm": "^5.22.2",
"phpspec/prophecy-phpunit": "^2.0.2"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Linter/ReportPrinter/CheckstyleReportPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function writeReport(Report $report): void

foreach ($file->getIssues() as $issue) {
$xmlWarning = $xml->createElement('error');
$xmlWarning->setAttribute('line', $issue->getLine() ? ((string)$issue->getLine()) : "");
$xmlWarning->setAttribute('line', $issue->getLine() !== null ? ((string)$issue->getLine()) : "");
$xmlWarning->setAttribute('severity', $issue->getSeverity());
$xmlWarning->setAttribute('message', $issue->getMessage());
$xmlWarning->setAttribute('source', $issue->getSource());
Expand Down
4 changes: 2 additions & 2 deletions src/Linter/ReportPrinter/GccReportPrinter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function writeReport(Report $report): void
$this->output->writeLn(sprintf(
"%s:%d:%d: %s: %s",
$file->getFilename(),
$issue->getLine() ?: 0,
$issue->getColumn() ?: 0,
$issue->getLine() ?? 0,
$issue->getColumn() ?? 0,
$issue->getSeverity(),
$issue->getMessage()
));
Expand Down

0 comments on commit 2677608

Please sign in to comment.