Skip to content

Conversation

ondrejmirtes
Copy link
Member

No description provided.

if (self::accepts($innerType, $acceptedType, $strictTypes)) {
return true;
}
$results[] = self::innerAccepts($innerType, $acceptedType, $strictTypes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it might make sense to use lazyOr so it may early exit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or you just return from within the loop on YES)

@ondrejmirtes ondrejmirtes marked this pull request as ready for review December 20, 2022 22:11
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 7922d30 into 1.9.x Dec 20, 2022
@ondrejmirtes ondrejmirtes deleted the dumb-down-arrays branch December 20, 2022 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants