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

[8.x] Remove redundant unreachable return statements #35053

Merged
merged 1 commit into from
Nov 1, 2020
Merged

[8.x] Remove redundant unreachable return statements #35053

merged 1 commit into from
Nov 1, 2020

Conversation

Ayesh
Copy link
Contributor

@Ayesh Ayesh commented Nov 1, 2020

Removes a couple of return statements where the statements above always return, thus making the removed return calls pratically dead code.

  • \Illuminate\Cache\DatabaseStore::add
  • \Illuminate\Database\Console\Migrations\ResetCommand::handle

Both functions above contain other unconditional return statements, effectively making the return call this commit removes has no impact.

Removes a couple of `return` statements where the statements above always `return`, thus making the removed `return` calls pratically dead code.

 - `\Illuminate\Cache\DatabaseStore::add`
 - `\Illuminate\Database\Console\Migrations\ResetCommand::handle`

Both functions above contain other unconditional `return` statements, effectively making the `return` call this commit removes has no impact.
@Ayesh Ayesh changed the title Remove redundant unreachable return statements [8.x] Remove redundant unreachable return statements Nov 1, 2020
@taylorotwell taylorotwell merged commit 00a25a1 into laravel:8.x Nov 1, 2020
@Ayesh Ayesh deleted the optimize/redundant-redundant-return-return branch November 2, 2020 05:47
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