Skip to content

Commit e2736d5

Browse files
committed
phpstan improvements
1 parent 4abbdf9 commit e2736d5

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

phpstan-baseline.neon

+5-5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ parameters:
190190
count: 1
191191
path: src/Parser/Node/DocBlockNode.php
192192

193+
-
194+
message: "#^Call to an undefined method PhpParser\\\\Node\\\\ComplexType\\|PhpParser\\\\Node\\\\Identifier\\|PhpParser\\\\Node\\\\Name\\:\\:__toString\\(\\)\\.$#"
195+
count: 1
196+
path: src/Parser/NodeVisitor.php
197+
193198
-
194199
message: "#^Call to an undefined method PhpParser\\\\Node\\\\Identifier\\|PhpParser\\\\Node\\\\IntersectionType\\|PhpParser\\\\Node\\\\Name\\:\\:__toString\\(\\)\\.$#"
195200
count: 1
@@ -305,11 +310,6 @@ parameters:
305310
count: 1
306311
path: src/Parser/NodeVisitor.php
307312

308-
-
309-
message: "#^Parameter \\#1 \\$type of method Doctum\\\\Parser\\\\NodeVisitor\\:\\:typeToString\\(\\) expects PhpParser\\\\Node\\\\Identifier\\|PhpParser\\\\Node\\\\Name\\|PhpParser\\\\Node\\\\NullableType\\|PhpParser\\\\Node\\\\UnionType\\|null, PhpParser\\\\Node\\\\ComplexType\\|PhpParser\\\\Node\\\\Identifier\\|PhpParser\\\\Node\\\\Name\\|null given\\.$#"
310-
count: 4
311-
path: src/Parser/NodeVisitor.php
312-
313313
-
314314
message: "#^Property Doctum\\\\Parser\\\\NodeVisitor\\:\\:\\$context has no type specified\\.$#"
315315
count: 1

phpstan.neon.dist

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ parameters:
88
- tests/phar/data/*
99
- scripts/generate-twig-cache.php
1010
- scripts/update-po-files.php
11+
- scripts/phar-utils-timestamps.php
12+
- scripts/phar-generator-script.php
1113
paths:
1214
- src/
1315
- scripts/

src/Parser/NodeVisitor.php

+3
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ protected function addMethod(ClassMethodNode $node)
353353
}
354354
}
355355

356+
/**
357+
* @param FunctionReflection|MethodReflection|PropertyReflection $methodOrFunctionOrProperty
358+
*/
356359
protected function addTagFromCommentToMethod(
357360
string $tagName,
358361
DocBlockNode $comment,

0 commit comments

Comments
 (0)