File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,7 @@ services:
3232
3333parameters :
3434 specDir : ' spec/'
35+
36+ ignoreErrors :
37+ - '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\ (\ ) invoked with 2 parameters , 0-1 required. #'
38+ - '#Parameter \#1 \$event of method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\ (\ ) expects object , string given. #'
Original file line number Diff line number Diff line change @@ -60,12 +60,16 @@ public function afterTraverse(array $nodes)
6060 }
6161
6262 /**
63- * @param Node\Expr\ArrayItem[] $items
63+ * @param ( Node\Expr\ArrayItem|null) [] $items
6464 */
6565 private function resolveMatchers (array $ items ): void
6666 {
6767 // todo: maybe we can resolve custom matcher parameters count?
6868 foreach ($ items as $ item ) {
69+ if ($ item === null ) {
70+ continue ;
71+ }
72+
6973 if ($ item ->key instanceof Node \Scalar \String_) {
7074 CustomMatchersRegistry::addMatcher ($ this ->currentSpec , $ item ->key ->value );
7175 }
Original file line number Diff line number Diff line change 1111use PHPStan \Reflection \PropertyReflection ;
1212use PHPStan \TrinaryLogic ;
1313use PHPStan \Type \BooleanType ;
14+ use PHPStan \Type \Generic \TemplateTypeMap ;
1415use PHPStan \Type \ObjectType ;
1516use PHPStan \Type \Type ;
1617use PHPStan \Type \VerbosityLevel ;
@@ -131,6 +132,11 @@ public function getIterableValueType(): Type
131132 return $ this ->wrappedType ->getIterableValueType ();
132133 }
133134
135+ public function isArray (): TrinaryLogic
136+ {
137+ return $ this ->wrappedType ->isArray ();
138+ }
139+
134140 public function isOffsetAccessible (): TrinaryLogic
135141 {
136142 return $ this ->wrappedType ->isOffsetAccessible ();
@@ -196,6 +202,16 @@ public function toArray(): Type
196202 return $ this ->wrappedType ->toArray ();
197203 }
198204
205+ public function inferTemplateTypes (Type $ receivedType ): TemplateTypeMap
206+ {
207+ return $ this ->wrappedType ->inferTemplateTypes ($ receivedType );
208+ }
209+
210+ public function traverse (callable $ cb ): Type
211+ {
212+ return $ this ->wrappedType ->traverse ($ cb );
213+ }
214+
199215 public static function __set_state (array $ properties ): Type
200216 {
201217 return new self ($ properties ['wrappedType ' ]);
You can’t perform that action at this time.
0 commit comments