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 issue #208 #209

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Fix issue #208 #209

merged 2 commits into from
Feb 6, 2024

Conversation

thomas-kl1
Copy link
Contributor

No description provided.

@thomas-kl1 thomas-kl1 mentioned this pull request Feb 5, 2024
@jissereitsma
Copy link
Collaborator

Good stuff. Few comments, though.

First of all, why did you add final to the functions? I've never thought about doing this and I'm not sure whether it has a performance benefit. The only benefit is that it prevents from binding the outer object (closure-principle) or binding things explicitly. But both things are not at hand in this case. Perhaps I'm missing something.

I definitely like the additions of the messages in exceptions.

As for "the loading in the loop" comment, it is not applicable. Using the method addCategoryIds() multiple times actually does not do anything yet, because the method is designed to be called before the actual loading takes place.

So apart from the final question above, all is good to be merged!

@thomas-kl1
Copy link
Contributor Author

Not "final" but "static", it's optimization for anonymous function when $this bind is not needed. It's common fine tuning

You may fine more information https://www.php.net/manual/en/functions.anonymous.php or in any blog post that explains it better than I could 😅

@jissereitsma jissereitsma merged commit 8e243e7 into yireo:master Feb 6, 2024
1 check failed
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