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

[5.7] Remove unecessary ternary #26137

Merged
merged 1 commit into from
Oct 17, 2018
Merged

[5.7] Remove unecessary ternary #26137

merged 1 commit into from
Oct 17, 2018

Conversation

carusogabriel
Copy link
Contributor

The result of a == comparison is always true or false, so there's no needed for the ternary.

@@ -299,7 +299,7 @@ public function test_after_callbacks_do_not_override_each_other()
$gate = $this->getBasicGate();

$gate->after(function ($user, $ability, $result) {
return $ability == 'allow' ? true : false;
return $ability == 'allow';
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why not === ?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for ===

Copy link
Contributor

Choose a reason for hiding this comment

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

@taylorotwell taylorotwell merged commit 4ffd088 into laravel:5.7 Oct 17, 2018
@carusogabriel carusogabriel deleted the patch-2 branch October 17, 2018 08:27
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