Passed
Push — master ( 316eb7...69e593 )
by Darko
08:25
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/NntmuxPopulateSearchIndexes.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $manticore->truncateRTIndex(Arr::wrap('releases_rt'));
65 65
         $data = [];
66 66
         $total = Release::count();
67
-        if (! $total) {
67
+        if (!$total) {
68 68
             $this->warn('Releases table is empty. Nothing to do.');
69 69
             exit();
70 70
         }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             ->select(['releases.id', 'releases.name', 'releases.searchname', 'releases.fromname', 'releases.categories_id'])
85 85
             ->selectRaw('IFNULL(GROUP_CONCAT(release_files.name SEPARATOR " "),"") filename')
86 86
             ->groupBy('id')
87
-            ->chunk($max, function ($releases) use ($manticore, $bar, $data) {
87
+            ->chunk($max, function($releases) use ($manticore, $bar, $data) {
88 88
                 foreach ($releases as $r) {
89 89
                     $data[] = [
90 90
                         'id' => $r->id,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $data = [];
113 113
 
114 114
         $total = Predb::count();
115
-        if (! $total) {
115
+        if (!$total) {
116 116
             $this->warn('PreDB table is empty. Nothing to do.');
117 117
             exit();
118 118
         }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             ->select(['id', 'title', 'filename', 'source'])
130 130
             ->groupBy('id')
131 131
             ->orderBy('id')
132
-            ->chunk($max, function ($pre) use ($manticore, $bar, $data) {
132
+            ->chunk($max, function($pre) use ($manticore, $bar, $data) {
133 133
                 foreach ($pre as $p) {
134 134
                     $data[] = [
135 135
                         'id' => $p->id,
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $data = ['body' => []];
152 152
         $elastic = new ElasticSearchSiteSearch;
153 153
         $total = Release::count();
154
-        if (! $total) {
154
+        if (!$total) {
155 155
             $this->warn('Could not get database information for releases table.');
156 156
             exit();
157 157
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->select(['releases.id', 'releases.name', 'releases.searchname', 'releases.fromname', 'releases.categories_id', 'releases.postdate'])
170 170
             ->selectRaw('IFNULL(GROUP_CONCAT(release_files.name SEPARATOR " "),"") filename')
171 171
             ->groupBy('id')
172
-            ->chunk($max, function ($releases) use ($bar, $data) {
172
+            ->chunk($max, function($releases) use ($bar, $data) {
173 173
                 foreach ($releases as $r) {
174 174
                     $searchName = str_replace(['.', '-'], ' ', $r->searchname);
175 175
                     $data['body'][] = [
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $data = ['body' => []];
203 203
         $elastic = new ElasticSearchSiteSearch;
204 204
         $total = Predb::count();
205
-        if (! $total) {
205
+        if (!$total) {
206 206
             $this->warn('Could not get database information for predb table.');
207 207
             exit();
208 208
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
             ->select(['id', 'title', 'filename', 'source'])
220 220
             ->groupBy('id')
221 221
             ->orderBy('id')
222
-            ->chunk($max, function ($pre) use ($bar, $data) {
222
+            ->chunk($max, function($pre) use ($bar, $data) {
223 223
                 foreach ($pre as $p) {
224 224
                     $data['body'][] = [
225 225
                         'index' => [
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.