Passed
Push — master ( 9336af...1b242e )
by Darko
08:06
created
app/Models/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         // If there's an override and no mutator has been explicitly defined on
122 122
         // the model then use the override value
123
-        if ($override && ! $this->hasGetMutator($key)) {
123
+        if ($override && !$this->hasGetMutator($key)) {
124 124
             return $override->value;
125 125
         }
126 126
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         $results = self::cursor()->remember();
142 142
 
143 143
         $tree = [];
144
-        if (! empty($results)) {
144
+        if (!empty($results)) {
145 145
             foreach ($results as $result) {
146
-                if (! $excludeUnsectioned || ! empty($result->section)) {
146
+                if (!$excludeUnsectioned || !empty($result->section)) {
147 147
                     $tree[$result->section][$result->subsection][$result->name] =
148 148
                         ['value' => $result->value, 'hint' => $result->hint];
149 149
                 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiV2Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                 'search' => ['available' => 'yes', 'supportedParams' => 'id'],
52 52
                 'tv-search' => ['available' => 'yes', 'supportedParams' => 'id,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'],
53 53
                 'movie-search' => ['available' => 'yes', 'supportedParams' => 'id, imdbid, tmdbid, traktid'],
54
-                'audio-search' => ['available' => 'no',  'supportedParams' => ''],
54
+                'audio-search' => ['available' => 'no', 'supportedParams' => ''],
55 55
             ],
56 56
             'categories' => fractal($category, new CategoryTransformer),
57 57
         ];
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiInformController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,18 +19,18 @@
 block discarded – undo
19 19
      */
20 20
     public function release(Request $request): \Illuminate\Http\JsonResponse
21 21
     {
22
-        $releaseObName = $request->has('relo') && ! empty($request->input('relo')) ? $request->input('relo') : '';
23
-        $releasePrName = $request->has('relp') && ! empty($request->input('relp')) ? $request->input('relp') : '';
24
-        $apiToken = $request->has('api_token') && ! empty($request->input('api_token')) ? $request->input('api_token') : '';
22
+        $releaseObName = $request->has('relo') && !empty($request->input('relo')) ? $request->input('relo') : '';
23
+        $releasePrName = $request->has('relp') && !empty($request->input('relp')) ? $request->input('relp') : '';
24
+        $apiToken = $request->has('api_token') && !empty($request->input('api_token')) ? $request->input('api_token') : '';
25 25
         $user = User::query()->where('api_token', $request->input('api_token'))->first();
26
-        if (! $user) {
26
+        if (!$user) {
27 27
             return response()->json(['message' => 'Indexer inform error, wrong api key!'], 404);
28 28
         }
29 29
 
30
-        if (! empty($releaseObName) && ! empty($releasePrName) && ! empty($apiToken)) {
30
+        if (!empty($releaseObName) && !empty($releasePrName) && !empty($apiToken)) {
31 31
             ReleaseInform::insertOrIgnore(['relOName' => $releaseObName, 'relPName' => $releasePrName, 'api_token' => $apiToken, 'created_at' => now(), 'updated_at' => now()]);
32 32
             $release = Release::whereSearchname($releaseObName)->first();
33
-            if (! empty($release)) {
33
+            if (!empty($release)) {
34 34
                 (new NameFixer)->updateRelease($release, $releasePrName, 'Release Inform API', true, 'Filenames, ', 1, true);
35 35
             }
36 36
 
Please login to merge, or discard this patch.
app/Models/Predb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
             return $predb;
197 197
         }
198 198
         $sql = self::query()->leftJoin('releases', 'releases.predb_id', '=', 'predb.id')->orderByDesc('predb.predate');
199
-        if (! empty($search)) {
199
+        if (!empty($search)) {
200 200
             if (config('nntmux.elasticsearch_enabled') === true) {
201 201
                 $ids = (new ElasticSearchSiteSearch)->predbIndexSearch($search);
202 202
             } else {
Please login to merge, or discard this patch.
app/Console/Commands/CleanNZB.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                     }
Please login to merge, or discard this patch.
app/Models/MovieInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             return $movie;
83 83
         }
84 84
         $sql = self::query()->select('*');
85
-        if (! empty($search)) {
85
+        if (!empty($search)) {
86 86
             $sql->whereLike('title', '%'.$search.'%');
87 87
         }
88 88
 
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         Paginator::useBootstrapFive();
21 21
         $smarty = app('smarty.view');
22 22
         view()->share('smarty', $smarty);
23
-        Gate::define('viewPulse', function (User $user) {
23
+        Gate::define('viewPulse', function(User $user) {
24 24
             return $user->hasRole('Admin');
25 25
         });
26 26
         Event::listen(Login::class, LoginViaRemember::class);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminSiteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.