Skip to content

Commit

Permalink
#9974 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thbley committed Jul 26, 2023
1 parent 3d525cb commit 13d53ec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ private static function handleSetFetchMode(MethodReturnTypeProviderEvent $event)
$call_args = $event->getCallArgs();
$context = $event->getContext();

$context->references_in_scope['fetch_mode'] = null;
$context->references_in_scope['fetch_class'] = null;
unset($context->references_in_scope['fetch_mode']);
unset($context->references_in_scope['fetch_class']);

if (isset($call_args[0])
&& ($first_arg_type = $source->getNodeTypeProvider()->getType($call_args[0]->value))
&& $first_arg_type->isSingleIntLiteral()
) {
$context->references_in_scope['fetch_mode'] = $first_arg_type->getSingleIntLiteral()->value;
$context->references_in_scope['fetch_mode'] = (string) $first_arg_type->getSingleIntLiteral()->value;
}

if (isset($call_args[1])
Expand Down

0 comments on commit 13d53ec

Please sign in to comment.