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 203203 <PossiblyUndefinedMethod occurrences =" 1" >
204204 <code >toString</code >
205205 </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" >
210207 <code >assert($node-> namespacedName instanceof Name)</code >
211208 <code >assert($node-> namespacedName instanceof Name)</code >
212209 <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
106106 return $ this ->functions ;
107107 }
108108
109- /**
110- * @psalm-param ClassMethod|Function_ $node
111- */
112- private function cyclomaticComplexity (Node $ node ): int
109+ private function cyclomaticComplexity (ClassMethod |Function_ $ node ): int
113110 {
114- assert ($ node instanceof ClassMethod || $ node instanceof Function_);
115-
116111 $ nodes = $ node ->getStmts ();
117112
118113 if ($ nodes === null ) {
@@ -131,13 +126,8 @@ private function cyclomaticComplexity(Node $node): int
131126 return $ cyclomaticComplexityCalculatingVisitor ->cyclomaticComplexity ();
132127 }
133128
134- /**
135- * @psalm-param ClassMethod|Function_ $node
136- */
137- private function signature (Node $ node ): string
129+ private function signature (ClassMethod |Function_ $ node ): string
138130 {
139- assert ($ node instanceof ClassMethod || $ node instanceof Function_);
140-
141131 $ signature = ($ node ->returnsByRef () ? '& ' : '' ) . $ node ->name ->toString () . '( ' ;
142132 $ parameters = [];
143133
@@ -168,13 +158,8 @@ private function signature(Node $node): string
168158 return $ signature ;
169159 }
170160
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
175162 {
176- assert ($ type instanceof Identifier || $ type instanceof Name || $ type instanceof ComplexType);
177-
178163 if ($ type instanceof NullableType) {
179164 return '? ' . $ type ->type ;
180165 }
You can’t perform that action at this time.
0 commit comments