Skip to content

[5.8] Simplify isset()#29581

Merged
taylorotwell merged 2 commits intolaravel:5.8from
fitv:simplify-isset
Aug 15, 2019
Merged

[5.8] Simplify isset()#29581
taylorotwell merged 2 commits intolaravel:5.8from
fitv:simplify-isset

Conversation

@fitv
Copy link
Copy Markdown
Contributor

@fitv fitv commented Aug 15, 2019

Simplify isset().

} else {
if (empty($config['port'])) {
return $config['host'];
} else {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else statement could be removed because of early return:

if (empty($config['port'])) {
    return $config['host'];
}

return $config['host'].$separator.$config['port'];

@taylorotwell taylorotwell merged commit 51a0ad1 into laravel:5.8 Aug 15, 2019
@fitv fitv deleted the simplify-isset branch August 16, 2019 00:58
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.

4 participants