From 864df225c266fca6056409c0a41bdfffa01489e1 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 28 Jul 2015 15:35:03 +0930 Subject: [PATCH] Clean up --- framework/core/src/Core/Model.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/framework/core/src/Core/Model.php b/framework/core/src/Core/Model.php index dfedd6f14..f141f5238 100755 --- a/framework/core/src/Core/Model.php +++ b/framework/core/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; } /**