File tree Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change 203
203
<PossiblyUndefinedMethod occurrences =" 1" >
204
204
<code >toString</code >
205
205
</PossiblyUndefinedMethod >
206
- <RedundantConditionGivenDocblockType occurrences =" 13" >
207
- <code >$node instanceof Function_</code >
208
- <code >$node instanceof Function_</code >
209
- <code >$type instanceof ComplexType</code >
206
+ <RedundantConditionGivenDocblockType occurrences =" 10" >
210
207
<code >assert($node-> namespacedName instanceof Name)</code >
211
208
<code >assert($node-> namespacedName instanceof Name)</code >
212
209
<code >assert($node-> namespacedName instanceof Name)</code >
Original file line number Diff line number Diff line change @@ -106,13 +106,8 @@ public function functions(): array
106
106
return $ this ->functions ;
107
107
}
108
108
109
- /**
110
- * @psalm-param ClassMethod|Function_ $node
111
- */
112
- private function cyclomaticComplexity (Node $ node ): int
109
+ private function cyclomaticComplexity (ClassMethod |Function_ $ node ): int
113
110
{
114
- assert ($ node instanceof ClassMethod || $ node instanceof Function_);
115
-
116
111
$ nodes = $ node ->getStmts ();
117
112
118
113
if ($ nodes === null ) {
@@ -131,13 +126,8 @@ private function cyclomaticComplexity(Node $node): int
131
126
return $ cyclomaticComplexityCalculatingVisitor ->cyclomaticComplexity ();
132
127
}
133
128
134
- /**
135
- * @psalm-param ClassMethod|Function_ $node
136
- */
137
- private function signature (Node $ node ): string
129
+ private function signature (ClassMethod |Function_ $ node ): string
138
130
{
139
- assert ($ node instanceof ClassMethod || $ node instanceof Function_);
140
-
141
131
$ signature = ($ node ->returnsByRef () ? '& ' : '' ) . $ node ->name ->toString () . '( ' ;
142
132
$ parameters = [];
143
133
@@ -168,13 +158,8 @@ private function signature(Node $node): string
168
158
return $ signature ;
169
159
}
170
160
171
- /**
172
- * @psalm-param Identifier|Name|ComplexType $type
173
- */
174
- private function type (Node $ type ): string
161
+ private function type (Identifier |Name |ComplexType $ type ): string
175
162
{
176
- assert ($ type instanceof Identifier || $ type instanceof Name || $ type instanceof ComplexType);
177
-
178
163
if ($ type instanceof NullableType) {
179
164
return '? ' . $ type ->type ;
180
165
}
You can’t perform that action at this time.
0 commit comments