@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->info('Paths checked successfully'); |
63 | 63 | } |
64 | 64 | |
65 | - if (! $error && $this->addAdminUser()) { |
|
65 | + if (!$error && $this->addAdminUser()) { |
|
66 | 66 | File::put(base_path().'/_install/install.lock', 'application install locked on '.now()); |
67 | 67 | $this->info('Generating application key'); |
68 | 68 | $this->call('key:generate', ['--force' => true]); |
@@ -91,15 +91,15 @@ discard block |
||
91 | 91 | $unrar_path = config('nntmux_settings.unrar_path'); |
92 | 92 | |
93 | 93 | $nzbPathCheck = File::isWritable($nzb_path); |
94 | - if (! $nzbPathCheck) { |
|
94 | + if (!$nzbPathCheck) { |
|
95 | 95 | $this->warn($nzb_path.' is not writable. Please fix folder permissions'); |
96 | 96 | |
97 | 97 | return false; |
98 | 98 | } |
99 | 99 | |
100 | - if (! file_exists($unrar_path)) { |
|
100 | + if (!file_exists($unrar_path)) { |
|
101 | 101 | $this->info('Creating missing '.$unrar_path.' folder'); |
102 | - if (! @File::makeDirectory($unrar_path) && ! File::isDirectory($unrar_path)) { |
|
102 | + if (!@File::makeDirectory($unrar_path) && !File::isDirectory($unrar_path)) { |
|
103 | 103 | throw new \RuntimeException('Unable to create '.$unrar_path.' folder'); |
104 | 104 | } |
105 | 105 | $this->info('Folder '.$unrar_path.' successfully created'); |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $coversPathCheck = File::isWritable($covers_path); |
115 | - if (! $coversPathCheck) { |
|
115 | + if (!$coversPathCheck) { |
|
116 | 116 | $this->warn($covers_path.' is not writable. Please fix folder permissions'); |
117 | 117 | |
118 | 118 | return false; |
119 | 119 | } |
120 | 120 | |
121 | 121 | $tmpPathCheck = File::isWritable($tmp_path); |
122 | - if (! $tmpPathCheck) { |
|
122 | + if (!$tmpPathCheck) { |
|
123 | 123 | $this->warn($tmp_path.' is not writable. Please fix folder permissions'); |
124 | 124 | |
125 | 125 | return false; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // Get the default user role. |
148 | 148 | $userDefault = Role::query()->where('isdefault', '=', 1)->first(); |
149 | 149 | |
150 | - if (! empty($error)) { |
|
150 | + if (!empty($error)) { |
|
151 | 151 | return $this->showRegistrationForm($request, $error); |
152 | 152 | } |
153 | 153 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | break; |
171 | 171 | case 'view': |
172 | 172 | // See if it is a valid invite. |
173 | - if (($inviteCode !== null) && ! Invite::isValid($inviteCode)) { |
|
173 | + if (($inviteCode !== null) && !Invite::isValid($inviteCode)) { |
|
174 | 174 | $error = 'Invalid invitation token!'; |
175 | 175 | $showRegister = 0; |
176 | 176 | } else { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | } |
203 | 203 | |
204 | 204 | if ((int) Settings::settingValue('registerstatus') === Settings::REGISTER_STATUS_INVITE) { |
205 | - if (! empty($inviteCode)) { |
|
205 | + if (!empty($inviteCode)) { |
|
206 | 206 | if (Invite::isValid($inviteCode)) { |
207 | 207 | $error = ''; |
208 | 208 | $showRegister = 1; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | // convert from a string array to an int array as we want to use int |
152 | - $book_reqids_ids = array_map(function ($value) { |
|
152 | + $book_reqids_ids = array_map(function($value) { |
|
153 | 153 | return (int) $value; |
154 | 154 | }, $book_reqids_ids); |
155 | 155 | $this->smarty->assign('book_reqids_ids', $book_reqids_ids); |
@@ -159,14 +159,14 @@ discard block |
||
159 | 159 | $books_selected = explode(',', Settings::settingValue('book_reqids')); |
160 | 160 | |
161 | 161 | // convert from a string array to an int array |
162 | - $books_selected = array_map(function ($value) { |
|
162 | + $books_selected = array_map(function($value) { |
|
163 | 163 | return (int) $value; |
164 | 164 | }, $books_selected); |
165 | 165 | $this->smarty->assign('book_reqids_selected', $books_selected); |
166 | 166 | |
167 | 167 | $this->smarty->assign('themelist', Utility::getThemesList()); |
168 | 168 | |
169 | - if (! str_contains(config('settings.nntp_server'), 'astra')) { |
|
169 | + if (!str_contains(config('settings.nntp_server'), 'astra')) { |
|
170 | 170 | $this->smarty->assign('compress_headers_warning', 'compress_headers_warning'); |
171 | 171 | } |
172 | 172 |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $releases = new Releases; |
118 | 118 | |
119 | 119 | // Set Query Parameters based on Request objects |
120 | - $outputXML = ! ($request->has('o') && $request->input('o') === 'json'); |
|
120 | + $outputXML = !($request->has('o') && $request->input('o') === 'json'); |
|
121 | 121 | $minSize = $request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0; |
122 | 122 | $offset = $this->offset($request); |
123 | 123 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | |
259 | 259 | $this->addCoverURL( |
260 | 260 | $relData, |
261 | - function ($release) { |
|
261 | + function($release) { |
|
262 | 262 | return Utility::getCoverURL(['type' => 'movies', 'id' => $release->imdbid]); |
263 | 263 | } |
264 | 264 | ); |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | |
301 | 301 | if ($rel->isNotEmpty()) { |
302 | 302 | $data = ReleaseNfo::getReleaseNfo($rel->id); |
303 | - if (! empty($data)) { |
|
303 | + if (!empty($data)) { |
|
304 | 304 | if ($request->has('o') && $request->input('o') === 'file') { |
305 | - return response()->streamDownload(function () use ($data) { |
|
305 | + return response()->streamDownload(function() use ($data) { |
|
306 | 306 | echo $data['nfo']; |
307 | 307 | }, $rel['searchname'].'.nfo', ['Content-type:' => 'application/octet-stream']); |
308 | 308 | } |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | header('Content-type: text/xml'); |
345 | 345 | } else { |
346 | 346 | // JSON encode the XMLWriter response |
347 | - $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES); |
|
347 | + $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR|JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES); |
|
348 | 348 | header('Content-type: application/json'); |
349 | 349 | } |
350 | 350 | if ($response === false) { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | 'search' => ['available' => 'yes', 'supportedParams' => 'q'], |
388 | 388 | 'tv-search' => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'], |
389 | 389 | 'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid, tmdbid, traktid'], |
390 | - 'audio-search' => ['available' => 'no', 'supportedParams' => ''], |
|
390 | + 'audio-search' => ['available' => 'no', 'supportedParams' => ''], |
|
391 | 391 | ], |
392 | 392 | 'categories' => $this->type === 'caps' |
393 | 393 | ? Category::getForMenu() |
@@ -402,9 +402,9 @@ discard block |
||
402 | 402 | { |
403 | 403 | $maxAge = -1; |
404 | 404 | if ($request->has('maxage')) { |
405 | - if (! $request->filled('maxage')) { |
|
405 | + if (!$request->filled('maxage')) { |
|
406 | 406 | return Utility::showApiError(201, 'Incorrect parameter (maxage must not be empty)'); |
407 | - } elseif (! is_numeric($request->input('maxage'))) { |
|
407 | + } elseif (!is_numeric($request->input('maxage'))) { |
|
408 | 408 | return Utility::showApiError(201, 'Incorrect parameter (maxage must be numeric)'); |
409 | 409 | } else { |
410 | 410 | $maxAge = (int) $request->input('maxage'); |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | if ($request->has('cat')) { |
424 | 424 | $categoryIDs = urldecode($request->input('cat')); |
425 | 425 | // Append Web-DL category ID if HD present for SickBeard / Sonarr compatibility. |
426 | - if (str_contains($categoryIDs, (string) Category::TV_HD) && ! str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) { |
|
426 | + if (str_contains($categoryIDs, (string) Category::TV_HD) && !str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) { |
|
427 | 427 | $categoryIDs .= (','.Category::TV_WEBDL); |
428 | 428 | } |
429 | 429 | $categoryID = explode(',', $categoryIDs); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $privateProfiles = config('nntmux_settings.private_profiles'); |
32 | 32 | $publicView = false; |
33 | 33 | |
34 | - if ($privileged || ! $privateProfiles) { |
|
34 | + if ($privileged || !$privateProfiles) { |
|
35 | 35 | $altID = ($request->has('id') && (int) $request->input('id') >= 0) ? (int) $request->input('id') : false; |
36 | 36 | $altUsername = ($request->has('name') && $request->input('name') !== '') ? $request->input('name') : false; |
37 | 37 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | // Check if the user selected a theme. |
64 | - if (! isset($this->userdata->style) || $this->userdata->style === 'None') { |
|
64 | + if (!isset($this->userdata->style) || $this->userdata->style === 'None') { |
|
65 | 65 | $this->userdata->style = 'Using the admin selected theme.'; |
66 | 66 | } |
67 | 67 | $this->smarty->assign( |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $action = $request->input('action') ?? 'view'; |
113 | 113 | |
114 | 114 | $userid = $this->userdata->id; |
115 | - if (! $this->userdata) { |
|
115 | + if (!$this->userdata) { |
|
116 | 116 | $this->show404('No such user!'); |
117 | 117 | } |
118 | 118 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | 'None', |
152 | 152 | ); |
153 | 153 | |
154 | - if ((int) $request->input('viewconsole') === 1 && $this->userdata->can('view console') && ! $this->userdata->hasDirectPermission('view console')) { |
|
154 | + if ((int) $request->input('viewconsole') === 1 && $this->userdata->can('view console') && !$this->userdata->hasDirectPermission('view console')) { |
|
155 | 155 | $this->userdata->givePermissionTo('view console'); |
156 | 156 | } elseif ((int) $request->input('viewconsole') === 0 && $this->userdata->can('view console') && $this->userdata->hasDirectPermission('view console')) { |
157 | 157 | $this->userdata->revokePermissionTo('view console'); |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | $this->userdata->revokePermissionTo('view console'); |
160 | 160 | } |
161 | 161 | |
162 | - if ((int) $request->input('viewmovies') === 1 && $this->userdata->can('view movies') && ! $this->userdata->hasDirectPermission('view movies')) { |
|
162 | + if ((int) $request->input('viewmovies') === 1 && $this->userdata->can('view movies') && !$this->userdata->hasDirectPermission('view movies')) { |
|
163 | 163 | $this->userdata->givePermissionTo('view movies'); |
164 | 164 | } elseif ((int) $request->input('viewmovies') === 0 && $this->userdata->can('view movies') && $this->userdata->hasDirectPermission('view movies')) { |
165 | 165 | $this->userdata->revokePermissionTo('view movies'); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $this->userdata->revokePermissionTo('view movies'); |
168 | 168 | } |
169 | 169 | |
170 | - if ((int) $request->input('viewaudio') === 1 && $this->userdata->can('view audio') && ! $this->userdata->hasDirectPermission('view audio')) { |
|
170 | + if ((int) $request->input('viewaudio') === 1 && $this->userdata->can('view audio') && !$this->userdata->hasDirectPermission('view audio')) { |
|
171 | 171 | $this->userdata->givePermissionTo('view audio'); |
172 | 172 | } elseif ((int) $request->input('viewaudio') === 0 && $this->userdata->can('view audio') && $this->userdata->hasDirectPermission('view audio')) { |
173 | 173 | $this->userdata->revokePermissionTo('view audio'); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $this->userdata->revokePermissionTo('view audio'); |
176 | 176 | } |
177 | 177 | |
178 | - if ((int) $request->input('viewpc') === 1 && $this->userdata->can('view pc') && ! $this->userdata->hasDirectPermission('view pc')) { |
|
178 | + if ((int) $request->input('viewpc') === 1 && $this->userdata->can('view pc') && !$this->userdata->hasDirectPermission('view pc')) { |
|
179 | 179 | $this->userdata->givePermissionTo('view pc'); |
180 | 180 | } elseif ((int) $request->input('viewpc') === 0 && $this->userdata->can('view pc') && $this->userdata->hasDirectPermission('view pc')) { |
181 | 181 | $this->userdata->revokePermissionTo('view pc'); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $this->userdata->revokePermissionTo('view pc'); |
184 | 184 | } |
185 | 185 | |
186 | - if ((int) $request->input('viewtv') === 1 && $this->userdata->can('view tv') && ! $this->userdata->hasDirectPermission('view tv')) { |
|
186 | + if ((int) $request->input('viewtv') === 1 && $this->userdata->can('view tv') && !$this->userdata->hasDirectPermission('view tv')) { |
|
187 | 187 | $this->userdata->givePermissionTo('view tv'); |
188 | 188 | } elseif ((int) $request->input('viewtv') === 0 && $this->userdata->can('view tv') && $this->userdata->hasDirectPermission('view tv')) { |
189 | 189 | $this->userdata->revokePermissionTo('view tv'); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | $this->userdata->revokePermissionTo('view tv'); |
192 | 192 | } |
193 | 193 | |
194 | - if ((int) $request->input('viewadult') === 1 && $this->userdata->can('view adult') && ! $this->userdata->hasDirectPermission('view adult')) { |
|
194 | + if ((int) $request->input('viewadult') === 1 && $this->userdata->can('view adult') && !$this->userdata->hasDirectPermission('view adult')) { |
|
195 | 195 | $this->userdata->givePermissionTo('view adult'); |
196 | 196 | } elseif ((int) $request->input('viewadult') === 0 && $this->userdata->can('view adult') && $this->userdata->hasDirectPermission('view adult')) { |
197 | 197 | $this->userdata->revokePermissionTo('view adult'); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $this->userdata->revokePermissionTo('view adult'); |
200 | 200 | } |
201 | 201 | |
202 | - if ((int) $request->input('viewbooks') === 1 && $this->userdata->can('view books') && ! $this->userdata->hasDirectPermission('view books')) { |
|
202 | + if ((int) $request->input('viewbooks') === 1 && $this->userdata->can('view books') && !$this->userdata->hasDirectPermission('view books')) { |
|
203 | 203 | $this->userdata->givePermissionTo('view books'); |
204 | 204 | } elseif ((int) $request->input('viewbooks') === 0 && $this->userdata->can('view books') && $this->userdata->hasDirectPermission('view books')) { |
205 | 205 | $this->userdata->revokePermissionTo('view books'); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $this->userdata->revokePermissionTo('view books'); |
208 | 208 | } |
209 | 209 | |
210 | - if ((int) $request->input('viewother') === 1 && $this->userdata->can('view other') && ! $this->userdata->hasDirectPermission('view other')) { |
|
210 | + if ((int) $request->input('viewother') === 1 && $this->userdata->can('view other') && !$this->userdata->hasDirectPermission('view other')) { |
|
211 | 211 | $this->userdata->givePermissionTo('view other'); |
212 | 212 | } elseif ((int) $request->input('viewother') === 0 && $this->userdata->can('view other') && $this->userdata->hasDirectPermission('view other')) { |
213 | 213 | $this->userdata->revokePermissionTo('view other'); |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | $this->userdata->revokePermissionTo('view other'); |
216 | 216 | } |
217 | 217 | |
218 | - if ($request->has('password') && ! empty($request->input('password'))) { |
|
218 | + if ($request->has('password') && !empty($request->input('password'))) { |
|
219 | 219 | User::updatePassword($userid, $request->input('password')); |
220 | 220 | } |
221 | 221 | |
222 | - if (! $this->userdata->hasRole('Admin')) { |
|
223 | - if (! empty($request->input('email')) && $this->userdata->email !== $request->input('email')) { |
|
222 | + if (!$this->userdata->hasRole('Admin')) { |
|
223 | + if (!empty($request->input('email')) && $this->userdata->email !== $request->input('email')) { |
|
224 | 224 | $this->userdata->email = $request->input('email'); |
225 | 225 | |
226 | 226 | $verify_user = $this->userdata; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $this->setPreferences(); |
270 | 270 | $userId = $request->input('id'); |
271 | 271 | |
272 | - if ($userId !== null && (int) $userId === $this->userdata->id && ! $this->userdata->hasRole('Admin')) { |
|
272 | + if ($userId !== null && (int) $userId === $this->userdata->id && !$this->userdata->hasRole('Admin')) { |
|
273 | 273 | $user = User::find($userId); |
274 | 274 | SendAccountDeletedEmail::dispatch($user); |
275 | 275 | Auth::logout(); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | { |
255 | 255 | $res = self::query()->where('email', '<>', '[email protected]'); |
256 | 256 | |
257 | - if (! empty($role)) { |
|
257 | + if (!empty($role)) { |
|
258 | 258 | $res->where('roles_id', $role); |
259 | 259 | } |
260 | 260 | |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | 'rate_limit' => $rateLimit ? $rateLimit['rate_limit'] : 60, |
296 | 296 | ]; |
297 | 297 | |
298 | - if (! empty($email)) { |
|
298 | + if (!empty($email)) { |
|
299 | 299 | $email = trim($email); |
300 | 300 | $sql += ['email' => $email]; |
301 | 301 | } |
@@ -344,10 +344,10 @@ discard block |
||
344 | 344 | { |
345 | 345 | $user = self::find($uid); |
346 | 346 | $currRoleExp = $user->rolechangedate ?? now()->toDateTimeString(); |
347 | - if (! empty($date)) { |
|
347 | + if (!empty($date)) { |
|
348 | 348 | $user->update(['rolechangedate' => $date]); |
349 | 349 | } |
350 | - if (empty($date) && ! empty($addYear)) { |
|
350 | + if (empty($date) && !empty($addYear)) { |
|
351 | 351 | $user->update(['rolechangedate' => Carbon::createFromDate($currRoleExp)->addYears($addYear)]); |
352 | 352 | } |
353 | 353 | } |
@@ -404,10 +404,10 @@ discard block |
||
404 | 404 | return self::fromQuery( |
405 | 405 | sprintf( |
406 | 406 | $query, |
407 | - ! empty($userName) ? 'AND users.username '.'LIKE '.escapeString('%'.$userName.'%') : '', |
|
408 | - ! empty($email) ? 'AND users.email '.'LIKE '.escapeString('%'.$email.'%') : '', |
|
409 | - ! empty($host) ? 'AND users.host '.'LIKE '.escapeString('%'.$host.'%') : '', |
|
410 | - (! empty($role) ? ('AND users.roles_id = '.$role) : ''), |
|
407 | + !empty($userName) ? 'AND users.username '.'LIKE '.escapeString('%'.$userName.'%') : '', |
|
408 | + !empty($email) ? 'AND users.email '.'LIKE '.escapeString('%'.$email.'%') : '', |
|
409 | + !empty($host) ? 'AND users.host '.'LIKE '.escapeString('%'.$host.'%') : '', |
|
410 | + (!empty($role) ? ('AND users.roles_id = '.$role) : ''), |
|
411 | 411 | $order[0], |
412 | 412 | $order[1], |
413 | 413 | ($start === false ? '' : ('LIMIT '.$offset.' OFFSET '.$start)) |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | |
520 | 520 | public static function isValidUrl($url): bool |
521 | 521 | { |
522 | - return (! preg_match('/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i', $url)) ? false : true; |
|
522 | + return (!preg_match('/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i', $url)) ? false : true; |
|
523 | 523 | } |
524 | 524 | |
525 | 525 | /** |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | |
556 | 556 | // Make sure this is the last check, as if a further validation check failed, the invite would still have been used up. |
557 | 557 | $invitedBy = 0; |
558 | - if (! $forceInviteMode && (int) Settings::settingValue('registerstatus') === Settings::REGISTER_STATUS_INVITE) { |
|
558 | + if (!$forceInviteMode && (int) Settings::settingValue('registerstatus') === Settings::REGISTER_STATUS_INVITE) { |
|
559 | 559 | if ($inviteCode === '') { |
560 | 560 | return self::ERR_SIGNUP_BADINVITECODE; |
561 | 561 | } |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | public static function checkAndUseInvite(string $inviteCode): int |
576 | 576 | { |
577 | 577 | $invite = Invitation::getInvite($inviteCode); |
578 | - if (! $invite) { |
|
578 | + if (!$invite) { |
|
579 | 579 | return -1; |
580 | 580 | } |
581 | 581 | |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | public static function add(string $userName, string $password, string $email, int $role, ?string $notes = '', string $host = '', int $invites = Invitation::DEFAULT_INVITES, int $invitedBy = 0) |
592 | 592 | { |
593 | 593 | $password = self::hashPassword($password); |
594 | - if (! $password) { |
|
594 | + if (!$password) { |
|
595 | 595 | return false; |
596 | 596 | } |
597 | 597 | |
@@ -633,9 +633,9 @@ discard block |
||
633 | 633 | |
634 | 634 | $cats = ['view console', 'view movies', 'view audio', 'view tv', 'view pc', 'view adult', 'view books', 'view other']; |
635 | 635 | |
636 | - if (! empty($allowed)) { |
|
636 | + if (!empty($allowed)) { |
|
637 | 637 | foreach ($cats as $cat) { |
638 | - if (! \in_array($cat, $allowed, false)) { |
|
638 | + if (!\in_array($cat, $allowed, false)) { |
|
639 | 639 | $ret[] = match ($cat) { |
640 | 640 | 'view console' => 1000, |
641 | 641 | 'view movies' => 2000, |
@@ -73,7 +73,7 @@ |
||
73 | 73 | if ($user !== null) { |
74 | 74 | $rememberMe = $request->has('rememberme') && $request->input('rememberme') === 'on'; |
75 | 75 | |
76 | - if (! $user->isVerified() || $user->isPendingVerification()) { |
|
76 | + if (!$user->isVerified() || $user->isPendingVerification()) { |
|
77 | 77 | $request->session()->flash('message', 'You have not verified your email address!'); |
78 | 78 | |
79 | 79 | return redirect()->to('login'); |
@@ -45,12 +45,12 @@ |
||
45 | 45 | if (empty($email) && empty($rssToken)) { |
46 | 46 | app('smarty.view')->assign('error', 'Missing parameter (email and/or apikey) to send password reset'); |
47 | 47 | } else { |
48 | - if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) { |
|
48 | + if (config('captcha.enabled') === true && (!empty(config('captcha.secret')) && !empty(config('captcha.sitekey')))) { |
|
49 | 49 | } |
50 | 50 | // |
51 | 51 | // Check users exists and send an email |
52 | 52 | // |
53 | - $ret = ! empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email); |
|
53 | + $ret = !empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email); |
|
54 | 54 | if ($ret === null) { |
55 | 55 | app('smarty.view')->assign('error', 'The email or apikey are not recognised.'); |
56 | 56 | $sent = true; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | { |
268 | 268 | $returnVal = shell_exec("which $cmd 2>/dev/null"); |
269 | 269 | |
270 | - return ! empty($returnVal); |
|
270 | + return !empty($returnVal); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -326,11 +326,11 @@ discard block |
||
326 | 326 | |
327 | 327 | case 2: |
328 | 328 | $ppminString = $ppmaxString = ''; |
329 | - if (is_numeric($ppmax) && ! empty($ppmax)) { |
|
329 | + if (is_numeric($ppmax) && !empty($ppmax)) { |
|
330 | 330 | $ppmax *= 1073741824; |
331 | 331 | $ppmaxString = "AND r.size < {$ppmax}"; |
332 | 332 | } |
333 | - if (is_numeric($ppmin) && ! empty($ppmin)) { |
|
333 | + if (is_numeric($ppmin) && !empty($ppmin)) { |
|
334 | 334 | $ppmin *= 1048576; |
335 | 335 | $ppminString = "AND r.size > {$ppmin}"; |
336 | 336 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | throw new \RuntimeException('Tmux\\\'s running flag was not found in the database.'.PHP_EOL.'Please check the tables are correctly setup.'.PHP_EOL); |
389 | 389 | } |
390 | 390 | |
391 | - return ! ((int) $running->value === 0); |
|
391 | + return !((int) $running->value === 0); |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | */ |
415 | 415 | public function startRunning(): void |
416 | 416 | { |
417 | - if (! $this->isRunning()) { |
|
417 | + if (!$this->isRunning()) { |
|
418 | 418 | Settings::query()->where(['name' => 'running'])->update(['value' => 1]); |
419 | 419 | } |
420 | 420 | } |