You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnsprintf('%s, mismatching type-hints for parameter %s. PHP type hint is "array" and docblock type hint is %s.', $this->getContext($context), $context->getName(), (string)$docblockTypehint);
191
193
} else {
192
194
returnsprintf('%s, mismatching type-hints for return type. PHP type hint is "array" and docblock declared return type is %s.', $this->getContext($context), (string)$docblockTypehint);
193
195
}
194
196
}
195
197
196
-
if ($docblockTypehint->getValueType() instanceof Mixed_) {
198
+
if ($docblockTypehintinstanceof Array_ && $docblockTypehint->getValueType() instanceof Mixed_) {
197
199
if (!$this->findExplicitMixedArray($context)) {
198
200
if ($contextinstanceof ReflectionParameter) {
199
201
returnsprintf('%s, parameter $%s type is "array". Please provide a more specific @param annotation in the docblock. For instance: @param int[] $%s. Use @param mixed[] $%s if this is really an array of mixed values.', $this->getContext($context), $context->getName(), $context->getName(), $context->getName());
@@ -208,6 +210,27 @@ private function analyzeWithTypehint($context, Type $phpTypeHint, array $docBloc
0 commit comments