Completed
Push — master ( ed4c11...7d1e07 )
by Darko
30s queued 18s
created
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/Auth/ForgotPasswordController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         if (empty($email) && empty($rssToken)) {
47 47
             app('smarty.view')->assign('error', 'Missing parameter(email and/or apikey to send password reset');
48 48
         } else {
49
-            if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
49
+            if (config('captcha.enabled') === true && (!empty(config('captcha.secret')) && !empty(config('captcha.sitekey')))) {
50 50
                 $this->validate($request, [
51 51
                     'g-recaptcha-response' => 'required|captcha',
52 52
                 ]);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             //
55 55
             // Check users exists and send an email
56 56
             //
57
-            $ret = ! empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email);
57
+            $ret = !empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email);
58 58
             if ($ret === null) {
59 59
                 app('smarty.view')->assign('error', 'The email or apikey are not recognised.');
60 60
                 $sent = true;
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/LoginController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             if ($user !== null) {
78 78
                 $rememberMe = $request->has('rememberme') && $request->input('rememberme') === 'on';
79 79
 
80
-                if (! $user->isVerified() || $user->isPendingVerification()) {
80
+                if (!$user->isVerified() || $user->isPendingVerification()) {
81 81
                     $request->session()->flash('message', 'You have not verified your email address!');
82 82
 
83 83
                     return $this->showLoginForm();
Please login to merge, or discard this patch.
app/Http/Controllers/PasswordSecurityController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
     public function disable2fa(Disable2faPasswordSecurityRequest $request): \Illuminate\Routing\Redirector|RedirectResponse|\Illuminate\Contracts\Foundation\Application
78 78
     {
79
-        if (! (Hash::check($request->get('current-password'), $request->user()->password))) {
79
+        if (!(Hash::check($request->get('current-password'), $request->user()->password))) {
80 80
             // The passwords matches
81 81
             return redirect()->back()->with('error', 'Your password does not match with your account password. Please try again.');
82 82
         }
Please login to merge, or discard this patch.
app/Http/Controllers/AnimeController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
             $meta_keywords = 'view,anime,anidb,description,details';
48 48
             $meta_description = 'View '.$aniDbInfo->title.' Anime';
49 49
 
50
-            if (! $this->releases && ! $aniDbInfo) {
50
+            if (!$this->releases && !$aniDbInfo) {
51 51
                 $this->smarty->assign('nodata', 'No releases and AniDB info for this series.');
52
-            } elseif (! $aniDbInfo) {
52
+            } elseif (!$aniDbInfo) {
53 53
                 $this->smarty->assign('nodata', 'No AniDB information for this series.');
54
-            } elseif (! $aniDbReleases) {
54
+            } elseif (!$aniDbReleases) {
55 55
                 $this->smarty->assign('nodata', 'No releases for this series.');
56 56
             } else {
57 57
                 $this->smarty->assign('animeEpisodeTitles', $aniDbReleases);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $this->setPreferences();
88 88
         $letter = ($request->has('id') && preg_match('/^(0\-9|[A-Z])$/i', $request->input('id'))) ? $request->input('id') : '0-9';
89 89
 
90
-        $animeTitle = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
90
+        $animeTitle = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : '';
91 91
 
92 92
         if ($animeTitle !== '' && $request->missing('id')) {
93 93
             $letter = '';
Please login to merge, or discard this patch.
app/Http/Controllers/BrowseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $this->smarty->assign('category', -1);
21 21
 
22 22
         $ordering = $releases->getBrowseOrdering();
23
-        $orderBy = $request->has('ob') && ! empty($request->input('ob')) ? $request->input('ob') : '';
23
+        $orderBy = $request->has('ob') && !empty($request->input('ob')) ? $request->input('ob') : '';
24 24
         $page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
25 25
         $offset = ($page - 1) * config('nntmux.items_per_page');
26 26
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $this->smarty->assign('category', $category);
84 84
 
85 85
         $ordering = $releases->getBrowseOrdering();
86
-        $orderBy = $request->has('ob') && ! empty($request->input('ob')) ? $request->input('ob') : '';
86
+        $orderBy = $request->has('ob') && !empty($request->input('ob')) ? $request->input('ob') : '';
87 87
         $page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
88 88
         $offset = ($page - 1) * config('nntmux.items_per_page');
89 89
 
Please login to merge, or discard this patch.
app/Http/Controllers/MusicController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@
 block discarded – undo
54 54
         $rslt = $music->getMusicRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, $this->userdata->categoryexclusions);
55 55
         $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
56 56
 
57
-        $artist = ($request->has('artist') && ! empty($request->input('artist'))) ? stripslashes($request->input('artist')) : '';
57
+        $artist = ($request->has('artist') && !empty($request->input('artist'))) ? stripslashes($request->input('artist')) : '';
58 58
         $this->smarty->assign('artist', $artist);
59 59
 
60
-        $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
60
+        $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
61 61
         $this->smarty->assign('title', $title);
62 62
 
63 63
         $genres = $gen->getGenres(Genres::MUSIC_TYPE, true);
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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('indexer.categorise.catwebdl') === 0) {
426
+            if (str_contains($categoryIDs, (string) Category::TV_HD) && !str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('indexer.categorise.catwebdl') === 0) {
427 427
                 $categoryIDs .= (','.Category::TV_WEBDL);
428 428
             }
429 429
             $categoryID = explode(',', $categoryIDs);
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.