Skip to content

Commit 7d5f9ee

Browse files
committed
Update psalm to 6.x and minimum PHP to 8.1
1 parent e0b6f10 commit 7d5f9ee

11 files changed

+26
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,10 @@ jobs:
4040
matrix:
4141
os: [ubuntu-latest]
4242
php_version:
43-
- 7.2
44-
- 7.3
45-
- 7.4
46-
- 8.0
4743
- 8.1
4844
- 8.2
4945
- 8.3
46+
- 8.4
5047
dependencies_level:
5148
- --prefer-lowest
5249
- ""
@@ -90,7 +87,7 @@ jobs:
9087
run: vendor/bin/phpstan analyse --no-progress
9188
- name: Run psalm
9289
if: ${{ matrix.os != 'windows-latest' }}
93-
run: vendor/bin/psalm --show-info=true
90+
run: vendor/bin/psalm
9491
- name: Run phan
9592
if: ${{ matrix.os != 'windows-latest' }}
9693
run: vendor/bin/phan

MO4/Library/PregLibrary.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public static function MO4PregSplit(string $pattern, string $subject, int $limit
4343
{
4444
$pregSplitResult = \preg_split($pattern, $subject, $limit, $flags);
4545

46-
// @phan-suppress-next-line PhanTypeComparisonToArray
4746
if (false === $pregSplitResult) {
4847
throw new RuntimeException('Unexpected Error in MO4 Coding Standard.');
4948
}

MO4/Sniffs/Arrays/ArrayDoubleArrowAlignmentSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
* @license http://spdx.org/licenses/MIT MIT License
3131
*
3232
* @link https://github.com/mayflower/mo4-coding-standard
33+
*
34+
* @psalm-api
3335
*/
3436
class ArrayDoubleArrowAlignmentSniff implements Sniff
3537
{

MO4/Sniffs/Arrays/MultiLineArraySniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* @license http://spdx.org/licenses/MIT MIT License
2828
*
2929
* @link https://github.com/mayflower/mo4-coding-standard
30+
*
31+
* @psalm-api
3032
*/
3133
class MultiLineArraySniff implements Sniff
3234
{

MO4/Sniffs/Commenting/PropertyCommentSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
* @license http://spdx.org/licenses/MIT MIT License
3333
*
3434
* @link https://github.com/mayflower/mo4-coding-standard
35+
*
36+
* @psalm-api
3537
*/
3638
class PropertyCommentSniff extends AbstractScopeSniff
3739
{

MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
* @license http://spdx.org/licenses/MIT MIT License
3434
*
3535
* @link https://github.com/mayflower/mo4-coding-standard
36+
*
37+
* @psalm-api
3638
*/
3739
class AlphabeticalUseStatementsSniff extends UseDeclarationSniff
3840
{
@@ -292,7 +294,8 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
292294
{
293295
$tokens = $phpcsFile->getTokens();
294296

295-
$line = $tokens[$stackPtr]['line'];
297+
$line = $tokens[$stackPtr]['line'];
298+
/** @var int|bool $prevLine */
296299
$prevLine = false;
297300
$prevPtr = $stackPtr;
298301

MO4/Sniffs/Formatting/UnnecessaryNamespaceUsageSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
* @license http://spdx.org/licenses/MIT MIT License
3535
*
3636
* @link https://github.com/mayflower/mo4-coding-standard
37+
*
38+
* @psalm-api
3739
*/
3840
class UnnecessaryNamespaceUsageSniff implements Sniff
3941
{
@@ -381,6 +383,7 @@ private function checkShorthandPossible(File $phpcsFile, array $useStatements, s
381383
if (true === $isDocBlock) {
382384
$tokens = $phpcsFile->getTokens();
383385
$oldContent = $tokens[$startPtr]['content'];
386+
/** @var string $newContent */
384387
$newContent = \str_replace($className, $replacement, $oldContent);
385388
$phpcsFile->fixer->replaceToken($startPtr, $newContent);
386389
} else {

MO4/Sniffs/Strings/VariableInDoubleQuotedStringSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
* @license http://spdx.org/licenses/MIT MIT License
3030
*
3131
* @link https://github.com/mayflower/mo4-coding-standard
32+
*
33+
* @psalm-api
3234
*/
3335
class VariableInDoubleQuotedStringSniff implements Sniff
3436
{

MO4/Sniffs/WhiteSpace/ConstantSpacingSniff.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* @license http://spdx.org/licenses/MIT MIT License
2828
*
2929
* @link https://github.com/mayflower/mo4-coding-standard
30+
*
31+
* @psalm-api
3032
*/
3133
class ConstantSpacingSniff implements Sniff
3234
{

MO4/Sniffs/WhiteSpace/MultipleEmptyLinesSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
use PHP_CodeSniffer\Files\File;
1414
use PHP_CodeSniffer\Sniffs\Sniff;
1515

16+
/**
17+
* @psalm-api
18+
*/
1619
class MultipleEmptyLinesSniff implements Sniff
1720
{
1821
/**

0 commit comments

Comments
 (0)