Passed
Push — master ( 4a7d5c...11a1e1 )
by Darko
06:42
created
app/Http/Controllers/Admin/AdminMusicController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             $id = $request->input('id');
49 49
             $mus = $music->getMusicInfo($id);
50 50
 
51
-            if (! $mus) {
51
+            if (!$mus) {
52 52
                 $this->show404();
53 53
             }
54 54
 
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
                     if ($_FILES['cover']['size'] > 0) {
60 60
                         $tmpName = $_FILES['cover']['tmp_name'];
61 61
                         $file_info = getimagesize($tmpName);
62
-                        if (! empty($file_info)) {
62
+                        if (!empty($file_info)) {
63 63
                             move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
64 64
                         }
65 65
                     }
66 66
 
67 67
                     $request->merge(['cover' => file_exists($coverLoc) ? 1 : 0]);
68
-                    $request->merge(['salesrank' => (empty($request->input('salesrank')) || ! ctype_digit($request->input('salesrank'))) ? 'null' : $request->input('salesrank')]);
69
-                    $request->merge(['releasedate' => (empty($request->input('releasedate')) || ! strtotime($request->input('releasedate'))) ? $mus['releasedate'] : Carbon::parse($request->input('releasedate'))->timestamp]);
68
+                    $request->merge(['salesrank' => (empty($request->input('salesrank')) || !ctype_digit($request->input('salesrank'))) ? 'null' : $request->input('salesrank')]);
69
+                    $request->merge(['releasedate' => (empty($request->input('releasedate')) || !strtotime($request->input('releasedate'))) ? $mus['releasedate'] : Carbon::parse($request->input('releasedate'))->timestamp]);
70 70
 
71 71
                     $music->update($id, $request->input('title'), $request->input('asin'), $request->input('url'), $request->input('salesrank'), $request->input('artist'), $request->input('publisher'), $request->input('releasedate'), $request->input('year'), $request->input('tracks'), $request->input('cover'), $request->input('genre'));
72 72
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminAnidbController.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
         $title = $meta_title = 'AniDB List';
21 21
 
22 22
         $aname = '';
23
-        if ($request->has('animetitle') && ! empty($request->input('animetitle'))) {
23
+        if ($request->has('animetitle') && !empty($request->input('animetitle'))) {
24 24
             $aname = $request->input('animetitle');
25 25
         }
26 26
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
             case 'view':
75 75
             default:
76
-                if (! empty($id)) {
76
+                if (!empty($id)) {
77 77
                     $this->title = 'AniDB Edit';
78 78
                     $AniDBAPIArray = $AniDB->getAnimeInfo($id);
79 79
                     $this->smarty->assign('anime', $AniDBAPIArray);
Please login to merge, or discard this patch.
app/Http/Controllers/BasePageController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
         ]);
180 180
 
181 181
         $role = User::ROLE_USER;
182
-        if (! empty($this->userdata)) {
182
+        if (!empty($this->userdata)) {
183 183
             $role = $this->userdata->roles_id;
184 184
         }
185 185
 
Please login to merge, or discard this patch.
app/Http/Controllers/AdultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@
 block discarded – undo
57 57
             $movies[] = $result;
58 58
         }
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', stripslashes($title));
62 62
 
63
-        $actors = ($request->has('actors') && ! empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
63
+        $actors = ($request->has('actors') && !empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
64 64
         $this->smarty->assign('actors', $actors);
65 65
 
66
-        $director = ($request->has('director') && ! empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
66
+        $director = ($request->has('director') && !empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
67 67
         $this->smarty->assign('director', $director);
68 68
 
69 69
         $genres = $adult->getAllGenres(true);
Please login to merge, or discard this patch.
app/Http/Controllers/AjaxController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         if ($request->has('action') && (int) $request->input('action') === 1 && $request->has('emailto')) {
17 17
             $emailTo = $request->input('emailto');
18 18
             $ret = User::sendInvite(url('/'), $this->userdata->id, $emailTo);
19
-            if (! $ret) {
19
+            if (!$ret) {
20 20
                 echo 'Invite not sent.';
21 21
             } else {
22 22
                 echo 'Invite sent. Alternatively paste them following link to register - '.$ret;
Please login to merge, or discard this patch.
app/Http/Controllers/SeriesController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 
39 39
             $show = Video::getByVideoID($id);
40 40
 
41
-            if (! $show) {
41
+            if (!$show) {
42 42
                 $this->smarty->assign('nodata', 'No video information for this series.');
43
-            } elseif (! $rel) {
43
+            } elseif (!$rel) {
44 44
                 $this->smarty->assign('nodata', 'No releases for this series.');
45 45
             } else {
46 46
                 $myshows = UserSerie::getShow($this->userdata->id, $show['id']);
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
                 $seriestitles = $seriessummary = $seriescountry = [];
68 68
                 $seriestitles[] = $show['title'];
69 69
 
70
-                if (! empty($show['summary'])) {
70
+                if (!empty($show['summary'])) {
71 71
                     $seriessummary[] = $show['summary'];
72 72
                 }
73 73
 
74
-                if (! empty($show['countries_id'])) {
74
+                if (!empty($show['countries_id'])) {
75 75
                     $seriescountry[] = $show['countries_id'];
76 76
                 }
77 77
 
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         } else {
106 106
             $letter = ($id && preg_match('/^(0\-9|[A-Z])$/i', $id)) ? $id : '0-9';
107 107
 
108
-            $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
108
+            $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : '';
109 109
 
110
-            if ($showname !== '' && ! $id) {
110
+            if ($showname !== '' && !$id) {
111 111
                 $letter = '';
112 112
             }
113 113
 
Please login to merge, or discard this patch.
Blacklight/AniDB.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function deleteTitle(int $anidbID): void
57 57
     {
58
-        DB::transaction(function () use ($anidbID) {
58
+        DB::transaction(function() use ($anidbID) {
59 59
             DB::delete(
60 60
                 sprintf(
61 61
                     '
Please login to merge, or discard this patch.
Blacklight/Genres.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     private function getListQuery(string $type = '', bool $activeOnly = false): string
59 59
     {
60
-        if (! empty($type)) {
60
+        if (!empty($type)) {
61 61
             $typesql = sprintf(' AND g.type = %d', $type);
62 62
         } else {
63 63
             $typesql = '';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function getCount(string $type = '', bool $activeOnly = false): mixed
105 105
     {
106
-        if (! empty($type)) {
106
+        if (!empty($type)) {
107 107
             $typesql = sprintf(' AND g.type = %d', $type);
108 108
         } else {
109 109
             $typesql = '';
Please login to merge, or discard this patch.
Blacklight/NZBContents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     $foundNFO = true;
140 140
                 }
141 141
 
142
-                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && ! preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
142
+                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && !preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
143 143
                     $hiddenID = (string) $nzbcontents->segments->segment;
144 144
                     $hiddenNFO = true;
145 145
                 }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             return false;
185 185
         }
186 186
         $nzbContents = Utility::unzipGzipFile($nzbPath);
187
-        if (! $nzbContents) {
187
+        if (!$nzbContents) {
188 188
             if ($this->echooutput) {
189 189
                 echo PHP_EOL.
190 190
                     'Unable to decompress: '.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         }
200 200
 
201 201
         $nzbFile = @simplexml_load_string($nzbContents);
202
-        if (! $nzbFile) {
202
+        if (!$nzbFile) {
203 203
             if ($this->echooutput) {
204 204
                 echo PHP_EOL."Unable to load NZB: $guid appears to be an invalid NZB, skipping.".PHP_EOL;
205 205
             }
Please login to merge, or discard this patch.