Skip to content

Commit 7c4ba8c

Browse files
authored
PHPStan cleanup (#998)
1 parent 9700f5a commit 7c4ba8c

File tree

5 files changed

+3
-52
lines changed

5 files changed

+3
-52
lines changed

.dev-tools/phpstan.neon

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,12 @@ includes:
55
parameters:
66
bootstrapFiles:
77
- ../vendor/autoload.php
8-
ignoreErrors:
9-
-
10-
message: '#^Comparison operation "\>\=" between int\<80400, 80499\> and 80000 is always true\.$#'
11-
identifier: greaterOrEqual.alwaysTrue
12-
count: 1
13-
path: ../src/Fixer/PromotedConstructorPropertyFixer.php
14-
15-
-
16-
message: '#^Comparison operation "\>\=" between int\<80400, 80499\> and 80000 is always true\.$#'
17-
identifier: greaterOrEqual.alwaysTrue
18-
count: 1
19-
path: ../src/Fixer/StringableInterfaceFixer.php
208
level: max
219
paths:
2210
- ../src
2311
- ../tests
2412
- ../bootstrap.php
2513
reportMaybesInMethodSignatures: false
26-
stubFiles:
27-
- ./sca.stub
2814
treatPhpDocTypesAsCertain: false
2915
type_coverage:
3016
declare: 100

.dev-tools/sca.stub

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/Fixer/NoDuplicatedImportsFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ private function removeUseDeclaration(Tokens $tokens, NamespaceUseAnalysis $useD
8080
Tokens $tokens,
8181
NamespaceUseAnalysis $useDeclaration
8282
): void {
83+
// @phpstan-ignore method.private
8384
$noUnusedImportsFixer->removeUseDeclaration($tokens, $useDeclaration);
8485
};
8586

src/Fixer/PromotedConstructorPropertyFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function getPriority(): int
9393

9494
public function isCandidate(Tokens $tokens): bool
9595
{
96+
// @phpstan-ignore greaterOrEqual.alwaysTrue
9697
return \PHP_VERSION_ID >= 80000 && $tokens->isAllTokenKindsFound([\T_CLASS, \T_VARIABLE]);
9798
}
9899

src/Fixer/StringableInterfaceFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function getPriority(): int
4646

4747
public function isCandidate(Tokens $tokens): bool
4848
{
49+
// @phpstan-ignore greaterOrEqual.alwaysTrue
4950
return \PHP_VERSION_ID >= 80000 && $tokens->isAllTokenKindsFound([\T_CLASS, \T_STRING]);
5051
}
5152

0 commit comments

Comments
 (0)