@@ -102,8 +102,9 @@ |
||
102 | 102 | */ |
103 | 103 | public function before($user, $ability) |
104 | 104 | { |
105 | - if ($user->isAdmin()) |
|
106 | - return true; |
|
105 | + if ($user->isAdmin()) { |
|
106 | + return true; |
|
107 | + } |
|
107 | 108 | } |
108 | 109 | |
109 | 110 | } |
@@ -16,8 +16,9 @@ |
||
16 | 16 | { |
17 | 17 | public function isOwner(?Ownable $model){ |
18 | 18 | |
19 | - if($model === null) |
|
20 | - throw new NotFoundHttpException("Could not found resouce."); |
|
19 | + if($model === null) { |
|
20 | + throw new NotFoundHttpException("Could not found resouce."); |
|
21 | + } |
|
21 | 22 | |
22 | 23 | $this->authorize('access', $model); |
23 | 24 | } |