@@ -127,6 +127,7 @@ |
||
127 | 127 | |
128 | 128 | /** |
129 | 129 | * {@inheritDoc} |
130 | + * @return boolean|string |
|
130 | 131 | */ |
131 | 132 | public function isLoggedIn() |
132 | 133 | { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | if (!empty($settings['id'])) { |
59 | - $this->_id = (int)$settings['id']; |
|
59 | + $this->_id = (int) $settings['id']; |
|
60 | 60 | $this->_isLoggedIn = true; |
61 | 61 | } |
62 | 62 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | public function isUser($user) |
140 | 140 | { |
141 | 141 | if (is_numeric($user)) { |
142 | - $id = (int)$user; |
|
142 | + $id = (int) $user; |
|
143 | 143 | } elseif ($user instanceof ForumsUserInterface || $user instanceof User) { |
144 | 144 | $id = $user->get('id'); |
145 | 145 | } else { |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function isLocked(): bool |
158 | 158 | { |
159 | - return (bool)$this->get('user_lock'); |
|
159 | + return (bool) $this->get('user_lock'); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | */ |
117 | 117 | protected function _getRoles($role) |
118 | 118 | { |
119 | - $key = 'saito.core.permission.' . $role; |
|
119 | + $key = 'saito.core.permission.'.$role; |
|
120 | 120 | |
121 | 121 | return $this->rememberStatic( |
122 | 122 | $key, |
123 | - function () use ($role) { |
|
123 | + function() use ($role) { |
|
124 | 124 | if (!isset($this->groups[$role])) { |
125 | 125 | return false; |
126 | 126 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | Stopwatch::start('Permission::__construct()'); |
151 | 151 | $this->resources = Cache::remember( |
152 | 152 | 'saito.core.permission.resources', |
153 | - function () { |
|
153 | + function() { |
|
154 | 154 | $this->_bootstrapCategories(); |
155 | 155 | |
156 | 156 | return $this->resources; |