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

Remove explicit condition that is always true #4731

Merged
merged 1 commit into from
May 24, 2021

Conversation

jeromegamez
Copy link
Contributor

The relevant part is in the excerpt() function, the rest was automatically applied by phpcbf.

The condition previously was

if (isset($phrase)) {
    // ...
} elseif (!isset($phrase)) {
    // ...
}

Replacing the second elseif with just else also removes the need to ignore the following lines with PHPStan 🥳

:octocat:

@samsonasik samsonasik merged commit 5c6f396 into codeigniter4:develop May 24, 2021
@samsonasik
Copy link
Member

Thank you @jeromegamez

@jeromegamez jeromegamez deleted the always-true branch May 24, 2021 11:33
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