Skip to content

Commit

Permalink
Update psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Mar 13, 2024
1 parent 57afd36 commit 66fc57d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ jobs:
- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
- name: Run psalm
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/psalm --show-info=true
run: vendor/bin/psalm --show-info=false
- name: Run phan
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/phan
Expand Down
1 change: 1 addition & 0 deletions MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo

// Use $line for the first iteration.
if (false !== $prevLine) {
/** @psalm-suppress NoValue */
$line = $prevLine;
}

Expand Down
1 change: 1 addition & 0 deletions MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s
if (true === $isDocBlock) {
$tokens = $phpcsFile->getTokens();
$oldContent = $tokens[$startPtr]['content'];
/** @var string $newContent */
$newContent = \str_replace($className, $replacement, $oldContent);
$phpcsFile->fixer->replaceToken($startPtr, $newContent);
} else {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^9.0",
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^4.30"
"vimeo/psalm": "^5.17"
},
"config": {
"allow-plugins": {
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
autoloader="tests/bootstrap.php"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="MO4" />
Expand Down

0 comments on commit 66fc57d

Please sign in to comment.