Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Dec 13, 2024
1 parent d31baf5 commit ec7a503
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ jobs:
matrix:
os: [ubuntu-latest]
php_version:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- 8.4
# - 8.4
dependencies_level:
- --prefer-lowest
- ""
Expand Down Expand Up @@ -94,7 +92,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
1 change: 1 addition & 0 deletions MO4/Sniffs/Formatting/AlphabeticalUseStatementsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ private function findNewDestination(File $phpcsFile, int $stackPtr, string $impo
$tokens = $phpcsFile->getTokens();

$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 @@ -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
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.0",
"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
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ parameters:
paths:
- %rootDir%/../../../MO4
- %rootDir%/../../../tests
checkMissingIterableValueType: false
ignoreErrors:
- identifier: missingType.iterableValue
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon

0 comments on commit ec7a503

Please sign in to comment.