@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | switch ($action) { |
| 27 | 27 | case 'delete': |
| 28 | 28 | $show = UserSerie::getShow($this->userdata->id, $videoId); |
| 29 | - if (! $show) { |
|
| 29 | + if (!$show) { |
|
| 30 | 30 | return redirect()->back(); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $show = Video::getByVideoID($videoId); |
| 49 | - if (! $show) { |
|
| 49 | + if (!$show) { |
|
| 50 | 50 | return redirect()->to('myshows'); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ($action === 'doadd') { |
| 54 | - $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : []; |
|
| 54 | + $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : []; |
|
| 55 | 55 | UserSerie::addShow($this->userdata->id, $videoId, $category); |
| 56 | 56 | if ($request->has('from')) { |
| 57 | 57 | return redirect()->to($request->input('from')); |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | case 'doedit': |
| 86 | 86 | $show = UserSerie::getShow($this->userdata->id, $videoId); |
| 87 | 87 | |
| 88 | - if (! $show) { |
|
| 88 | + if (!$show) { |
|
| 89 | 89 | return redirect()->to('myshows'); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if ($action === 'doedit') { |
| 93 | - $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : []; |
|
| 93 | + $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : []; |
|
| 94 | 94 | UserSerie::updateShow($this->userdata->id, $videoId, $category); |
| 95 | 95 | if ($request->has('from')) { |
| 96 | 96 | return redirect()->to($request->input('from')); |
@@ -136,9 +136,9 @@ discard block |
||
| 136 | 136 | if ($shows !== null) { |
| 137 | 137 | foreach ($shows as $showk => $show) { |
| 138 | 138 | $showcats = explode('|', $show['categories']); |
| 139 | - if (\is_array($showcats) && ! empty($showcats)) { |
|
| 139 | + if (\is_array($showcats) && !empty($showcats)) { |
|
| 140 | 140 | foreach ($showcats as $scat) { |
| 141 | - if (! empty($scat)) { |
|
| 141 | + if (!empty($scat)) { |
|
| 142 | 142 | $catArr[] = $categories[$scat]; |
| 143 | 143 | } |
| 144 | 144 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | if ($payload['type'] === 'InvoiceSettled') { |
| 59 | 59 | // Check if we have the invoice_id in payments table and if we do, update the user account |
| 60 | - $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function ($query) { |
|
| 60 | + $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function($query) { |
|
| 61 | 61 | return $query->where('invoice_status', 'Pending')->orWhereNull('invoice_status'); |
| 62 | 62 | })->first(); |
| 63 | 63 | if ($checkOrder !== null) { |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - if (! $yesMode) { |
|
| 57 | - if (! $this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) { |
|
| 56 | + if (!$yesMode) { |
|
| 57 | + if (!$this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) { |
|
| 58 | 58 | $this->info('Installation aborted by user.'); |
| 59 | 59 | exit; |
| 60 | 60 | } |
@@ -97,33 +97,33 @@ discard block |
||
| 97 | 97 | $zip_path = config('nntmux_settings.tmp_unzip_path'); |
| 98 | 98 | $unrar_path = config('nntmux.tmp_unrar_path'); |
| 99 | 99 | |
| 100 | - if (! File::isWritable($nzb_path)) { |
|
| 100 | + if (!File::isWritable($nzb_path)) { |
|
| 101 | 101 | $this->warn($nzb_path.' is not writable. Please fix folder permissions'); |
| 102 | 102 | |
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - if (! file_exists($unrar_path)) { |
|
| 106 | + if (!file_exists($unrar_path)) { |
|
| 107 | 107 | $this->info('Creating missing '.$unrar_path.' folder'); |
| 108 | - if (! @File::makeDirectory($unrar_path) && ! File::isDirectory($unrar_path)) { |
|
| 108 | + if (!@File::makeDirectory($unrar_path) && !File::isDirectory($unrar_path)) { |
|
| 109 | 109 | throw new \RuntimeException('Unable to create '.$unrar_path.' folder'); |
| 110 | 110 | } |
| 111 | 111 | $this->info('Folder '.$unrar_path.' successfully created'); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | - if (! is_writable($unrar_path)) { |
|
| 114 | + if (!is_writable($unrar_path)) { |
|
| 115 | 115 | $this->warn($unrar_path.' is not writable. Please fix folder permissions'); |
| 116 | 116 | |
| 117 | 117 | return false; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if (! File::isWritable($covers_path)) { |
|
| 120 | + if (!File::isWritable($covers_path)) { |
|
| 121 | 121 | $this->warn($covers_path.' is not writable. Please fix folder permissions'); |
| 122 | 122 | |
| 123 | 123 | return false; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - if (! File::isWritable($zip_path)) { |
|
| 126 | + if (!File::isWritable($zip_path)) { |
|
| 127 | 127 | $this->warn($zip_path.' is not writable. Please fix folder permissions'); |
| 128 | 128 | |
| 129 | 129 | return false; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $meta_title = 'Browse Groups'; |
| 28 | 28 | $meta_keywords = 'browse,groups,description,details'; |
| 29 | 29 | $meta_description = 'Browse groups'; |
| 30 | - if (! empty($search)) { |
|
| 30 | + if (!empty($search)) { |
|
| 31 | 31 | $meta_title .= ' - Search: '.$search; |
| 32 | 32 | $meta_description = 'Browse groups search results for '.$search; |
| 33 | 33 | } |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | if ($method === '7' || $method === '8') { |
| 51 | 51 | $compressedHeaders = config('nntmux_nntp.compressed_headers'); |
| 52 | 52 | if ((config('nntmux_nntp.use_alternate_nntp_server') === true ? |
| 53 | - $nntp->doConnect($compressedHeaders, true) : |
|
| 54 | - $nntp->doConnect()) !== true) { |
|
| 53 | + $nntp->doConnect($compressedHeaders, true) : $nntp->doConnect()) !== true) { |
|
| 55 | 54 | $this->error('Unable to connect to usenet.'); |
| 56 | 55 | |
| 57 | 56 | return 1; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $limit = $this->argument('limit'); |
| 35 | 35 | |
| 36 | 36 | // Validate the limit argument |
| 37 | - if ($limit !== 'full' && ! is_numeric($limit)) { |
|
| 37 | + if ($limit !== 'full' && !is_numeric($limit)) { |
|
| 38 | 38 | $this->error('Limit must be "full" or a numeric value.'); |
| 39 | 39 | |
| 40 | 40 | return 1; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | // Create each index |
| 97 | 97 | foreach ($indexes as $indexName => $schema) { |
| 98 | - if (! $this->createIndex($indexName, $schema, $dropExisting)) { |
|
| 98 | + if (!$this->createIndex($indexName, $schema, $dropExisting)) { |
|
| 99 | 99 | $hasErrors = true; |
| 100 | 100 | } |
| 101 | 101 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $indices->drop(['index' => $indexName, 'body' => ['silent' => true]]); |
| 128 | 128 | $this->info("Successfully dropped {$indexName} index."); |
| 129 | 129 | } catch (ResponseException $e) { |
| 130 | - if (! str_contains($e->getMessage(), 'unknown index')) { |
|
| 130 | + if (!str_contains($e->getMessage(), 'unknown index')) { |
|
| 131 | 131 | $this->warn("Warning when dropping {$indexName} index: ".$e->getMessage()); |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | ]); |
| 30 | 30 | |
| 31 | 31 | // Check if password is correct |
| 32 | - if (! Hash::check($validated['current_password'], Auth::user()->password)) { |
|
| 32 | + if (!Hash::check($validated['current_password'], Auth::user()->password)) { |
|
| 33 | 33 | if ($request->expectsJson() || $request->ajax()) { |
| 34 | 34 | return response()->json([ |
| 35 | 35 | 'success' => false, |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | User::onlyTrashed() |
| 35 | 35 | ->where('deleted_at', '<', now()->subDays(config('nntmux.purge_inactive_users_days'))) |
| 36 | 36 | ->get() |
| 37 | - ->each(function ($user) { |
|
| 37 | + ->each(function($user) { |
|
| 38 | 38 | $user->forceDelete(); // Permanently delete the user |
| 39 | 39 | }); |
| 40 | 40 | } |