From 02944548a1a0023ac62fe100d7e9a64addb2e7cb Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 28 Jul 2015 15:35:03 +0930 Subject: [PATCH] Clean up --- src/Core/Model.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/Core/Model.php b/src/Core/Model.php index dfedd6f14..f141f5238 100755 --- a/src/Core/Model.php +++ b/src/Core/Model.php @@ -61,13 +61,9 @@ abstract class Model extends Eloquent */ public function can(User $actor, $action) { - $can = static::$dispatcher->until(new ModelAllow($this, $actor, $action)); + $allowed = static::$dispatcher->until(new ModelAllow($this, $actor, $action)); - if ($can !== null) { - return $can; - } - - return false; + return $allowed ?: false; } /**