@@ -20,8 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct($model = null) |
22 | 22 | { |
23 | - if (isset($model)) |
|
24 | - $this->model = $model; |
|
23 | + if (isset($model)) { |
|
24 | + $this->model = $model; |
|
25 | + } |
|
25 | 26 | } |
26 | 27 | |
27 | 28 | /** |
@@ -20,8 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct($model = null) |
22 | 22 | { |
23 | - if (isset($model)) |
|
24 | - $this->model = $model; |
|
23 | + if (isset($model)) { |
|
24 | + $this->model = $model; |
|
25 | + } |
|
25 | 26 | } |
26 | 27 | |
27 | 28 | /** |
@@ -17,8 +17,9 @@ |
||
17 | 17 | */ |
18 | 18 | public function handle($request, Closure $next) |
19 | 19 | { |
20 | - if (config('jlourenco.base.VisitCounter')) |
|
21 | - Base::RegisterVisit(); |
|
20 | + if (config('jlourenco.base.VisitCounter')) { |
|
21 | + Base::RegisterVisit(); |
|
22 | + } |
|
22 | 23 | |
23 | 24 | return $next($request); |
24 | 25 | } |
@@ -20,10 +20,11 @@ |
||
20 | 20 | { |
21 | 21 | if ($user->force_new_password) |
22 | 22 | { |
23 | - if ($request->ajax()) |
|
24 | - return response('New password is required. Login into the website.', 401); |
|
25 | - else |
|
26 | - return Redirect::route('change-password'); |
|
23 | + if ($request->ajax()) { |
|
24 | + return response('New password is required. Login into the website.', 401); |
|
25 | + } else { |
|
26 | + return Redirect::route('change-password'); |
|
27 | + } |
|
27 | 28 | } |
28 | 29 | } |
29 | 30 | return $next($request); |
@@ -35,10 +35,11 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function getCreatedByAttribute($value) |
37 | 37 | { |
38 | - if ($value > 0) |
|
39 | - if ($user = Sentinel::findUserById($value)) |
|
38 | + if ($value > 0) { |
|
39 | + if ($user = Sentinel::findUserById($value)) |
|
40 | 40 | if ($user != null) |
41 | 41 | return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
42 | + } |
|
42 | 43 | |
43 | 44 | return $value; |
44 | 45 | } |
@@ -51,10 +52,11 @@ discard block |
||
51 | 52 | */ |
52 | 53 | public function getTargetAttribute($value) |
53 | 54 | { |
54 | - if ($value > 0) |
|
55 | - if ($user = Sentinel::findUserById($value)) |
|
55 | + if ($value > 0) { |
|
56 | + if ($user = Sentinel::findUserById($value)) |
|
56 | 57 | if ($user != null) |
57 | 58 | return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')'; |
59 | + } |
|
58 | 60 | |
59 | 61 | return $value; |
60 | 62 | } |
@@ -226,9 +226,10 @@ |
||
226 | 226 | { |
227 | 227 | $target = null; |
228 | 228 | |
229 | - if ($user = Sentinel::getUser()) |
|
230 | - if ($user != null) |
|
231 | - $target = $user->id; |
|
229 | + if ($user = Sentinel::getUser()) { |
|
230 | + if ($user != null) |
|
231 | + $target = $user->id; |
|
232 | + } |
|
232 | 233 | |
233 | 234 | $log = $this->getLogsRepository()->create(['log' => $logMessage, 'ip' => Request::ip(), 'target' => $target]); |
234 | 235 | } |
@@ -71,8 +71,9 @@ discard block |
||
71 | 71 | ], 'routes'); |
72 | 72 | |
73 | 73 | // Include the routes file |
74 | - if(file_exists(base_path("app/Http/base_routes.php"))) |
|
75 | - include base_path("app/Http/base_routes.php"); |
|
74 | + if(file_exists(base_path("app/Http/base_routes.php"))) { |
|
75 | + include base_path("app/Http/base_routes.php"); |
|
76 | + } |
|
76 | 77 | } |
77 | 78 | |
78 | 79 | /** |
@@ -88,8 +89,9 @@ discard block |
||
88 | 89 | $users = array_get($config, 'models.User'); |
89 | 90 | $model = array_get($config, 'models.Group'); |
90 | 91 | |
91 | - if (class_exists($model) && method_exists($model, 'setUsersModel')) |
|
92 | - forward_static_call_array([$model, 'setUsersModel'], [$users]); |
|
92 | + if (class_exists($model) && method_exists($model, 'setUsersModel')) { |
|
93 | + forward_static_call_array([$model, 'setUsersModel'], [$users]); |
|
94 | + } |
|
93 | 95 | |
94 | 96 | return new UserRepository($users); |
95 | 97 | }); |
@@ -20,8 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct($model = null) |
22 | 22 | { |
23 | - if (isset($model)) |
|
24 | - $this->model = $model; |
|
23 | + if (isset($model)) { |
|
24 | + $this->model = $model; |
|
25 | + } |
|
25 | 26 | } |
26 | 27 | |
27 | 28 | /** |
@@ -20,8 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | public function __construct($model = null) |
22 | 22 | { |
23 | - if (isset($model)) |
|
24 | - $this->model = $model; |
|
23 | + if (isset($model)) { |
|
24 | + $this->model = $model; |
|
25 | + } |
|
25 | 26 | } |
26 | 27 | |
27 | 28 | /** |