Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix where method with multiple input types #211

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

PNixx
Copy link

@PNixx PNixx commented Dec 28, 2023

No description provided.

@PNixx PNixx changed the title Fix array where method with multiple input types Fix where method with multiple input types Dec 28, 2023
@PNixx
Copy link
Author

PNixx commented Jan 9, 2024

@sanmai can you merge it? This is fix for previous pull request #209

if (is_array($input)) {
switch (count($args)) {
case 1:
return array_values(array_filter($input, fn ($v) => !in_array($v[$args[0]] ?? null, [null, false], true)));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish this was a static method with an explanation.

Copy link
Author

Choose a reason for hiding this comment

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

You can find link in the description method

@sanmai sanmai merged commit c503efd into kalimatas:master Jan 9, 2024
7 checks passed
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.

2 participants