@@ -52,6 +52,7 @@ public function __construct(ReflectionClass $class, \ReflectionMethod $r, $names
52
52
$ classNamespace = $ class ->getNamespace ();
53
53
54
54
// Determine namespace
55
+ /** @psalm-suppress RiskyTruthyFalsyComparison */
55
56
if (! empty ($ namespace )) {
56
57
$ this ->setNamespace ($ namespace );
57
58
} elseif (! empty ($ classNamespace )) {
@@ -62,6 +63,7 @@ public function __construct(ReflectionClass $class, \ReflectionMethod $r, $names
62
63
$ this ->argv = $ argv ;
63
64
64
65
// If method call, need to store some info on the class
66
+ /** @psalm-suppress MixedAssignment */
65
67
$ this ->class = $ class ->getName ();
66
68
$ this ->name = $ r ->getName ();
67
69
@@ -89,11 +91,13 @@ public function getDeclaringClass()
89
91
*/
90
92
public function __wakeup ()
91
93
{
94
+ /** @psalm-suppress ArgumentTypeCoercion */
92
95
$ this ->classReflection = new ReflectionClass (
93
96
new \ReflectionClass ($ this ->class ),
94
97
$ this ->getNamespace (),
95
98
$ this ->getInvokeArguments ()
96
99
);
100
+ /** @psalm-suppress MixedArgument */
97
101
$ this ->reflection = new \ReflectionMethod ($ this ->classReflection ->getName (), $ this ->name );
98
102
}
99
103
@@ -123,7 +127,9 @@ private function fetchRecursiveDocComment()
123
127
$ docCommentList [] = $ this ->reflection ->getDocComment ();
124
128
125
129
// fetch all doc blocks for method from parent classes
130
+ /** @psalm-suppress PossiblyInvalidArgument */
126
131
$ docCommentFetched = $ this ->fetchRecursiveDocBlockFromParent ($ this ->classReflection , $ currentMethodName );
132
+ /** @psalm-suppress RiskyTruthyFalsyComparison */
127
133
if ($ docCommentFetched ) {
128
134
$ docCommentList = array_merge ($ docCommentList , $ docCommentFetched );
129
135
}
@@ -148,6 +154,7 @@ function ($docComment) {
148
154
$ docCommentList
149
155
);
150
156
157
+ /** @psalm-suppress InvalidArgument */
151
158
return '/** ' . implode (PHP_EOL , $ normalizedDocCommentList ) . '*/ ' ;
152
159
}
153
160
@@ -174,6 +181,7 @@ private function fetchRecursiveDocBlockFromParent($reflectionClass, $methodName)
174
181
$ docCommentLast = $ methodReflection ->getDocComment ();
175
182
$ docComment [] = $ docCommentLast ;
176
183
if ($ this ->isInherit ($ docCommentLast )) {
184
+ /** @psalm-suppress RiskyTruthyFalsyComparison */
177
185
if ($ docCommentFetched = $ this ->fetchRecursiveDocBlockFromParent ($ parentReflectionClass , $ methodName )) {
178
186
$ docComment = array_merge ($ docComment , $ docCommentFetched );
179
187
}
0 commit comments