Passed
Push — master ( c24f5e...6d5aa7 )
by Darko
29:04 queued 18:41
created
app/Http/Controllers/Admin/AdminCollectionRegexesController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
         $meta_title = $title = 'Collections Regex List';
21 21
 
22
-        $group = ($request->has('group') && ! empty($request->input('group')) ? $request->input('group') : '');
22
+        $group = ($request->has('group') && !empty($request->input('group')) ? $request->input('group') : '');
23 23
         $regex = $regexes->getRegex($group);
24 24
 
25 25
         $this->viewData = array_merge($this->viewData, [
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                     $request->merge(['description' => '']);
62 62
                 }
63 63
 
64
-                if (! is_numeric($request->input('ordinal')) || $request->input('ordinal') < 0) {
64
+                if (!is_numeric($request->input('ordinal')) || $request->input('ordinal') < 0) {
65 65
                     $error = 'Ordinal must be a number, 0 or higher.';
66 66
                     break;
67 67
                 }
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $this->setAdminPrefs();
107 107
         $meta_title = $title = 'Collections Regex Test';
108 108
 
109
-        $group = trim($request->has('group') && ! empty($request->input('group')) ? $request->input('group') : '');
110
-        $regex = trim($request->has('regex') && ! empty($request->input('regex')) ? $request->input('regex') : '');
109
+        $group = trim($request->has('group') && !empty($request->input('group')) ? $request->input('group') : '');
110
+        $regex = trim($request->has('regex') && !empty($request->input('regex')) ? $request->input('regex') : '');
111 111
         $limit = ($request->has('limit') && is_numeric($request->input('limit')) ? $request->input('limit') : 50);
112 112
 
113 113
         $data = null;
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminGameController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         // Get search parameter
23 23
         $search = $request->input('gamesearch', '');
24 24
 
25
-        if (! empty($search)) {
25
+        if (!empty($search)) {
26 26
             $gamelist = $game->getRange($search);
27 27
             $lastSearch = $search;
28 28
         } else {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             $id = $request->input('id');
50 50
             $game = $games->getGamesInfoById($id);
51 51
 
52
-            if (! $game) {
52
+            if (!$game) {
53 53
                 abort(404, 'Game not found');
54 54
             }
55 55
 
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
                     if ($request->hasFile('cover') && $request->file('cover')->isValid()) {
61 61
                         $file = $request->file('cover');
62 62
                         $file_info = getimagesize($file->getPathname());
63
-                        if (! empty($file_info)) {
63
+                        if (!empty($file_info)) {
64 64
                             $file->move(storage_path('covers/games/'), $id.'.jpg');
65 65
                         }
66 66
                     }
67 67
 
68 68
                     $cover = file_exists($coverLoc) ? 1 : 0;
69
-                    $releasedate = (empty($request->input('releasedate')) || ! strtotime($request->input('releasedate')))
69
+                    $releasedate = (empty($request->input('releasedate')) || !strtotime($request->input('releasedate')))
70 70
                         ? $game['releasedate']
71 71
                         : Carbon::parse($request->input('releasedate'))->timestamp;
72 72
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminMovieController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function create(Request $request)
37 37
     {
38
-        if (! \defined('STDOUT')) {
38
+        if (!\defined('STDOUT')) {
39 39
             \define('STDOUT', fopen('php://stdout', 'wb'));
40 40
         }
41 41
 
42 42
         $title = 'Movie Add';
43 43
 
44 44
         // If no ID provided, show the add form
45
-        if (! $request->has('id')) {
45
+        if (!$request->has('id')) {
46 46
             return view('admin.movies.add', compact('title'));
47 47
         }
48 48
 
49 49
         // Validate the IMDB ID
50 50
         $id = $request->input('id');
51 51
 
52
-        if (! is_numeric($id)) {
52
+        if (!is_numeric($id)) {
53 53
             return redirect()->back()
54 54
                 ->with('error', 'Invalid IMDB ID. Please enter only numeric digits (without the "tt" prefix).')
55 55
                 ->withInput();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $title = 'Movie Edit';
106 106
 
107 107
         // Check if ID is provided
108
-        if (! $request->has('id')) {
108
+        if (!$request->has('id')) {
109 109
             return redirect()->to('admin/movie-list')
110 110
                 ->with('error', 'No movie ID provided.');
111 111
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         // Handle update from TMDB
122 122
         if ($request->has('update') && (int) $request->input('update') === 1) {
123 123
             try {
124
-                if (! \defined('STDOUT')) {
124
+                if (!\defined('STDOUT')) {
125 125
                     \define('STDOUT', fopen('php://stdout', 'wb'));
126 126
                 }
127 127
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 $backdropLoc = public_path('covers/movies/'.$id.'-backdrop.jpg');
150 150
 
151 151
                 // Ensure directory exists
152
-                if (! file_exists(public_path('covers/movies'))) {
152
+                if (!file_exists(public_path('covers/movies'))) {
153 153
                     mkdir(public_path('covers/movies'), 0755, true);
154 154
                 }
155 155
 
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
@@ -49,9 +49,9 @@
 block discarded – undo
49 49
         $rslt = $music->getMusicRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, $this->userdata->categoryexclusions);
50 50
         $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
51 51
 
52
-        $artist = ($request->has('artist') && ! empty($request->input('artist'))) ? stripslashes($request->input('artist')) : '';
52
+        $artist = ($request->has('artist') && !empty($request->input('artist'))) ? stripslashes($request->input('artist')) : '';
53 53
 
54
-        $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
54
+        $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
55 55
 
56 56
         $genres = $gen->getGenres(Genres::MUSIC_TYPE, true);
57 57
         $tmpgnr = [];
Please login to merge, or discard this patch.
app/Http/Controllers/SeriesController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
             $seriessummary = '';
41 41
             $seriescountry = '';
42 42
 
43
-            if (! $show) {
43
+            if (!$show) {
44 44
                 $nodata = 'No video information for this series.';
45
-            } elseif (! $rel) {
45
+            } elseif (!$rel) {
46 46
                 $nodata = 'No releases for this series.';
47 47
             } else {
48 48
                 $myshows = UserSerie::getShow($this->userdata->id, $show['id']);
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
                 $seriestitlesArray = $seriessummaryArray = $seriescountryArray = [];
68 68
                 $seriestitlesArray[] = $show['title'];
69 69
 
70
-                if (! empty($show['summary'])) {
70
+                if (!empty($show['summary'])) {
71 71
                     $seriessummaryArray[] = $show['summary'];
72 72
                 }
73 73
 
74
-                if (! empty($show['countries_id'])) {
74
+                if (!empty($show['countries_id'])) {
75 75
                     $seriescountryArray[] = $show['countries_id'];
76 76
                 }
77 77
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $totalSeasonsAired = 0;
92 92
             $totalEpisodesAired = 0;
93 93
 
94
-            if (! empty($show['id'])) {
94
+            if (!empty($show['id'])) {
95 95
                 $episodeStats = \App\Models\TvEpisode::query()
96 96
                     ->where('videos_id', $show['id'])
97 97
                     ->whereNotNull('firstaired')
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
                     ->first();
101 101
 
102 102
                 if ($episodeStats) {
103
-                    if (! empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') {
103
+                    if (!empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') {
104 104
                         $firstEpisodeAired = \Carbon\Carbon::parse($episodeStats->first_aired);
105 105
                     }
106
-                    if (! empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') {
106
+                    if (!empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') {
107 107
                         $lastEpisodeAired = \Carbon\Carbon::parse($episodeStats->last_aired);
108 108
                     }
109 109
                     $totalSeasonsAired = $episodeStats->total_seasons ?? 0;
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
         } else {
143 143
             $letter = ($id && preg_match('/^(0\-9|[A-Z])$/i', $id)) ? $id : '0-9';
144 144
 
145
-            $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
145
+            $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : '';
146 146
 
147
-            if ($showname !== '' && ! $id) {
147
+            if ($showname !== '' && !$id) {
148 148
                 $letter = '';
149 149
             }
150 150
 
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
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $releases = new Releases;
18 18
 
19 19
         $ordering = $releases->getBrowseOrdering();
20
-        $orderBy = $request->has('ob') && ! empty($request->input('ob')) ? $request->input('ob') : '';
20
+        $orderBy = $request->has('ob') && !empty($request->input('ob')) ? $request->input('ob') : '';
21 21
         $page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
22 22
         $offset = ($page - 1) * config('nntmux.items_per_page');
23 23
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $catarray[] = $category;
67 67
 
68 68
         $ordering = $releases->getBrowseOrdering();
69
-        $orderBy = $request->has('ob') && ! empty($request->input('ob')) ? $request->input('ob') : '';
69
+        $orderBy = $request->has('ob') && !empty($request->input('ob')) ? $request->input('ob') : '';
70 70
         $page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
71 71
         $offset = ($page - 1) * config('nntmux.items_per_page');
72 72
 
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
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
         ];
61 61
 
62 62
         // Initialize userdata property for controllers that need it
63
-        $this->middleware(function ($request, $next) {
63
+        $this->middleware(function($request, $next) {
64 64
             if (Auth::check()) {
65 65
                 $this->userdata = User::find(Auth::id());
66 66
                 $this->userdata->categoryexclusions = User::getCategoryExclusionById(Auth::id());
Please login to merge, or discard this patch.
app/Http/Controllers/MovieController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $movie = new Movie(['Settings' => $this->settings]);
17 17
 
18
-        $moviecats = Category::getChildren(Category::MOVIE_ROOT)->map(function ($mcat) {
18
+        $moviecats = Category::getChildren(Category::MOVIE_ROOT)->map(function($mcat) {
19 19
             return ['id' => $mcat->id, 'title' => $mcat->title];
20 20
         });
21 21
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 
33 33
         $orderby = $request->input('ob', '');
34 34
         $ordering = $movie->getMovieOrdering();
35
-        if (! in_array($orderby, $ordering, false)) {
35
+        if (!in_array($orderby, $ordering, false)) {
36 36
             $orderby = '';
37 37
         }
38 38
 
39 39
         $rslt = $movie->getMovieRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, -1, $this->userdata->categoryexclusions);
40 40
         $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
41 41
 
42
-        $movies = $results->map(function ($result) {
42
+        $movies = $results->map(function($result) {
43 43
             $result['genre'] = makeFieldLinks($result, 'genre', 'movies');
44 44
             $result['actors'] = makeFieldLinks($result, 'actors', 'movies');
45 45
             $result['director'] = makeFieldLinks($result, 'director', 'movies');
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         // Get movie info
99 99
         $movieInfo = $movie->getMovieInfo($imdbid);
100 100
 
101
-        if (! $movieInfo) {
101
+        if (!$movieInfo) {
102 102
             return redirect()->route('Movies')->with('error', 'Movie not found');
103 103
         }
104 104
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         // Filter to only this movie's IMDB ID
109 109
         $movieData = collect($rslt)->firstWhere('imdbid', $imdbid);
110 110
 
111
-        if (! $movieData) {
111
+        if (!$movieData) {
112 112
             return redirect()->route('Movies')->with('error', 'No releases found for this movie');
113 113
         }
114 114
 
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
         }
134 134
 
135 135
         // Only process fields if they exist and are not empty
136
-        if (! empty($movieArray['genre'])) {
136
+        if (!empty($movieArray['genre'])) {
137 137
             $movieArray['genre'] = makeFieldLinks($movieArray, 'genre', 'movies');
138 138
         }
139
-        if (! empty($movieArray['actors'])) {
139
+        if (!empty($movieArray['actors'])) {
140 140
             $movieArray['actors'] = makeFieldLinks($movieArray, 'actors', 'movies');
141 141
         }
142
-        if (! empty($movieArray['director'])) {
142
+        if (!empty($movieArray['director'])) {
143 143
             $movieArray['director'] = makeFieldLinks($movieArray, 'director', 'movies');
144 144
         }
145 145
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         if ($request->has('id') && ctype_digit($request->input('id'))) {
188 188
             $mov = $movie->getMovieInfo($request->input('id'));
189 189
 
190
-            if (! $mov) {
190
+            if (!$mov) {
191 191
                 return response()->json(['message' => 'There is no trailer for this movie.'], 404);
192 192
             }
193 193
 
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
@@ -52,11 +52,11 @@
 block discarded – undo
52 52
             $movies[] = $result;
53 53
         }
54 54
 
55
-        $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
55
+        $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
56 56
 
57
-        $actors = ($request->has('actors') && ! empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
57
+        $actors = ($request->has('actors') && !empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
58 58
 
59
-        $director = ($request->has('director') && ! empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
59
+        $director = ($request->has('director') && !empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
60 60
 
61 61
         $genres = $adult->getAllGenres(true);
62 62
         $genre = ($request->has('genre') && \in_array($request->input('genre'), $genres, false)) ? $request->input('genre') : '';
Please login to merge, or discard this patch.