Skip to content

Commit 2b0db7c

Browse files
committed
Updated PHPStan
1 parent f6ab3f8 commit 2b0db7c

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

build.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
>
107107
<arg value="analyse"/>
108108
<arg value="--level"/>
109-
<arg value="7"/>
109+
<arg value="5"/>
110110
<arg path="src"/>
111111
<arg path="tests"/>
112112
</exec>

composer.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"consistence/coding-standard": "^3.5",
1010
"jakub-onderka/php-parallel-lint": "^0.9.2",
1111
"phing/phing": "^2.16.0",
12-
"phpstan/phpstan": "^0.10",
12+
"phpstan/phpstan": "^0.12",
1313
"phpunit/phpunit": "^6.3",
1414
"slevomat/coding-standard": "^4.7.2",
1515
"squizlabs/php_codesniffer": "^3.3.2",
@@ -25,5 +25,7 @@
2525
"branch-alias": {
2626
"dev-master": "0.4-dev"
2727
}
28-
}
28+
},
29+
"minimum-stability": "dev",
30+
"prefer-stable": true
2931
}

phpstan.neon

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#Unreachable statement - code above always terminates\.#'
5+
path: */src/Parser/PhpDocParser.php

src/Parser/PhpDocParser.php

+2
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ private function parseExtendsTagValue(string $tagName, TokenIterator $tokens): A
315315
case '@uses':
316316
return new Ast\PhpDoc\UsesTagValueNode($type, $description);
317317
}
318+
319+
throw new \PHPStan\ShouldNotHappenException();
318320
}
319321

320322
private function parseOptionalVariableName(TokenIterator $tokens): string

0 commit comments

Comments
 (0)