@@ -42,7 +42,9 @@ |
||
42 | 42 | |
43 | 43 | $user = $this->where('code = ? ', $code)->fetch($this->table); |
44 | 44 | |
45 | - if (!$user) return false; |
|
45 | + if (!$user) { |
|
46 | + return false; |
|
47 | + } |
|
46 | 48 | |
47 | 49 | $this->user = $user; |
48 | 50 |
@@ -82,7 +82,8 @@ |
||
82 | 82 | ', $this->table, [['address', 'id', 'user_id'], ['activity', 'id', 'user_id']])->where($sql, $wheres)->orderBy('users.registration', 'DESC')->fetchAll(); |
83 | 83 | } |
84 | 84 | |
85 | - public function insert() { |
|
85 | + public function insert() |
|
86 | + { |
|
86 | 87 | |
87 | 88 | } |
88 | 89 | } |
@@ -23,9 +23,13 @@ |
||
23 | 23 | ]; |
24 | 24 | |
25 | 25 | if ($login->isLogged()) { |
26 | - if (in_array($request, $pagesWhenLogout)) return $app->url->redirectTo('/admin'); |
|
26 | + if (in_array($request, $pagesWhenLogout)) { |
|
27 | + return $app->url->redirectTo('/admin'); |
|
28 | + } |
|
27 | 29 | } else { |
28 | - if (!in_array($request, $pagesWhenLogout)) return $app->url->redirectTo('/admin/login'); |
|
30 | + if (!in_array($request, $pagesWhenLogout)) { |
|
31 | + return $app->url->redirectTo('/admin/login'); |
|
32 | + } |
|
29 | 33 | } |
30 | 34 | return $next; |
31 | 35 | } |
@@ -9,7 +9,9 @@ |
||
9 | 9 | { |
10 | 10 | public function handle(Application $app, $next) |
11 | 11 | { |
12 | - if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) return $app->url->redirectTo('404'); |
|
12 | + if(empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { |
|
13 | + return $app->url->redirectTo('404'); |
|
14 | + } |
|
13 | 15 | return $next; |
14 | 16 | } |
15 | 17 | } |
@@ -33,7 +33,9 @@ |
||
33 | 33 | $app->pages->add('not found', '/404', 'fas fa-times'); |
34 | 34 | |
35 | 35 | // == Website's routes |
36 | -if ($app->request->isRequestToAdminManagement()) return; |
|
36 | +if ($app->request->isRequestToAdminManagement()) { |
|
37 | + return; |
|
38 | +} |
|
37 | 39 | |
38 | 40 | $app->route->add('/', 'Website/Home'); |
39 | 41 | $app->route->add('/home', 'Website/Home', 'GET'); |
@@ -2,7 +2,9 @@ |
||
2 | 2 | |
3 | 3 | $app = app(); |
4 | 4 | |
5 | -if (!$app->request->isRequestToAdminManagement()) return; |
|
5 | +if (!$app->request->isRequestToAdminManagement()) { |
|
6 | + return; |
|
7 | +} |
|
6 | 8 | // Rotes admins |
7 | 9 | |
8 | 10 | $adminOptions = [ |
@@ -98,7 +98,9 @@ |
||
98 | 98 | */ |
99 | 99 | public function destroy() |
100 | 100 | { |
101 | - foreach (array_keys($this->all()) as $key) $this->remove($key); |
|
101 | + foreach (array_keys($this->all()) as $key) { |
|
102 | + $this->remove($key); |
|
103 | + } |
|
102 | 104 | unset($_COOKIE); |
103 | 105 | } |
104 | 106 | } |
@@ -103,7 +103,9 @@ |
||
103 | 103 | $public = assets(); |
104 | 104 | $public = str_replace($dir, $host, $public); |
105 | 105 | $public = str_replace('\\', '/', $public); |
106 | - if (substr($public, -1) !== '/') $public = $public . '/'; |
|
106 | + if (substr($public, -1) !== '/') { |
|
107 | + $public = $public . '/'; |
|
108 | + } |
|
107 | 109 | |
108 | 110 | return $public; |
109 | 111 | } |
@@ -28,7 +28,9 @@ |
||
28 | 28 | { |
29 | 29 | ini_set('session.use_only_cookies', 1); |
30 | 30 | |
31 | - if (! session_id()) session_start(); |
|
31 | + if (! session_id()) { |
|
32 | + session_start(); |
|
33 | + } |
|
32 | 34 | } |
33 | 35 | |
34 | 36 | /** |