Skip to content

Commit d7c9128

Browse files
authored
Fix psalm and mutants (#650)
1 parent 51e1ac2 commit d7c9128

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"rector/rector": "^0.19.0",
4545
"roave/infection-static-analysis-plugin": "^1.25",
4646
"spatie/phpunit-watcher": "^1.23",
47-
"vimeo/psalm": "^5.0",
47+
"vimeo/psalm": "^5.20",
4848
"yiisoft/di": "^1.2",
4949
"yiisoft/test-support": "^3.0",
5050
"yiisoft/translator-message-php": "^1.1",

infection.json.dist

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"@default": true,
1515
"global-ignoreSourceCodeByRegex": [
1616
".*bool \\$useCache = true.*"
17-
]
17+
],
18+
"LogicalAndSingleSubExprNegation": {
19+
"ignoreSourceCodeByRegex": [
20+
".*if \\(\\$enableIdn .*"
21+
]
22+
}
1823
}
1924
}

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
</projectFiles>
1616
<issueHandlers>
1717
<MixedAssignment errorLevel="suppress" />
18+
<RiskyTruthyFalsyComparison errorLevel="suppress" />
1819
</issueHandlers>
1920
</psalm>

tests/Rule/RegexTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function dataValidationFailed(): array
9595
[null, [new Regex('/a/', not: true)], ['' => [$incorrectInputMessage]]],
9696
[new stdClass(), [new Regex('/a/')], ['' => [$incorrectInputMessage]]],
9797
[new stdClass(), [new Regex('/a/', not: true)], ['' => [$incorrectInputMessage]]],
98+
'not' => ['a', [new Regex('/a/', not: true)], ['' => [$message]]],
9899
'custom incorrect input message' => [
99100
null,
100101
[new Regex('/a/', incorrectInputMessage: 'Custom incorrect input message.')],

0 commit comments

Comments
 (0)