@@ -44,9 +44,9 @@ discard block |
||
| 44 | 44 | $seriessummary = ''; |
| 45 | 45 | $seriescountry = ''; |
| 46 | 46 | |
| 47 | - if (! $show) { |
|
| 47 | + if (!$show) { |
|
| 48 | 48 | $nodata = 'No video information for this series.'; |
| 49 | - } elseif (! $rel) { |
|
| 49 | + } elseif (!$rel) { |
|
| 50 | 50 | $nodata = 'No releases for this series.'; |
| 51 | 51 | } else { |
| 52 | 52 | $myshows = UserSerie::getShow($this->userdata->id, $show['id']); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if (empty($r->episode) || (int) $r->episode === 0) { |
| 68 | 68 | $r->episode = (int) $meta->episode; |
| 69 | 69 | } |
| 70 | - if ((! $meta->series || (int) $meta->series === 0) && ! empty($meta->firstaired)) { |
|
| 70 | + if ((!$meta->series || (int) $meta->series === 0) && !empty($meta->firstaired)) { |
|
| 71 | 71 | if (empty($r->series) || (int) $r->series === 0) { |
| 72 | 72 | $r->series = (int) Carbon::parse($meta->firstaired)->format('Y'); |
| 73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $r->episode = (int) Carbon::parse($meta->firstaired)->format('md'); |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | - } elseif (! empty($r->firstaired)) { |
|
| 78 | + } elseif (!empty($r->firstaired)) { |
|
| 79 | 79 | if (empty($r->series) || (int) $r->series === 0) { |
| 80 | 80 | $r->series = (int) Carbon::parse($r->firstaired)->format('Y'); |
| 81 | 81 | } |
@@ -84,10 +84,10 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if ((empty($r->series) || (int) $r->series === 0 || empty($r->episode) || (int) $r->episode === 0) && ! empty($r->searchname)) { |
|
| 87 | + if ((empty($r->series) || (int) $r->series === 0 || empty($r->episode) || (int) $r->episode === 0) && !empty($r->searchname)) { |
|
| 88 | 88 | $matched = false; |
| 89 | 89 | |
| 90 | - if (! $matched && preg_match('/\bS(\d{1,2})E(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 90 | + if (!$matched && preg_match('/\bS(\d{1,2})E(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 91 | 91 | if (empty($r->series) || (int) $r->series === 0) { |
| 92 | 92 | $r->series = (int) $m[1]; |
| 93 | 93 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $matched = true; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if (! $matched && preg_match('/\b(\d{1,2})x(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 100 | + if (!$matched && preg_match('/\b(\d{1,2})x(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 101 | 101 | if (empty($r->series) || (int) $r->series === 0) { |
| 102 | 102 | $r->series = (int) $m[1]; |
| 103 | 103 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | $matched = true; |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - if (! $matched && preg_match('/\bSeason[\s._-]*(\d{1,2})[\s._-]*Episode[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 110 | + if (!$matched && preg_match('/\bSeason[\s._-]*(\d{1,2})[\s._-]*Episode[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 111 | 111 | if (empty($r->series) || (int) $r->series === 0) { |
| 112 | 112 | $r->series = (int) $m[1]; |
| 113 | 113 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $matched = true; |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - if (! $matched && preg_match('/\b(\d)(0[1-9]|[1-9]\d)\b/', $r->searchname, $m)) { |
|
| 120 | + if (!$matched && preg_match('/\b(\d)(0[1-9]|[1-9]\d)\b/', $r->searchname, $m)) { |
|
| 121 | 121 | if ((empty($r->series) || (int) $r->series === 0) && (empty($r->episode) || (int) $r->episode === 0)) { |
| 122 | 122 | $r->series = (int) $m[1]; |
| 123 | 123 | $r->episode = (int) $m[2]; |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if (! $matched && preg_match('/\b(\d{4})[._-](\d{2})[._-](\d{2})\b/', $r->searchname, $m)) { |
|
| 128 | + if (!$matched && preg_match('/\b(\d{4})[._-](\d{2})[._-](\d{2})\b/', $r->searchname, $m)) { |
|
| 129 | 129 | if (empty($r->series) || (int) $r->series === 0) { |
| 130 | 130 | $r->series = (int) $m[1]; |
| 131 | 131 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $matched = true; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - if (! $matched && preg_match('/\b(?:Part|Pt)[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 138 | + if (!$matched && preg_match('/\b(?:Part|Pt)[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 139 | 139 | if (empty($r->episode) || (int) $r->episode === 0) { |
| 140 | 140 | $r->episode = (int) $m[1]; |
| 141 | 141 | if (empty($r->series) || (int) $r->series === 0) { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - if (! $matched && (empty($r->episode) || (int) $r->episode === 0) && preg_match('/\bEp?[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 148 | + if (!$matched && (empty($r->episode) || (int) $r->episode === 0) && preg_match('/\bEp?[\s._-]*(\d{1,3})\b/i', $r->searchname, $m)) { |
|
| 149 | 149 | $r->episode = (int) $m[1]; |
| 150 | 150 | if (empty($r->series) || (int) $r->series === 0) { |
| 151 | 151 | $r->series = 1; |
@@ -174,11 +174,11 @@ discard block |
||
| 174 | 174 | $seriestitlesArray = $seriessummaryArray = $seriescountryArray = []; |
| 175 | 175 | $seriestitlesArray[] = $show['title']; |
| 176 | 176 | |
| 177 | - if (! empty($show['summary'])) { |
|
| 177 | + if (!empty($show['summary'])) { |
|
| 178 | 178 | $seriessummaryArray[] = $show['summary']; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - if (! empty($show['countries_id'])) { |
|
| 181 | + if (!empty($show['countries_id'])) { |
|
| 182 | 182 | $seriescountryArray[] = $show['countries_id']; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $totalSeasonsAired = 0; |
| 199 | 199 | $totalEpisodesAired = 0; |
| 200 | 200 | |
| 201 | - if (! empty($show['id'])) { |
|
| 201 | + if (!empty($show['id'])) { |
|
| 202 | 202 | $episodeStats = \App\Models\TvEpisode::query() |
| 203 | 203 | ->where('videos_id', $show['id']) |
| 204 | 204 | ->whereNotNull('firstaired') |
@@ -207,10 +207,10 @@ discard block |
||
| 207 | 207 | ->first(); |
| 208 | 208 | |
| 209 | 209 | if ($episodeStats) { |
| 210 | - if (! empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') { |
|
| 210 | + if (!empty($episodeStats->first_aired) && $episodeStats->first_aired != '0000-00-00') { |
|
| 211 | 211 | $firstEpisodeAired = \Carbon\Carbon::parse($episodeStats->first_aired); |
| 212 | 212 | } |
| 213 | - if (! empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') { |
|
| 213 | + if (!empty($episodeStats->last_aired) && $episodeStats->last_aired != '0000-00-00') { |
|
| 214 | 214 | $lastEpisodeAired = \Carbon\Carbon::parse($episodeStats->last_aired); |
| 215 | 215 | } |
| 216 | 216 | $totalSeasonsAired = $episodeStats->total_seasons ?? 0; |
@@ -257,9 +257,9 @@ discard block |
||
| 257 | 257 | } else { |
| 258 | 258 | $letter = ($id && preg_match('/^(0-9|[A-Z])$/i', $id)) ? $id : '0-9'; |
| 259 | 259 | |
| 260 | - $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : ''; |
|
| 260 | + $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : ''; |
|
| 261 | 261 | |
| 262 | - if ($showname !== '' && ! $id) { |
|
| 262 | + if ($showname !== '' && !$id) { |
|
| 263 | 263 | $letter = ''; |
| 264 | 264 | } |
| 265 | 265 | |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | $cacheKey = 'trending_tv_top_15_48h'; |
| 303 | 303 | |
| 304 | 304 | // Get trending TV shows from cache or calculate (refresh every hour) |
| 305 | - $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function () { |
|
| 305 | + $trendingShows = \Illuminate\Support\Facades\Cache::remember($cacheKey, 3600, function() { |
|
| 306 | 306 | // Calculate timestamp for 48 hours ago |
| 307 | 307 | $fortyEightHoursAgo = \Illuminate\Support\Carbon::now()->subHours(48); |
| 308 | 308 | |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $bar->start(); |
| 63 | 63 | |
| 64 | 64 | // Chunk through releases to avoid loading all models simultaneously |
| 65 | - $baseQuery->chunkById(1000, function ($chunk) use ($bar) { |
|
| 65 | + $baseQuery->chunkById(1000, function($chunk) use ($bar) { |
|
| 66 | 66 | foreach ($chunk as $release) { |
| 67 | 67 | Release::query()->where('id', $release->id)->update([ |
| 68 | 68 | // Reset association so TV pipeline picks them up again |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | public function boot(): void |
| 23 | 23 | { |
| 24 | 24 | // Add global scope to eager load author with role for all post queries |
| 25 | - Post::addGlobalScope('withAuthorRole', function (Builder $builder) { |
|
| 25 | + Post::addGlobalScope('withAuthorRole', function(Builder $builder) { |
|
| 26 | 26 | $builder->with(['author.role']); |
| 27 | 27 | }); |
| 28 | 28 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $res = $this->client->get($url); |
| 43 | 43 | $html = (string) $res->getBody(); |
| 44 | 44 | $dom = HtmlDomParser::str_get_html($html); |
| 45 | - if (! $dom) { |
|
| 45 | + if (!$dom) { |
|
| 46 | 46 | Cache::put($cacheKey, false, now()->addHours(6)); |
| 47 | 47 | |
| 48 | 48 | return false; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | // Plot |
| 75 | 75 | $plot = ''; |
| 76 | 76 | $plotNode = $dom->findOne("span[data-testid='plot-l']"); |
| 77 | - if (! $plotNode) { |
|
| 77 | + if (!$plotNode) { |
|
| 78 | 78 | $plotNode = $dom->findOne("span[data-testid='plot-xl']"); |
| 79 | 79 | } |
| 80 | 80 | if ($plotNode) { |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $json = json_decode((string) $res->getBody(), true); |
| 195 | 195 | $results = []; |
| 196 | 196 | foreach (($json['d'] ?? []) as $row) { |
| 197 | - if (! isset($row['id']) || ! str_starts_with($row['id'], 'tt')) { |
|
| 197 | + if (!isset($row['id']) || !str_starts_with($row['id'], 'tt')) { |
|
| 198 | 198 | continue; |
| 199 | 199 | } |
| 200 | 200 | $id = substr($row['id'], 2); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $normalized = preg_replace('/^tt/i', '', $normalized); // remove leading tt if present |
| 27 | 27 | $imdbId = preg_replace('/\D/', '', $normalized); // keep digits only |
| 28 | 28 | |
| 29 | - if ($imdbId === '' || ! ctype_digit($imdbId) || strlen($imdbId) < 5) { |
|
| 29 | + if ($imdbId === '' || !ctype_digit($imdbId) || strlen($imdbId) < 5) { |
|
| 30 | 30 | $this->error('Invalid IMDb id provided: '.$raw.' (parsed: '.$imdbId.')'); |
| 31 | 31 | |
| 32 | 32 | return self::FAILURE; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $ok = $movie->updateMovieInfo($imdbId); |
| 48 | 48 | |
| 49 | - if (! $ok) { |
|
| 49 | + if (!$ok) { |
|
| 50 | 50 | $this->error('Failed to fetch/update movie data for tt'.$imdbId.'.'); |
| 51 | 51 | |
| 52 | 52 | return self::FAILURE; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | use GuzzleHttp\Client; |
| 12 | 12 | use GuzzleHttp\Exception\RequestException; |
| 13 | 13 | |
| 14 | -if (! function_exists('getRawHtmlWithAgeVerification')) { |
|
| 14 | +if (!function_exists('getRawHtmlWithAgeVerification')) { |
|
| 15 | 15 | /** |
| 16 | 16 | * Get raw HTML with automatic age verification handling |
| 17 | 17 | * |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | -if (! function_exists('initializeAdultSiteCookies')) { |
|
| 103 | +if (!function_exists('initializeAdultSiteCookies')) { |
|
| 104 | 104 | /** |
| 105 | 105 | * Initialize age verification cookies for all adult sites |
| 106 | 106 | * Run this once during application setup |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | -if (! function_exists('getAdultSiteCookieStats')) { |
|
| 154 | +if (!function_exists('getAdultSiteCookieStats')) { |
|
| 155 | 155 | /** |
| 156 | 156 | * Get statistics about stored adult site cookies |
| 157 | 157 | * |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -if (! function_exists('clearAdultSiteCookies')) { |
|
| 168 | +if (!function_exists('clearAdultSiteCookies')) { |
|
| 169 | 169 | /** |
| 170 | 170 | * Clear all stored adult site cookies |
| 171 | 171 | * |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | // Others can only see content for their role or everyone |
| 116 | - return $query->where(function ($q) use ($role) { |
|
| 116 | + return $query->where(function($q) use ($role) { |
|
| 117 | 117 | $q->where('role', self::ROLE_EVERYONE) |
| 118 | 118 | ->orWhere('role', $role); |
| 119 | 119 | }); |
@@ -204,7 +204,7 @@ |
||
| 204 | 204 | if (!$hasProtocol && !$isDomain) { |
| 205 | 205 | // Ensure internal URL starts with / |
| 206 | 206 | if ($url !== '/' && !str_starts_with($url, '/')) { |
| 207 | - $data['url'] = '/' . $url; |
|
| 207 | + $data['url'] = '/'.$url; |
|
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | // Ensure internal URL ends with / |
@@ -31,8 +31,8 @@ |
||
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | 33 | // Email views expect $site to be the string provided by the mailable |
| 34 | - if (! $isEmailView) { |
|
| 35 | - $viewData['site'] = $siteArray; // Now it's a proper array, not a Settings model |
|
| 34 | + if (!$isEmailView) { |
|
| 35 | + $viewData['site'] = $siteArray; // Now it's a proper array, not a Settings model |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // Load useful links for sidebar |