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: Do not attempt to return something from methods that do not return anything #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

localheinz
Copy link
Contributor

This pull request

  • stops attempting to return something from methods that do not return anything

@valorin
Copy link
Owner

valorin commented Jan 3, 2024

I'm going to leave this one open for a bit and think about it.

I've fixed the second return in the main branch, it's completely redundant (it was an artifact of extracting the method in PhpStorm I think), but I actually prefer the

if (condition) {
    return doSomething;
}

style much more than breaking out the return into a separate line. I find it adds unnecessary visual noise. But I do understand the argument that it's returning something where there is nothing to return.

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