Skip to content

Commit 54f802f

Browse files
committed
Update Psalm to 5.x
1 parent 8e5a71e commit 54f802f

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
matrix:
4141
os: [ubuntu-latest]
4242
php_version:
43-
- 7.2
44-
- 7.3
43+
# - 7.2
44+
# - 7.3
4545
- 7.4
4646
- 8.0
4747
- 8.1
@@ -93,7 +93,7 @@ jobs:
9393
run: vendor/bin/phpstan analyse --no-progress
9494
- name: Run psalm
9595
if: ${{ matrix.os != 'windows-latest' }}
96-
run: vendor/bin/psalm --show-info=true
96+
run: vendor/bin/psalm
9797
- name: Run phan
9898
if: ${{ matrix.os != 'windows-latest' }}
9999
run: vendor/bin/phan

MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
292292
{
293293
$tokens = $phpcsFile->getTokens();
294294

295-
$line = $tokens[$stackPtr]['line'];
295+
$line = $tokens[$stackPtr]['line'];
296+
/** @var int|bool $prevLine */
296297
$prevLine = false;
297298
$prevPtr = $stackPtr;
298299

MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php

+1
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s
381381
if (true === $isDocBlock) {
382382
$tokens = $phpcsFile->getTokens();
383383
$oldContent = $tokens[$startPtr]['content'];
384+
/** @var string $newContent */
384385
$newContent = \str_replace($className, $replacement, $oldContent);
385386
$phpcsFile->fixer->replaceToken($startPtr, $newContent);
386387
} else {

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"source": "https://github.com/mayflower/mo4-coding-standard"
2424
},
2525
"require": {
26-
"php": "~7.2 || ~8.0",
26+
"php": "~7.4 || ~8.0",
2727
"dealerdirect/phpcodesniffer-composer-installer": "~0.7 || ~1.0",
2828
"escapestudios/symfony2-coding-standard": "^3.10.0",
2929
"slevomat/coding-standard": "^8.14",
@@ -36,7 +36,7 @@
3636
"phpstan/phpstan-strict-rules": "^1.6",
3737
"phpunit/phpunit": "^7.5.20 || ^8.5.36 || ^9.6.15",
3838
"psalm/plugin-phpunit": "^0.18",
39-
"vimeo/psalm": "^4.30"
39+
"vimeo/psalm": "^5.26"
4040
},
4141
"config": {
4242
"allow-plugins": {

0 commit comments

Comments
 (0)