@@ -85,20 +85,20 @@ discard block |
||
85 | 85 | Route::post('login', [LoginController::class, 'login'])->name('login'); |
86 | 86 | Route::get('logout', [LoginController::class, 'logout'])->name('logout'); |
87 | 87 | |
88 | -Route::middleware('isVerified')->group(function () { |
|
88 | +Route::middleware('isVerified')->group(function() { |
|
89 | 89 | Route::get('resetpassword', [ResetPasswordController::class, 'reset']); |
90 | 90 | Route::post('resetpassword', [ResetPasswordController::class, 'reset']); |
91 | 91 | |
92 | 92 | Route::get('profile', [ProfileController::class, 'show']); |
93 | 93 | |
94 | - Route::prefix('browse')->group(function () { |
|
94 | + Route::prefix('browse')->group(function() { |
|
95 | 95 | Route::get('tags', [BrowseController::class, 'tags']); |
96 | 96 | Route::get('group', [BrowseController::class, 'group']); |
97 | 97 | Route::get('All', [BrowseController::class, 'index']); |
98 | 98 | Route::get('{parentCategory}/{id?}', [BrowseController::class, 'show'])->middleware('clearance'); |
99 | 99 | }); |
100 | 100 | |
101 | - Route::prefix('cart')->group(function () { |
|
101 | + Route::prefix('cart')->group(function() { |
|
102 | 102 | Route::get('index', [CartController::class, 'index']); |
103 | 103 | Route::post('index', [CartController::class, 'index']); |
104 | 104 | Route::get('add', [CartController::class, 'store']); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | Route::post('failed', [FailedReleasesController::class, 'failed'])->name('failed'); |
133 | 133 | |
134 | - Route::middleware('clearance')->group(function () { |
|
134 | + Route::middleware('clearance')->group(function() { |
|
135 | 135 | Route::get('Games', [GamesController::class, 'show'])->name('Games'); |
136 | 136 | Route::post('Games', [GamesController::class, 'show'])->name('Games'); |
137 | 137 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | Route::post('disable2fa', [PasswordSecurityController::class, 'disable2fa'])->name('disable2fa'); |
227 | 227 | }); |
228 | 228 | |
229 | -Route::middleware('role:Admin', '2fa')->prefix('admin')->group(function () { |
|
229 | +Route::middleware('role:Admin', '2fa')->prefix('admin')->group(function() { |
|
230 | 230 | Route::get('index', [AdminPageController::class, 'index']); |
231 | 231 | Route::get('anidb-delete/{id}', [AdminAnidbController::class, 'destroy']); |
232 | 232 | Route::post('anidb-delete/{id}', [AdminAnidbController::class, 'destroy']); |
@@ -345,12 +345,12 @@ discard block |
||
345 | 345 | Route::post('group-list-inactive', [AdminGroupController::class, 'inactive']); |
346 | 346 | }); |
347 | 347 | |
348 | -Route::middleware('role_or_permission:Admin|Moderator|edit release')->prefix('admin')->group(function () { |
|
348 | +Route::middleware('role_or_permission:Admin|Moderator|edit release')->prefix('admin')->group(function() { |
|
349 | 349 | Route::get('release-edit', [AdminReleasesController::class, 'edit']); |
350 | 350 | Route::post('release-edit', [AdminReleasesController::class, 'edit']); |
351 | 351 | }); |
352 | 352 | |
353 | -Route::post('2faVerify', function () { |
|
353 | +Route::post('2faVerify', function() { |
|
354 | 354 | return redirect()->to(URL()->previous()); |
355 | 355 | })->name('2faVerify')->middleware('2fa'); |
356 | 356 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $colorCli = new ColorCLI(); |
12 | 12 | |
13 | -if (! (isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) { |
|
13 | +if (!(isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) { |
|
14 | 14 | $colorCli->error( |
15 | 15 | "\nThis script will attempt to re-categorize releases and is useful if changes have been made to Category.php.\n" |
16 | 16 | ."No updates will be done unless the category changes\n" |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $timeStart = now(); |
41 | 41 | $chgCount = categorizeRelease($argv, true); |
42 | 42 | $time = now()->diffInSeconds($timeStart, true); |
43 | - if (! isset($argv[2])) { |
|
43 | + if (!isset($argv[2])) { |
|
44 | 44 | $colorCli->header('Finished re-categorizing '.number_format($chgCount).' releases in '.$time.' seconds, using the searchname.').PHP_EOL; |
45 | 45 | } else { |
46 | 46 | $colorCli->header('Finished re-categorizing in '.$time.' seconds , using the searchname.'.PHP_EOL |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $consoleTools = new ConsoleTools(); |
69 | 69 | $relCount = $chgCount = 0; |
70 | 70 | if ($total > 0) { |
71 | - $query->chunk('100', function ($results) use ($update, $relCount, $chgCount) { |
|
71 | + $query->chunk('100', function($results) use ($update, $relCount, $chgCount) { |
|
72 | 72 | $cat = new Categorize(); |
73 | 73 | foreach ($results as $result) { |
74 | 74 | $catId = $cat->determineCategory($result->groups_id, $result->searchname, $result->fromname); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public function handle(): void |
38 | 38 | { |
39 | 39 | // Check if any options are false |
40 | - if (! $this->option('notindb') && ! $this->option('notondisk')) { |
|
40 | + if (!$this->option('notindb') && !$this->option('notondisk')) { |
|
41 | 41 | $this->error('You must specify at least one option. See: --help'); |
42 | 42 | exit(); |
43 | 43 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $guid = stristr($filePath->getFilename(), '.nzb.gz', true); |
64 | 64 | if (File::isFile($filePath) && $guid) { |
65 | 65 | // If NZB file guid is not present in DB delete the file from disk |
66 | - if (! $releases->whereGuid($guid)->exists()) { |
|
66 | + if (!$releases->whereGuid($guid)->exists()) { |
|
67 | 67 | if ($delete) { |
68 | 68 | File::delete($filePath); |
69 | 69 | } |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | $total = Release::count(); |
89 | 89 | $this->alert("Total releases to check: $total"); |
90 | 90 | |
91 | - Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function (Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) { |
|
91 | + Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function(Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) { |
|
92 | 92 | echo 'Total done: '.$checked."\r"; |
93 | 93 | foreach ($releases as $r) { |
94 | 94 | |
95 | - if (! $nzb->NZBPath($r->guid)) { |
|
95 | + if (!$nzb->NZBPath($r->guid)) { |
|
96 | 96 | if ($delete) { |
97 | 97 | $rel->deleteSingle(['g' => $r->guid, 'i' => $r->id], $nzb, new ReleaseImage()); |
98 | 98 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $this->ensureIsNotRateLimited(); |
32 | 32 | |
33 | - if (! Auth::attempt($this->only(['email', 'password']), $this->remember)) { |
|
33 | + if (!Auth::attempt($this->only(['email', 'password']), $this->remember)) { |
|
34 | 34 | RateLimiter::hit($this->throttleKey()); |
35 | 35 | |
36 | 36 | throw ValidationException::withMessages([ |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | protected function ensureIsNotRateLimited(): void |
48 | 48 | { |
49 | - if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { |
|
49 | + if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { |
|
50 | 50 | return; |
51 | 51 | } |
52 | 52 |
@@ -74,7 +74,7 @@ |
||
74 | 74 | if ($user !== null) { |
75 | 75 | $rememberMe = $request->has('rememberme') && $request->input('rememberme') === 'on'; |
76 | 76 | |
77 | - if (! $user->isVerified() || $user->isPendingVerification()) { |
|
77 | + if (!$user->isVerified() || $user->isPendingVerification()) { |
|
78 | 78 | $request->session()->flash('message', 'You have not verified your email address!'); |
79 | 79 | |
80 | 80 | return redirect('login'); |
@@ -277,8 +277,8 @@ |
||
277 | 277 | |
278 | 278 | // Execute a Scroll request and repeat |
279 | 279 | $results = Elasticsearch::scroll([ |
280 | - 'scroll_id' => $scroll_id, //...using our previously obtained _scroll_id |
|
281 | - 'scroll' => '30s', // and the same timeout window |
|
280 | + 'scroll_id' => $scroll_id, //...using our previously obtained _scroll_id |
|
281 | + 'scroll' => '30s', // and the same timeout window |
|
282 | 282 | ] |
283 | 283 | ); |
284 | 284 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | foreach ($releases->getBrowseOrdering() as $orderType) { |
66 | 66 | $this->smarty->assign( |
67 | 67 | 'orderby'.$orderType, |
68 | - url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES | ENT_HTML5).'&t='.implode(',', $categoryID).'&ob='.$orderType)); |
|
68 | + url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES|ENT_HTML5).'&t='.implode(',', $categoryID).'&ob='.$orderType)); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $rslt = $releases->search( |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | if ($searchType !== 'basic' && $request->missing('id') && $request->missing('subject') && $request->anyFilled(['searchadvr', 'searchadvsubject', 'searchadvfilename', 'searchadvposter'])) { |
124 | 124 | $orderByString = ''; |
125 | 125 | foreach ($searchVars as $searchVarKey => $searchVar) { |
126 | - $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES | ENT_HTML5); |
|
126 | + $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES|ENT_HTML5); |
|
127 | 127 | } |
128 | 128 | $orderByString = ltrim($orderByString, '&'); |
129 | 129 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | switch ($action) { |
32 | 32 | case 'delete': |
33 | 33 | $show = UserSerie::getShow($this->userdata->id, $videoId); |
34 | - if (! $show) { |
|
34 | + if (!$show) { |
|
35 | 35 | return redirect()->back(); |
36 | 36 | } |
37 | 37 | |
@@ -51,12 +51,12 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | $show = Video::getByVideoID($videoId); |
54 | - if (! $show) { |
|
54 | + if (!$show) { |
|
55 | 55 | return redirect()->to('myshows'); |
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($action === 'doadd') { |
59 | - $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : []; |
|
59 | + $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : []; |
|
60 | 60 | UserSerie::addShow($this->userdata->id, $videoId, $category); |
61 | 61 | if ($request->has('from')) { |
62 | 62 | return redirect()->to($request->input('from')); |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | case 'doedit': |
91 | 91 | $show = UserSerie::getShow($this->userdata->id, $videoId); |
92 | 92 | |
93 | - if (! $show) { |
|
93 | + if (!$show) { |
|
94 | 94 | return redirect()->to('myshows'); |
95 | 95 | } |
96 | 96 | |
97 | 97 | if ($action === 'doedit') { |
98 | - $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : []; |
|
98 | + $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : []; |
|
99 | 99 | UserSerie::updateShow($this->userdata->id, $videoId, $category); |
100 | 100 | if ($request->has('from')) { |
101 | 101 | return redirect()->to($request->input('from')); |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | $catArr = []; |
141 | 141 | foreach ($shows as $showk => $show) { |
142 | 142 | $showcats = explode('|', $show['categories']); |
143 | - if (\is_array($showcats) && ! empty($showcats)) { |
|
143 | + if (\is_array($showcats) && !empty($showcats)) { |
|
144 | 144 | foreach ($showcats as $scat) { |
145 | - if (! empty($scat)) { |
|
145 | + if (!empty($scat)) { |
|
146 | 146 | $catArr[] = $categories[$scat]; |
147 | 147 | } |
148 | 148 | } |