Skip to content

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