File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 },
2020 "require-dev" : {
2121 "friendsofphp/php-cs-fixer" : " ^3.53" ,
22+ "phpstan/extension-installer" : " ^1.3" ,
23+ "phpstan/phpstan" : " ^1.10" ,
24+ "phpstan/phpstan-strict-rules" : " ^1.5" ,
2225 "phpunit/phpunit" : " ^10.5" ,
2326 "rector/rector" : " ^1.0" ,
24- "symfony/var-dumper" : " ^5.6|^6.0|^7.0" ,
25- "type-lang/printer" : " ^1.0" ,
26- "vimeo/psalm" : " ^5.23"
27+ "symfony/var-dumper" : " ^5.4|^6.0|^7.0" ,
28+ "type-lang/printer" : " ^1.0"
2729 },
2830 "autoload-dev" : {
2931 "psr-4" : {
4345 "optimize-autoloader" : true ,
4446 "preferred-install" : {
4547 "*" : " dist"
48+ },
49+ "allow-plugins" : {
50+ "phpstan/extension-installer" : true
4651 }
4752 },
4853 "scripts" : {
5358 "test:functional" : " phpunit --testsuite=functional" ,
5459
5560 "linter" : " @linter:check" ,
56- "linter:check" : " psalm --no-cache " ,
57- "linter:fix " : " psalm --no-cache --alter " ,
61+ "linter:check" : " phpstan analyse --configuration phpstan.neon " ,
62+ "linter:baseline " : " phpstan analyse --configuration phpstan.neon --generate-baseline " ,
5863
5964 "phpcs" : " @phpcs:check" ,
6065 "phpcs:check" : " php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --dry-run --verbose --diff" ,
Original file line number Diff line number Diff line change 1+ includes :
2+ - phar://phpstan.phar/conf/bleedingEdge.neon
3+ parameters :
4+ level : 9
5+ strictRules :
6+ allRules : true
7+ fileExtensions :
8+ - php
9+ paths :
10+ - src
11+ tmpDir : vendor/.cache.phpstan
12+ reportUnmatchedIgnoredErrors : false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -110,7 +110,10 @@ private function convertNamedType(\ReflectionNamedType $type): TypeStatement
110110
111111 private function convertNonNullNamedType (\ReflectionNamedType $ type ): TypeStatement
112112 {
113- $ identifier = new Identifier ($ type ->getName ());
113+ /** @var non-empty-string $name */
114+ $ name = $ type ->getName ();
115+
116+ $ identifier = new Identifier ($ name );
114117
115118 if ($ type ->isBuiltin () || $ identifier ->isSpecial () || $ identifier ->isBuiltin ()) {
116119 return new NamedTypeNode (new Name ($ identifier ));
@@ -121,6 +124,7 @@ private function convertNonNullNamedType(\ReflectionNamedType $type): TypeStatem
121124
122125 /**
123126 * @throws ReaderExceptionInterface
127+ * @return UnionTypeNode<TypeStatement>
124128 */
125129 private function convertUnionType (\ReflectionUnionType $ type ): UnionTypeNode
126130 {
@@ -135,6 +139,7 @@ private function convertUnionType(\ReflectionUnionType $type): UnionTypeNode
135139
136140 /**
137141 * @throws ReaderExceptionInterface
142+ * @return IntersectionTypeNode<TypeStatement>
138143 */
139144 private function convertIntersectionType (\ReflectionIntersectionType $ type ): IntersectionTypeNode
140145 {
You can’t perform that action at this time.
0 commit comments