Skip to content

Commit

Permalink
Update Psalm to 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Dec 16, 2024
1 parent 8e5a71e commit 54f802f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
matrix:
os: [ubuntu-latest]
php_version:
- 7.2
- 7.3
# - 7.2
# - 7.3
- 7.4
- 8.0
- 8.1
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
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
- name: Run phan
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/phan
Expand Down
3 changes: 2 additions & 1 deletion MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
{
$tokens = $phpcsFile->getTokens();

$line = $tokens[$stackPtr]['line'];
$line = $tokens[$stackPtr]['line'];
/** @var int|bool $prevLine */
$prevLine = false;
$prevPtr = $stackPtr;

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 @@ -381,6 +381,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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"source": "https://github.com/mayflower/mo4-coding-standard"
},
"require": {
"php": "~7.2 || ~8.0",
"php": "~7.4 || ~8.0",
"dealerdirect/phpcodesniffer-composer-installer": "~0.7 || ~1.0",
"escapestudios/symfony2-coding-standard": "^3.10.0",
"slevomat/coding-standard": "^8.14",
Expand All @@ -36,7 +36,7 @@
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "^7.5.20 || ^8.5.36 || ^9.6.15",
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^4.30"
"vimeo/psalm": "^5.26"
},
"config": {
"allow-plugins": {
Expand Down

0 comments on commit 54f802f

Please sign in to comment.