Skip to content

[10.x] Turn Enumerable unless() $callback parameter optional - #51701

Merged
taylorotwell merged 2 commits into
laravel:10.xfrom
faissaloux:fix-enumerable-unless
Jun 4, 2024
Merged

taylorotwell merged 2 commits into
laravel:10.xfrom
faissaloux:fix-enumerable-unless

Conversation

@faissaloux

@faissaloux faissaloux commented Jun 3, 2024 •

Copy link
Copy Markdown
Contributor

Helloo 👋🏻

This screenshot is an example among others from laravel/framework codebase where unless() is used with only one argument. implementing Enumerable this makes the intelephense complains about it expecting two arguments.

->unless($filter == null)

->unless($filter == null)

Screenshot from 2024-06-04 00-05-16

@faissaloux faissaloux changed the title Turn Enumerable unless() $callback parameter optional [10.x] Turn Enumerable unless() $callback parameter optional Jun 3, 2024
Comment thread src/Illuminate/Collections/Enumerable.php Outdated
@taylorotwell
taylorotwell merged commit 6de257e into laravel:10.x Jun 4, 2024
taylorotwell added a commit that referenced this pull request Jun 4, 2024
taylorotwell added a commit that referenced this pull request Jun 4, 2024
@faissaloux
faissaloux deleted the fix-enumerable-unless branch June 4, 2024 16:04
@faissaloux

Copy link
Copy Markdown
Contributor Author

Hey @taylorotwell, can I know why this was reverted!

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