mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-08 04:00:14 -05:00
Merge pull request #3937 from HDInnovations/PHPStan-Errors
(Fix) PHPStan Errors
This commit is contained in:
@@ -23,7 +23,7 @@ trait PasswordValidationRules
|
||||
/**
|
||||
* Get the validation rules used to validate passwords.
|
||||
*
|
||||
* @return array<int, \Illuminate\Contracts\Validation\Rule|array|string>
|
||||
* @return array<int, \Illuminate\Contracts\Validation\Rule|string>
|
||||
*/
|
||||
protected function passwordRules(): array
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ class AutoBanDisposableUsers extends Command
|
||||
$user->save();
|
||||
|
||||
// Log The Ban To Ban Log
|
||||
$domain = substr(strrchr((string) $user->email, '@'), 1);
|
||||
$domain = substr((string) strrchr((string) $user->email, '@'), 1);
|
||||
$logban = new Ban();
|
||||
$logban->owned_by = $user->id;
|
||||
$logban->created_by = User::SYSTEM_USER_ID;
|
||||
|
||||
+114
-202
@@ -479,7 +479,10 @@ Menu
|
||||
}
|
||||
}
|
||||
|
||||
private function fetchMovie($id): mixed
|
||||
/**
|
||||
* @throws \Illuminate\Http\Client\ConnectionException
|
||||
*/
|
||||
private function fetchMovie(int $id): mixed
|
||||
{
|
||||
sleep(2);
|
||||
$tmdbScraper = new TMDBScraper();
|
||||
@@ -488,7 +491,10 @@ Menu
|
||||
return (new Movie($id))->data;
|
||||
}
|
||||
|
||||
private function fetchTv($id): mixed
|
||||
/**
|
||||
* @throws \Illuminate\Http\Client\ConnectionException
|
||||
*/
|
||||
private function fetchTv(int $id): mixed
|
||||
{
|
||||
sleep(2);
|
||||
$tmdbScraper = new TMDBScraper();
|
||||
@@ -497,215 +503,121 @@ Menu
|
||||
return (new TV($id))->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int>
|
||||
*/
|
||||
private function movie_ids(): array
|
||||
{
|
||||
return [
|
||||
'15283',
|
||||
'211182',
|
||||
'11020',
|
||||
'108688',
|
||||
'11134',
|
||||
'3114',
|
||||
'58693',
|
||||
'52113',
|
||||
'179150',
|
||||
'17057',
|
||||
'59961',
|
||||
'64700',
|
||||
'353486',
|
||||
'1091',
|
||||
'38643',
|
||||
'335983',
|
||||
'42745',
|
||||
'260513',
|
||||
'299536',
|
||||
'27622',
|
||||
'242049',
|
||||
'44560',
|
||||
'127570',
|
||||
'292834',
|
||||
'586101',
|
||||
'45884',
|
||||
'69152',
|
||||
'212778',
|
||||
'417407',
|
||||
'89899',
|
||||
'104086',
|
||||
'17339',
|
||||
'27612',
|
||||
'81976',
|
||||
'11510',
|
||||
'493201',
|
||||
'797',
|
||||
'366924',
|
||||
'42359',
|
||||
'84287',
|
||||
'47792',
|
||||
'549859',
|
||||
'19095',
|
||||
'10596',
|
||||
'24276',
|
||||
'303858',
|
||||
'14817',
|
||||
'95963',
|
||||
'23479',
|
||||
'293670',
|
||||
'54093',
|
||||
'425003',
|
||||
'436387',
|
||||
'146',
|
||||
'228',
|
||||
'341354',
|
||||
'2976',
|
||||
'13783',
|
||||
'16231',
|
||||
'520900',
|
||||
'10784',
|
||||
'95',
|
||||
'28322',
|
||||
'14029',
|
||||
'2675',
|
||||
'140260',
|
||||
'618214',
|
||||
'40108',
|
||||
'61143',
|
||||
'16281',
|
||||
'1556',
|
||||
'170296',
|
||||
'27030',
|
||||
'9349',
|
||||
'47715',
|
||||
'355993',
|
||||
'8224',
|
||||
'13982',
|
||||
'9959',
|
||||
'11652',
|
||||
'42690',
|
||||
'605',
|
||||
'417812',
|
||||
'276843',
|
||||
'451480',
|
||||
'83788',
|
||||
'447200',
|
||||
'133786',
|
||||
'420426',
|
||||
'11938',
|
||||
'63113',
|
||||
'130300',
|
||||
'67294',
|
||||
'174340',
|
||||
'477654',
|
||||
'258509',
|
||||
'550738',
|
||||
'197',
|
||||
'76489',
|
||||
'5910',
|
||||
893397,
|
||||
783215,
|
||||
570731,
|
||||
679014,
|
||||
239895,
|
||||
413782,
|
||||
138038,
|
||||
1115579,
|
||||
22084,
|
||||
302827,
|
||||
640393,
|
||||
253267,
|
||||
1291436,
|
||||
1144962,
|
||||
977871,
|
||||
1081709,
|
||||
252293,
|
||||
376252,
|
||||
918287,
|
||||
1026999,
|
||||
1294765,
|
||||
923579,
|
||||
422044,
|
||||
710268,
|
||||
1124136,
|
||||
717088,
|
||||
1163186,
|
||||
1073274,
|
||||
1102786,
|
||||
354148,
|
||||
533991,
|
||||
134508,
|
||||
131012,
|
||||
467540,
|
||||
353495,
|
||||
1020896,
|
||||
895718,
|
||||
125290,
|
||||
13245,
|
||||
29829,
|
||||
639720,
|
||||
75704,
|
||||
432956,
|
||||
62489,
|
||||
12161,
|
||||
77146,
|
||||
239398,
|
||||
686941,
|
||||
768076,
|
||||
1059813,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int>
|
||||
*/
|
||||
private function tv_ids(): array
|
||||
{
|
||||
return [
|
||||
'119815',
|
||||
'1408',
|
||||
'120965',
|
||||
'112668',
|
||||
'101400',
|
||||
'32726',
|
||||
'71391',
|
||||
'96005',
|
||||
'84915',
|
||||
'1813',
|
||||
'190',
|
||||
'65417',
|
||||
'74316',
|
||||
'127235',
|
||||
'35790',
|
||||
'62811',
|
||||
'16118',
|
||||
'44856',
|
||||
'34735',
|
||||
'32726',
|
||||
'66941',
|
||||
'88052',
|
||||
'82204',
|
||||
'62649',
|
||||
'84534',
|
||||
'73320',
|
||||
'74091',
|
||||
'28877',
|
||||
'826',
|
||||
'82744',
|
||||
'79084',
|
||||
'63181',
|
||||
'64196',
|
||||
'82747',
|
||||
'30984',
|
||||
'95432',
|
||||
'2706',
|
||||
'1920',
|
||||
'135517',
|
||||
'116858',
|
||||
'47480',
|
||||
'138233',
|
||||
'66840',
|
||||
'3319',
|
||||
'33841',
|
||||
'7248',
|
||||
'64464',
|
||||
'46279',
|
||||
'44006',
|
||||
'80230',
|
||||
'46459',
|
||||
'484',
|
||||
'46261',
|
||||
'1894',
|
||||
'826',
|
||||
'18347',
|
||||
'111133',
|
||||
'106158',
|
||||
'64406',
|
||||
'87148',
|
||||
'46261',
|
||||
'918',
|
||||
'56296',
|
||||
'44006',
|
||||
'64254',
|
||||
'82653',
|
||||
'129489',
|
||||
'1104',
|
||||
'1424',
|
||||
'83685',
|
||||
'63079',
|
||||
'46952',
|
||||
'62623',
|
||||
'52',
|
||||
'30984',
|
||||
'35046',
|
||||
'59117',
|
||||
'2710',
|
||||
'1705',
|
||||
'62688',
|
||||
'190',
|
||||
'113704',
|
||||
'501',
|
||||
'19757',
|
||||
'68595',
|
||||
'314',
|
||||
'112',
|
||||
'2207',
|
||||
'90282',
|
||||
'7166',
|
||||
'37863',
|
||||
'105843',
|
||||
'71663',
|
||||
'2046',
|
||||
'68864',
|
||||
'1402',
|
||||
'107530',
|
||||
'93519',
|
||||
'60694',
|
||||
'83097',
|
||||
201568,
|
||||
256057,
|
||||
251668,
|
||||
71495,
|
||||
68728,
|
||||
88258,
|
||||
74866,
|
||||
70508,
|
||||
207837,
|
||||
255293,
|
||||
35468,
|
||||
213359,
|
||||
4333,
|
||||
236316,
|
||||
247674,
|
||||
249018,
|
||||
228549,
|
||||
240310,
|
||||
211169,
|
||||
212204,
|
||||
61379,
|
||||
1246,
|
||||
80884,
|
||||
196944,
|
||||
232644,
|
||||
68597,
|
||||
58761,
|
||||
46848,
|
||||
228958,
|
||||
6390,
|
||||
226745,
|
||||
4706,
|
||||
114183,
|
||||
39952,
|
||||
96128,
|
||||
93297,
|
||||
122725,
|
||||
253254,
|
||||
249301,
|
||||
238126,
|
||||
233327,
|
||||
65609,
|
||||
128301,
|
||||
37528,
|
||||
204959,
|
||||
208694,
|
||||
45343,
|
||||
1141,
|
||||
124972,
|
||||
156933,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ class GitUpdater extends Command
|
||||
protected $description = 'Executes The Commands Necessary To Update Your Website Using Git';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<string>
|
||||
*/
|
||||
private const ADDITIONAL = [
|
||||
private const array ADDITIONAL = [
|
||||
'.env',
|
||||
'laravel-echo-server.json',
|
||||
];
|
||||
@@ -182,6 +182,11 @@ class GitUpdater extends Command
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for updates.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
private function checkForUpdates(): array
|
||||
{
|
||||
$this->header('Checking For Updates');
|
||||
@@ -195,6 +200,11 @@ class GitUpdater extends Command
|
||||
return $updating;
|
||||
}
|
||||
|
||||
/*
|
||||
* Manually update files that have conflicts.
|
||||
*
|
||||
* @param array<string> $updating
|
||||
*/
|
||||
private function manualUpdate(array $updating): void
|
||||
{
|
||||
$this->alertInfo('Manual Update');
|
||||
@@ -209,11 +219,19 @@ class GitUpdater extends Command
|
||||
$this->done();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a file.
|
||||
*/
|
||||
private function updateFile(string $file): void
|
||||
{
|
||||
$this->process(sprintf('git checkout origin/master -- %s', $file));
|
||||
}
|
||||
|
||||
/**
|
||||
* Backup the files that will be updated.
|
||||
*
|
||||
* @param array<string> $paths
|
||||
*/
|
||||
private function backup(array $paths): void
|
||||
{
|
||||
$this->header('Backing Up Files');
|
||||
@@ -232,6 +250,11 @@ class GitUpdater extends Command
|
||||
$this->done();
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the files that were backed up.
|
||||
*
|
||||
* @param array<string> $paths
|
||||
*/
|
||||
private function restore(array $paths): void
|
||||
{
|
||||
$this->header('Restoring Backups');
|
||||
@@ -349,7 +372,7 @@ class GitUpdater extends Command
|
||||
if (!mkdir($concurrentDirectory = storage_path(sprintf('gitupdate/%s', $path)), 0775, true) && !is_dir($concurrentDirectory)) {
|
||||
throw new RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
|
||||
}
|
||||
} elseif (is_file(base_path($path)) && \dirname((string) $path) !== '.') {
|
||||
} elseif (is_file(base_path($path)) && \dirname($path) !== '.') {
|
||||
$path = \dirname((string) $path);
|
||||
|
||||
if (!is_dir(storage_path(sprintf('gitupdate/%s', $path))) && !mkdir($concurrentDirectory = storage_path(sprintf(
|
||||
@@ -361,6 +384,11 @@ class GitUpdater extends Command
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the paths that need to be updated.
|
||||
*
|
||||
* @return array<string>
|
||||
*/
|
||||
private function paths(): array
|
||||
{
|
||||
$p = $this->process('git diff master --name-only');
|
||||
|
||||
@@ -54,6 +54,8 @@ class IrcMessage extends Command
|
||||
|
||||
/**
|
||||
* Get the console command arguments.
|
||||
*
|
||||
* @return array<int, array<int, int|string>>
|
||||
*/
|
||||
protected function getArguments(): array
|
||||
{
|
||||
|
||||
@@ -164,7 +164,7 @@ class TorrentController extends BaseController
|
||||
$torrent->sd = $request->input('sd');
|
||||
$torrent->personal_release = $request->input('personal_release') ?? 0;
|
||||
$torrent->internal = $user->group->is_modo || $user->group->is_internal ? ($request->input('internal') ?? 0) : 0;
|
||||
$torrent->featured = $user->group->is_modo || $user->group->is_internal ? ($request->input('featured') ?? 0) : 0;
|
||||
$torrent->featured = $user->group->is_modo || $user->group->is_internal ? ($request->input('featured') ?? false) : false;
|
||||
$torrent->doubleup = $user->group->is_modo || $user->group->is_internal ? ($request->input('doubleup') ?? 0) : 0;
|
||||
$torrent->refundable = $user->group->is_modo || $user->group->is_internal ? ($request->input('refundable') ?? 0) : 0;
|
||||
$du_until = $request->input('du_until');
|
||||
@@ -183,7 +183,7 @@ class TorrentController extends BaseController
|
||||
$torrent->moderated_by = User::where('username', 'System')->first()->id; //System ID
|
||||
|
||||
// Set freeleech and doubleup if featured
|
||||
if ($torrent->featured == 1) {
|
||||
if ($torrent->featured === true) {
|
||||
$torrent->free = 100;
|
||||
$torrent->doubleup = true;
|
||||
}
|
||||
@@ -539,11 +539,11 @@ class TorrentController extends BaseController
|
||||
->when($request->filled('malId'), fn ($query) => $query->ofMal((int) $request->malId))
|
||||
->when($request->filled('playlistId'), fn ($query) => $query->ofPlaylist((int) $request->playlistId))
|
||||
->when($request->filled('collectionId'), fn ($query) => $query->ofCollection((int) $request->collectionId))
|
||||
->when($request->filled('primaryLanguages'), fn ($query) => $query->ofOriginalLanguage($request->primaryLanguages))
|
||||
->when($request->filled('primaryLanguages'), fn ($query) => $query->ofPrimaryLanguage($request->primaryLanguages))
|
||||
->when($request->filled('adult'), fn ($query) => $query->ofAdult($request->boolean('adult')))
|
||||
->when($request->filled('free'), fn ($query) => $query->ofFreeleech($request->free))
|
||||
->when($request->filled('doubleup'), fn ($query) => $query->doubleup())
|
||||
->when($request->filled('refundable'), fn ($query) => $query->ofRefundable($request->boolean('refundable')))
|
||||
->when($request->filled('refundable'), fn ($query) => $query->refundable())
|
||||
->when($request->filled('featured'), fn ($query) => $query->featured())
|
||||
->when($request->filled('stream'), fn ($query) => $query->streamOptimized())
|
||||
->when($request->filled('sd'), fn ($query) => $query->sd())
|
||||
|
||||
@@ -136,7 +136,7 @@ class RssController extends Controller
|
||||
$bannedGroup = cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id'));
|
||||
$disabledGroup = cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id'));
|
||||
|
||||
abort_if($user->group_id == $bannedGroup[0] || $user->group_id == $disabledGroup[0] || !$user->active, 404);
|
||||
abort_if($user->group_id === $bannedGroup[0] || $user->group_id === $disabledGroup[0] || !$user->active, 404);
|
||||
|
||||
$rss = Rss::query()
|
||||
->where(
|
||||
@@ -148,67 +148,70 @@ class RssController extends Controller
|
||||
|
||||
$search = $rss->object_torrent;
|
||||
|
||||
$cacheKey = 'rss:'.$rss->id;
|
||||
if (\is_object($search)) {
|
||||
$cacheKey = 'rss:'.$rss->id;
|
||||
|
||||
$torrents = cache()->remember($cacheKey, 300, fn () => Torrent::query()
|
||||
->select([
|
||||
'name',
|
||||
'id',
|
||||
'category_id',
|
||||
'type_id',
|
||||
'resolution_id',
|
||||
'size',
|
||||
'created_at',
|
||||
'seeders',
|
||||
'leechers',
|
||||
'times_completed',
|
||||
'user_id',
|
||||
'anon',
|
||||
'imdb',
|
||||
'tmdb',
|
||||
'tvdb',
|
||||
'mal',
|
||||
'internal',
|
||||
])
|
||||
->with([
|
||||
'user:id,username,rsskey',
|
||||
'category:id,name,movie_meta,tv_meta',
|
||||
'type:id,name',
|
||||
'resolution:id,name'
|
||||
])
|
||||
->when($search->search !== null, fn ($query) => $query->ofName($search->search))
|
||||
->when($search->description !== null, fn ($query) => $query->ofDescription($search->description)->orWhere->ofMediainfo($search->description))
|
||||
->when($search->uploader !== null, fn ($query) => $query->ofUploader($search->uploader, $user))
|
||||
->when($search->categories !== null, fn ($query) => $query->ofCategory($search->categories))
|
||||
->when($search->types !== null, fn ($query) => $query->ofType($search->types))
|
||||
->when($search->resolutions !== null, fn ($query) => $query->ofResolution($search->resolutions))
|
||||
->when($search->genres !== null, fn ($query) => $query->ofGenre($search->genres))
|
||||
->when($search->tmdb !== null, fn ($query) => $query->ofTmdb((int) $search->tmdb))
|
||||
->when($search->imdb !== null, fn ($query) => $query->ofImdb((int) (preg_match('/tt0*(?=(\d{7,}))/', (string) $search->imdb, $matches) ? $matches[1] : $search->imdb)))
|
||||
->when($search->tvdb !== null, fn ($query) => $query->ofTvdb((int) $search->tvdb))
|
||||
->when($search->mal !== null, fn ($query) => $query->ofMal((int) $search->mal))
|
||||
->when($search->freeleech !== null, fn ($query) => $query->ofFreeleech([25, 50, 75, 100]))
|
||||
->when($search->doubleupload !== null, fn ($query) => $query->doubleup())
|
||||
->when($search->featured !== null, fn ($query) => $query->featured())
|
||||
->when($search->stream !== null, fn ($query) => $query->streamOptimized())
|
||||
->when($search->sd !== null, fn ($query) => $query->sd())
|
||||
->when($search->highspeed !== null, fn ($query) => $query->highspeed())
|
||||
->when($search->bookmark !== null, fn ($query) => $query->bookmarkedBy($user))
|
||||
->when($search->internal !== null, fn ($query) => $query->internal())
|
||||
->when($search->personalrelease !== null, fn ($query) => $query->personalRelease())
|
||||
->when($search->alive !== null, fn ($query) => $query->alive())
|
||||
->when($search->dying !== null, fn ($query) => $query->dying())
|
||||
->when($search->dead !== null, fn ($query) => $query->dead())
|
||||
->orderByDesc('bumped_at')
|
||||
->take(50)
|
||||
->get());
|
||||
$torrents = cache()->remember($cacheKey, 300, fn () => Torrent::query()
|
||||
->select([
|
||||
'name',
|
||||
'id',
|
||||
'category_id',
|
||||
'type_id',
|
||||
'resolution_id',
|
||||
'size',
|
||||
'created_at',
|
||||
'seeders',
|
||||
'leechers',
|
||||
'times_completed',
|
||||
'user_id',
|
||||
'anon',
|
||||
'imdb',
|
||||
'tmdb',
|
||||
'tvdb',
|
||||
'mal',
|
||||
'internal',
|
||||
])
|
||||
->with([
|
||||
'user:id,username,rsskey',
|
||||
'category:id,name,movie_meta,tv_meta',
|
||||
'type:id,name',
|
||||
'resolution:id,name'
|
||||
])
|
||||
->when($search->search !== null, fn ($query) => $query->ofName($search->search))
|
||||
->when($search->description !== null, fn ($query) => $query->ofDescription($search->description)->orWhere->ofMediainfo($search->description))
|
||||
->when($search->uploader !== null, fn ($query) => $query->ofUploader($search->uploader, $user))
|
||||
->when($search->categories !== null, fn ($query) => $query->ofCategory($search->categories))
|
||||
->when($search->types !== null, fn ($query) => $query->ofType($search->types))
|
||||
->when($search->resolutions !== null, fn ($query) => $query->ofResolution($search->resolutions))
|
||||
->when($search->genres !== null, fn ($query) => $query->ofGenre($search->genres))
|
||||
->when($search->tmdb !== null, fn ($query) => $query->ofTmdb((int) $search->tmdb))
|
||||
->when($search->imdb !== null, fn ($query) => $query->ofImdb((int) (preg_match('/tt0*(?=(\d{7,}))/', (string) $search->imdb, $matches) ? $matches[1] : $search->imdb)))
|
||||
->when($search->tvdb !== null, fn ($query) => $query->ofTvdb((int) $search->tvdb))
|
||||
->when($search->mal !== null, fn ($query) => $query->ofMal((int) $search->mal))
|
||||
->when($search->freeleech !== null, fn ($query) => $query->ofFreeleech([25, 50, 75, 100]))
|
||||
->when($search->doubleupload !== null, fn ($query) => $query->doubleup())
|
||||
->when($search->featured !== null, fn ($query) => $query->featured())
|
||||
->when($search->stream !== null, fn ($query) => $query->streamOptimized())
|
||||
->when($search->sd !== null, fn ($query) => $query->sd())
|
||||
->when($search->highspeed !== null, fn ($query) => $query->highspeed())
|
||||
->when($search->bookmark !== null, fn ($query) => $query->bookmarkedBy($user))
|
||||
->when($search->internal !== null, fn ($query) => $query->internal())
|
||||
->when($search->personalrelease !== null, fn ($query) => $query->personalRelease())
|
||||
->when($search->alive !== null, fn ($query) => $query->alive())
|
||||
->when($search->dying !== null, fn ($query) => $query->dying())
|
||||
->when($search->dead !== null, fn ($query) => $query->dead())
|
||||
->orderByDesc('bumped_at')
|
||||
->take(50)
|
||||
->get());
|
||||
|
||||
return response()->view('rss.show', [
|
||||
'torrents' => $torrents,
|
||||
'user' => $user,
|
||||
'rss' => $rss,
|
||||
])
|
||||
->header('Content-Type', 'text/xml');
|
||||
return response()->view('rss.show', [
|
||||
'torrents' => $torrents,
|
||||
'user' => $user,
|
||||
'rss' => $rss,
|
||||
])
|
||||
->header('Content-Type', 'text/xml');
|
||||
}
|
||||
abort(404);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -141,7 +141,7 @@ class TorrentBuffController extends Controller
|
||||
abort_unless($user->group->is_modo || $user->group->is_internal, 403);
|
||||
$torrent = Torrent::withoutGlobalScope(ApprovedScope::class)->findOrFail($id);
|
||||
|
||||
if ($torrent->featured == 0) {
|
||||
if ($torrent->featured === false) {
|
||||
$torrent->featured = true;
|
||||
$torrent->save();
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ class TorrentController extends Controller
|
||||
'platforms' => $platforms,
|
||||
'total_tips' => $torrent->tips()->sum('bon'),
|
||||
'user_tips' => $torrent->tips()->where('sender_id', '=', $user->id)->sum('bon'),
|
||||
'featured' => $torrent->featured == 1 ? FeaturedTorrent::where('torrent_id', '=', $id)->first() : null,
|
||||
'featured' => $torrent->featured === true ? FeaturedTorrent::where('torrent_id', '=', $id)->first() : null,
|
||||
'mediaInfo' => $torrent->mediainfo !== null ? (new MediaInfo())->parse($torrent->mediainfo) : null,
|
||||
'last_seed_activity' => History::where('torrent_id', '=', $torrent->id)->where('seeder', '=', 1)->latest('updated_at')->first(),
|
||||
'playlists' => $user->playlists,
|
||||
|
||||
@@ -34,6 +34,9 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
class BackupPanel extends Component
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $listeners = ['refreshBackups' => '$refresh'];
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,12 +34,12 @@ class BbcodeInput extends Component
|
||||
|
||||
public string $contentHtml = '';
|
||||
|
||||
final public function mount($name, $label, $required = false, $content = null): void
|
||||
final public function mount(string $name, string $label, bool $required = false, string $content = null): void
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->label = $label;
|
||||
$this->isRequired = $required;
|
||||
$this->contentBbcode = $content === null ? (old($name) ?? '') : htmlspecialchars_decode((string) $content);
|
||||
$this->contentBbcode = $content === null ? (old($name) ?? '') : htmlspecialchars_decode($content);
|
||||
}
|
||||
|
||||
final public function updatedIsPreviewEnabled(): void
|
||||
|
||||
@@ -74,6 +74,9 @@ class BlockIpAddress extends Component
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<BlockedIp>
|
||||
*/
|
||||
#[Computed]
|
||||
final public function ipAddresses(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ class InviteLogSearch extends Component
|
||||
};
|
||||
}
|
||||
|
||||
final public function updatingGroupBy($value): void
|
||||
final public function updatingGroupBy(string $value): void
|
||||
{
|
||||
$this->sortField = match ($value) {
|
||||
'user_id' => 'created_at_max',
|
||||
|
||||
@@ -17,7 +17,6 @@ declare(strict_types=1);
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use App\Models\History;
|
||||
use App\Models\User;
|
||||
use App\Traits\CastLivewireProperties;
|
||||
use App\Traits\LivewireSort;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -53,7 +52,7 @@ class LeakerSearch extends Component
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<User>
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<History>
|
||||
*/
|
||||
#[Computed]
|
||||
final public function leakers(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
|
||||
@@ -69,7 +69,7 @@ class MissingMediaSearch extends Component
|
||||
#[Computed]
|
||||
final public function types(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return Type::select('id', 'position', 'name')->orderBy('position')->get();
|
||||
return Type::select(['id', 'position', 'name'])->orderBy('position')->get();
|
||||
}
|
||||
|
||||
final public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
|
||||
|
||||
@@ -27,6 +27,9 @@ class PasswordStrength extends Component
|
||||
|
||||
public int $strengthScore = 0;
|
||||
|
||||
/**
|
||||
* @var array<int, string>
|
||||
*/
|
||||
public array $strengthLevels = [
|
||||
1 => 'Weak',
|
||||
2 => 'Fair',
|
||||
@@ -34,7 +37,7 @@ class PasswordStrength extends Component
|
||||
4 => 'Strong',
|
||||
];
|
||||
|
||||
final public function updatedPassword($password): void
|
||||
final public function updatedPassword(string $password): void
|
||||
{
|
||||
$this->strengthScore = (new Zxcvbn())->passwordStrength($password)['score'];
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class PersonSearch extends Component
|
||||
* @return \Illuminate\Database\Eloquent\Collection<int, Person>
|
||||
*/
|
||||
#[Computed]
|
||||
final public function firstCharacters()
|
||||
final public function firstCharacters(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return Person::selectRaw('substr(name, 1, 1) as alpha, count(*) as count')
|
||||
->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%'))
|
||||
|
||||
@@ -61,7 +61,12 @@ class SimilarTorrent extends Component
|
||||
#[Url(history: true)]
|
||||
public string $sortDirection = 'desc';
|
||||
|
||||
protected $listeners = ['destroy' => 'deleteRecords'];
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $listeners = [
|
||||
'destroy' => 'deleteRecords'
|
||||
];
|
||||
|
||||
final public function updating(string $field, mixed &$value): void
|
||||
{
|
||||
|
||||
@@ -118,11 +118,11 @@ class Top10 extends Component
|
||||
$metaTypes = [];
|
||||
|
||||
if (Category::where('movie_meta', '=', true)->exists()) {
|
||||
$metaTypes[__('mediahub.movie')] = 'movie_meta';
|
||||
$metaTypes[(string) __('mediahub.movie')] = 'movie_meta';
|
||||
}
|
||||
|
||||
if (Category::where('tv_meta', '=', true)->exists()) {
|
||||
$metaTypes[__('mediahub.show')] = 'tv_meta';
|
||||
$metaTypes[(string) __('mediahub.show')] = 'tv_meta';
|
||||
}
|
||||
|
||||
return $metaTypes;
|
||||
|
||||
@@ -42,31 +42,31 @@ class TorrentRequestSearch extends Component
|
||||
public string $requestor = '';
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $categories = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $types = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $resolutions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $genres = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $primaryLanguages = [];
|
||||
|
||||
@@ -80,37 +80,37 @@ class TorrentSearch extends Component
|
||||
public ?int $seasonNumber = null;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $categories = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $types = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $resolutions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $genres = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $regions = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @var array<int>
|
||||
*/
|
||||
#[Url(history: true)]
|
||||
public array $distributors = [];
|
||||
|
||||
@@ -55,7 +55,7 @@ class WatchlistSearch extends Component
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<\App\Models\User>
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator<Watchlist>
|
||||
*/
|
||||
#[Computed]
|
||||
final public function users(): \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
|
||||
@@ -46,7 +46,7 @@ class Apikey extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{deleted_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ class Application extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{moderated_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -35,6 +35,11 @@ class Audit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public array $values = [];
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
|
||||
@@ -45,15 +45,15 @@ class BonExchange extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{upload: 'bool', download: 'bool', personal_freeleech: 'bool', invite: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'upload' => 'boolean',
|
||||
'download' => 'boolean',
|
||||
'personal_freeleech' => 'boolean',
|
||||
'invite' => 'boolean',
|
||||
'upload' => 'bool',
|
||||
'download' => 'bool',
|
||||
'personal_freeleech' => 'bool',
|
||||
'invite' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class BonTransactions extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{cost: 'decimal:2'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class Bot extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{name: 'string', cost: 'decimal:2'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -50,15 +50,15 @@ class Category extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{music_meta: 'bool', game_meta: 'bool', tv_meta: 'bool', movie_meta: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'music_meta' => 'boolean',
|
||||
'game_meta' => 'boolean',
|
||||
'tv_meta' => 'boolean',
|
||||
'movie_meta' => 'boolean',
|
||||
'music_meta' => 'bool',
|
||||
'game_meta' => 'bool',
|
||||
'tv_meta' => 'bool',
|
||||
'movie_meta' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -51,13 +51,16 @@ class Comment extends Model
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
* @return array{anon: 'bool'}
|
||||
*/
|
||||
protected $casts = [
|
||||
'anon' => 'bool',
|
||||
];
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'anon' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Belongs To A User.
|
||||
|
||||
@@ -34,13 +34,6 @@ class Credit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Indicates if the IDs are auto-incrementing.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $incrementing = true;
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
|
||||
@@ -45,7 +45,7 @@ class EmailUpdate extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{created_at: 'datetime', deleted_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -47,14 +47,14 @@ class ForumPermission extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{read_topic: 'bool', reply_topic: 'bool', start_topic: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'read_topic' => 'boolean',
|
||||
'reply_topic' => 'boolean',
|
||||
'start_topic' => 'boolean',
|
||||
'read_topic' => 'bool',
|
||||
'reply_topic' => 'bool',
|
||||
'start_topic' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class Gift extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{created_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
+29
-16
@@ -33,19 +33,19 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property string $color
|
||||
* @property string $icon
|
||||
* @property string $effect
|
||||
* @property int $is_internal
|
||||
* @property int $is_editor
|
||||
* @property int $is_owner
|
||||
* @property int $is_admin
|
||||
* @property int $is_modo
|
||||
* @property int $is_trusted
|
||||
* @property int $is_immune
|
||||
* @property int $is_freeleech
|
||||
* @property int $is_double_upload
|
||||
* @property int $is_refundable
|
||||
* @property int $can_upload
|
||||
* @property int $is_incognito
|
||||
* @property int $autogroup
|
||||
* @property bool $is_internal
|
||||
* @property bool $is_editor
|
||||
* @property bool $is_owner
|
||||
* @property bool $is_admin
|
||||
* @property bool $is_modo
|
||||
* @property bool $is_trusted
|
||||
* @property bool $is_immune
|
||||
* @property bool $is_freeleech
|
||||
* @property bool $is_double_upload
|
||||
* @property bool $is_refundable
|
||||
* @property bool $can_upload
|
||||
* @property bool $is_incognito
|
||||
* @property bool $autogroup
|
||||
* @property bool $system_required
|
||||
* @property int $min_uploaded
|
||||
* @property int $min_seedsize
|
||||
@@ -62,13 +62,26 @@ class Group extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{system_required: 'bool', min_ratio: 'decimal:2'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'system_required' => 'boolean',
|
||||
'min_ratio' => 'decimal:2',
|
||||
'is_internal' => 'bool',
|
||||
'is_editor' => 'bool',
|
||||
'is_owner' => 'bool',
|
||||
'is_admin' => 'bool',
|
||||
'is_modo' => 'bool',
|
||||
'is_trusted' => 'bool',
|
||||
'is_immune' => 'bool',
|
||||
'is_freeleech' => 'bool',
|
||||
'is_double_upload' => 'bool',
|
||||
'is_refundable' => 'bool',
|
||||
'can_upload' => 'bool',
|
||||
'is_incognito' => 'bool',
|
||||
'autogroup' => 'bool',
|
||||
'system_required' => 'bool',
|
||||
'min_ratio' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@ class History extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{completed_at: 'datetime', hitrun: 'bool', prewarn: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'completed_at' => 'datetime',
|
||||
'hitrun' => 'boolean',
|
||||
'prewarn' => 'boolean',
|
||||
'hitrun' => 'bool',
|
||||
'prewarn' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -39,13 +39,13 @@ class Like extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{like: 'bool', dislike: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'like' => 'boolean',
|
||||
'dislike' => 'boolean',
|
||||
'like' => 'bool',
|
||||
'dislike' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Passkey extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{deleted_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
+4
-4
@@ -46,14 +46,14 @@ class Peer extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{active: 'bool', seeder: 'bool', connectable: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'active' => 'boolean',
|
||||
'seeder' => 'boolean',
|
||||
'connectable' => 'boolean',
|
||||
'active' => 'bool',
|
||||
'seeder' => 'bool',
|
||||
'connectable' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class PostTip extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{created_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -46,12 +46,12 @@ class Resurrection extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{rewarded: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'rewarded' => 'boolean',
|
||||
'rewarded' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class Rss extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{name: 'string', json_torrent: 'array', expected_fields: 'array'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ class Rsskey extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{deleted_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ class Subtitle extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{moderated_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ class Ticket extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{closed_at: 'datetime', reminded_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -54,20 +54,20 @@ class Topic extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{last_post_created_at: 'datetime', pinned: 'bool', approved: 'bool', denied: 'bool', solved: 'bool', invalid: 'bool', bug: 'bool', suggestion: 'bool', implemented: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'last_post_created_at' => 'datetime',
|
||||
'pinned' => 'boolean',
|
||||
'approved' => 'boolean',
|
||||
'denied' => 'boolean',
|
||||
'solved' => 'boolean',
|
||||
'invalid' => 'boolean',
|
||||
'bug' => 'boolean',
|
||||
'suggestion' => 'boolean',
|
||||
'implemented' => 'boolean',
|
||||
'pinned' => 'bool',
|
||||
'approved' => 'bool',
|
||||
'denied' => 'bool',
|
||||
'solved' => 'bool',
|
||||
'invalid' => 'bool',
|
||||
'bug' => 'bool',
|
||||
'suggestion' => 'bool',
|
||||
'implemented' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+57
-57
@@ -34,56 +34,56 @@ use voku\helper\AntiXSS;
|
||||
/**
|
||||
* App\Models\Torrent.
|
||||
*
|
||||
* @property string $info_hash
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string|null $mediainfo
|
||||
* @property string|null $bdinfo
|
||||
* @property string $file_name
|
||||
* @property int $num_file
|
||||
* @property string|null $folder
|
||||
* @property float $size
|
||||
* @property mixed|null $nfo
|
||||
* @property int $leechers
|
||||
* @property int $seeders
|
||||
* @property int $times_completed
|
||||
* @property int|null $category_id
|
||||
* @property int $user_id
|
||||
* @property int $imdb
|
||||
* @property int $tvdb
|
||||
* @property int $tmdb
|
||||
* @property int $mal
|
||||
* @property int $igdb
|
||||
* @property int|null $season_number
|
||||
* @property int|null $episode_number
|
||||
* @property int $stream
|
||||
* @property int $free
|
||||
* @property bool $doubleup
|
||||
* @property bool $refundable
|
||||
* @property int $highspeed
|
||||
* @property \Illuminate\Database\Eloquent\Collection<int, \App\Models\FeaturedTorrent> $featured
|
||||
* @property int $status
|
||||
* @property \Illuminate\Support\Carbon|null $moderated_at
|
||||
* @property int|null $moderated_by
|
||||
* @property int $anon
|
||||
* @property bool $sticky
|
||||
* @property int $sd
|
||||
* @property int $internal
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $bumped_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property \Illuminate\Support\Carbon|null $fl_until
|
||||
* @property \Illuminate\Support\Carbon|null $du_until
|
||||
* @property string|null $release_year
|
||||
* @property int $type_id
|
||||
* @property int|null $resolution_id
|
||||
* @property int|null $distributor_id
|
||||
* @property int|null $region_id
|
||||
* @property int $personal_release
|
||||
* @property int|null $balance
|
||||
* @property int|null $balance_offset
|
||||
* @property string $info_hash
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $description
|
||||
* @property string|null $mediainfo
|
||||
* @property string|null $bdinfo
|
||||
* @property string $file_name
|
||||
* @property int $num_file
|
||||
* @property string|null $folder
|
||||
* @property float $size
|
||||
* @property mixed|null $nfo
|
||||
* @property int $leechers
|
||||
* @property int $seeders
|
||||
* @property int $times_completed
|
||||
* @property int|null $category_id
|
||||
* @property int $user_id
|
||||
* @property int $imdb
|
||||
* @property int $tvdb
|
||||
* @property int $tmdb
|
||||
* @property int $mal
|
||||
* @property int $igdb
|
||||
* @property int|null $season_number
|
||||
* @property int|null $episode_number
|
||||
* @property int $stream
|
||||
* @property int $free
|
||||
* @property bool $doubleup
|
||||
* @property bool $refundable
|
||||
* @property int $highspeed
|
||||
* @property bool $featured
|
||||
* @property int $status
|
||||
* @property \Illuminate\Support\Carbon|null $moderated_at
|
||||
* @property int|null $moderated_by
|
||||
* @property int $anon
|
||||
* @property bool $sticky
|
||||
* @property int $sd
|
||||
* @property int $internal
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $bumped_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property \Illuminate\Support\Carbon|null $fl_until
|
||||
* @property \Illuminate\Support\Carbon|null $du_until
|
||||
* @property string|null $release_year
|
||||
* @property int $type_id
|
||||
* @property int|null $resolution_id
|
||||
* @property int|null $distributor_id
|
||||
* @property int|null $region_id
|
||||
* @property int $personal_release
|
||||
* @property int|null $balance
|
||||
* @property int|null $balance_offset
|
||||
*/
|
||||
class Torrent extends Model
|
||||
{
|
||||
@@ -98,21 +98,21 @@ class Torrent extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{tmdb: 'int', igdb: 'int', bumped_at: 'datetime', fl_until: 'datetime', du_until: 'datetime', doubleup: 'bool', refundable: 'bool', featured: 'bool', moderated_at: 'datetime', sticky: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'tmdb' => 'integer',
|
||||
'igdb' => 'integer',
|
||||
'tmdb' => 'int',
|
||||
'igdb' => 'int',
|
||||
'bumped_at' => 'datetime',
|
||||
'fl_until' => 'datetime',
|
||||
'du_until' => 'datetime',
|
||||
'doubleup' => 'boolean',
|
||||
'refundable' => 'boolean',
|
||||
'featured' => 'boolean',
|
||||
'doubleup' => 'bool',
|
||||
'refundable' => 'bool',
|
||||
'featured' => 'bool',
|
||||
'moderated_at' => 'datetime',
|
||||
'sticky' => 'boolean',
|
||||
'sticky' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -75,15 +75,15 @@ class TorrentRequest extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{filled_when: 'datetime', approved_when: 'datetime', tmdb: 'int', igdb: 'int', bounty: 'decimal:2'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'filled_when' => 'datetime',
|
||||
'approved_when' => 'datetime',
|
||||
'tmdb' => 'integer',
|
||||
'igdb' => 'integer',
|
||||
'tmdb' => 'int',
|
||||
'igdb' => 'int',
|
||||
'bounty' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class TorrentRequestBounty extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{seedbonus: 'decimal:2'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ class TorrentTip extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{created_at: 'datetime'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
+10
-9
@@ -42,7 +42,7 @@ use voku\helper\AntiXSS;
|
||||
* @property string|null $two_factor_confirmed_at
|
||||
* @property string $passkey
|
||||
* @property int $group_id
|
||||
* @property int $active
|
||||
* @property bool $active
|
||||
* @property int $uploaded
|
||||
* @property int $downloaded
|
||||
* @property string|null $image
|
||||
@@ -111,7 +111,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{last_login: 'datetime', last_action: 'datetime', disabled_at: 'datetime', hidden: 'bool', can_comment: 'bool', can_download: 'bool', can_request: 'bool', can_invite: 'bool', can_upload: 'bool', can_chat: 'bool', seedbonus: 'decimal:2', active: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
@@ -119,14 +119,15 @@ class User extends Authenticatable implements MustVerifyEmail
|
||||
'last_login' => 'datetime',
|
||||
'last_action' => 'datetime',
|
||||
'disabled_at' => 'datetime',
|
||||
'hidden' => 'boolean',
|
||||
'can_comment' => 'boolean',
|
||||
'can_download' => 'boolean',
|
||||
'can_request' => 'boolean',
|
||||
'can_invite' => 'boolean',
|
||||
'can_upload' => 'boolean',
|
||||
'can_chat' => 'boolean',
|
||||
'hidden' => 'bool',
|
||||
'can_comment' => 'bool',
|
||||
'can_download' => 'bool',
|
||||
'can_request' => 'bool',
|
||||
'can_invite' => 'bool',
|
||||
'can_upload' => 'bool',
|
||||
'can_chat' => 'bool',
|
||||
'seedbonus' => 'decimal:2',
|
||||
'active' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ class UserNotification extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{json_account_groups: 'array', json_mention_groups: 'array', json_request_groups: 'array', json_torrent_groups: 'array', json_forum_groups: 'array', json_following_groups: 'array', json_subscription_groups: 'array', json_bon_groups: 'array'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ class UserPrivacy extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{hidden: 'bool', json_profile_groups: 'array', json_torrent_groups: 'array', json_forum_groups: 'array', json_bon_groups: 'array', json_comment_groups: 'array', json_wishlist_groups: 'array', json_follower_groups: 'array', json_achievement_groups: 'array', json_rank_groups: 'array', json_request_groups: 'array', json_other_groups: 'array'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ class UserSetting extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{censor: 'bool', chat_hidden: 'bool', torrent_filters: 'bool', show_poster: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
|
||||
@@ -48,13 +48,13 @@ class Warning extends Model
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @return array{expires_on: 'datetime', active: 'bool'}
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'expires_on' => 'datetime',
|
||||
'active' => 'boolean',
|
||||
'active' => 'bool',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
$user->can_comment = 1;
|
||||
$user->can_invite = 1;
|
||||
$user->group_id = $memberGroup[0];
|
||||
$user->active = 1;
|
||||
$user->active = true;
|
||||
}
|
||||
|
||||
$user->save();
|
||||
@@ -208,7 +208,7 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
// Check if user is activated
|
||||
$validatingGroup = cache()->rememberForever('validating_group', fn () => Group::query()->where('slug', '=', 'validating')->pluck('id'));
|
||||
|
||||
if ($user->active == 0 || $user->group_id === $validatingGroup[0]) {
|
||||
if ($user->active === false || $user->group_id === $validatingGroup[0]) {
|
||||
$request->session()->invalidate();
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
|
||||
@@ -25,6 +25,8 @@ class EmailBlacklist implements ValidationRule
|
||||
{
|
||||
/**
|
||||
* Array of blacklisted domains.
|
||||
*
|
||||
* @var array<string>
|
||||
*/
|
||||
private array $domains = [];
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Tmdb\Client;
|
||||
|
||||
use JsonException;
|
||||
use App\Enums\Occupation;
|
||||
use App\Services\Tmdb\TMDB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Str;
|
||||
use DateTime;
|
||||
use Exception;
|
||||
|
||||
class Movie
|
||||
{
|
||||
@@ -199,7 +199,7 @@ class Movie
|
||||
* results: ?array<
|
||||
* int<0, max>,
|
||||
* ?array{
|
||||
* adult: ?boolean,
|
||||
* adult: ?bool,
|
||||
* backdrop_path: ?string,
|
||||
* id: ?int,
|
||||
* title: ?string,
|
||||
@@ -237,8 +237,7 @@ class Movie
|
||||
public TMDB $tmdb;
|
||||
|
||||
/**
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
* @throws JsonException
|
||||
* @throws \Illuminate\Http\Client\ConnectionException
|
||||
*/
|
||||
public function __construct(int $id)
|
||||
{
|
||||
@@ -255,7 +254,8 @@ class Movie
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|array{
|
||||
* @throws Exception
|
||||
* @return ?array{
|
||||
* adult: bool,
|
||||
* backdrop: ?string,
|
||||
* budget: ?int,
|
||||
@@ -284,7 +284,7 @@ class Movie
|
||||
|
||||
if ($this->data['release_date'] !== null) {
|
||||
$re = '/((?<namesort>.*)(?<seperator>\:|and)(?<remaining>.*)|(?<name>.*))/m';
|
||||
preg_match($re, (string) $this->data['title'], $matches);
|
||||
preg_match($re, $this->data['title'], $matches);
|
||||
|
||||
$year = (new DateTime($this->data['release_date']))->format('Y');
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Tmdb\Client;
|
||||
|
||||
use JsonException;
|
||||
use App\Enums\Occupation;
|
||||
use App\Services\Tmdb\TMDB;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -25,7 +24,7 @@ use Illuminate\Support\Str;
|
||||
class TV
|
||||
{
|
||||
/**
|
||||
* @var null|array{
|
||||
* @var ?array{
|
||||
* adult: ?bool,
|
||||
* backdrop_path: ?string,
|
||||
* created_by: ?array<
|
||||
@@ -260,7 +259,7 @@ class TV
|
||||
* results: ?array<
|
||||
* int,
|
||||
* ?array{
|
||||
* adult: ?boolean,
|
||||
* adult: ?bool,
|
||||
* backdrop_path: ?string,
|
||||
* id: ?int,
|
||||
* name: ?string,
|
||||
@@ -298,8 +297,7 @@ class TV
|
||||
public TMDB $tmdb;
|
||||
|
||||
/**
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
* @throws JsonException
|
||||
* @throws \Illuminate\Http\Client\ConnectionException
|
||||
*/
|
||||
public function __construct(int $id)
|
||||
{
|
||||
|
||||
@@ -327,14 +327,6 @@ trait TorrentFilter
|
||||
$query->where('refundable', '=', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<Torrent> $query
|
||||
*/
|
||||
public function scopeOfRefundable(Builder $query, int $refundable): void
|
||||
{
|
||||
$query->where('refundable', '=', $refundable);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<Torrent> $query
|
||||
*/
|
||||
|
||||
@@ -14,13 +14,12 @@ declare(strict_types=1);
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
/* @var \Illuminate\Database\Eloquent\Factory $factory */
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<User> */
|
||||
class FollowFactory extends Factory
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ class UsersTableSeeder extends Seeder
|
||||
'passkey' => md5(random_bytes(60)),
|
||||
'rsskey' => md5(random_bytes(60)),
|
||||
'api_token' => Str::random(100),
|
||||
'active' => 1,
|
||||
'active' => true,
|
||||
],
|
||||
[
|
||||
'username' => 'Bot',
|
||||
@@ -47,7 +47,7 @@ class UsersTableSeeder extends Seeder
|
||||
'passkey' => md5(random_bytes(60)),
|
||||
'rsskey' => md5(random_bytes(60)),
|
||||
'api_token' => Str::random(100),
|
||||
'active' => 1,
|
||||
'active' => true,
|
||||
],
|
||||
[
|
||||
'username' => config('unit3d.owner-username'),
|
||||
@@ -58,7 +58,7 @@ class UsersTableSeeder extends Seeder
|
||||
'passkey' => md5(random_bytes(60)),
|
||||
'rsskey' => md5(random_bytes(60)),
|
||||
'api_token' => Str::random(100),
|
||||
'active' => 1,
|
||||
'active' => true,
|
||||
],
|
||||
], ['username'], ['updated_at' => DB::raw('updated_at')]);
|
||||
}
|
||||
|
||||
@@ -1,75 +1,15 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Method App\\\\Actions\\\\Fortify\\\\CreateNewUser\\:\\:passwordRules\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Actions/Fortify/CreateNewUser.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Actions\\\\Fortify\\\\ResetUserPassword\\:\\:passwordRules\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Actions/Fortify/ResetUserPassword.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\User\\:\\:\\$active \\(int\\) does not accept true\\.$#"
|
||||
count: 1
|
||||
path: app/Actions/Fortify/ResetUserPassword.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Actions\\\\Fortify\\\\UpdateUserPassword\\:\\:passwordRules\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Actions/Fortify/UpdateUserPassword.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/AutoBanDisposableUsers.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$callback of method Illuminate\\\\Support\\\\Collection\\<\\(int\\|string\\),mixed\\>\\:\\:filter\\(\\) expects \\(callable\\(mixed, int\\|string\\)\\: bool\\)\\|null, Closure\\(mixed\\)\\: \\(non\\-falsy\\-string\\|false\\) given\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/AutoHighspeedTag.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\Torrent\\:\\:\\$featured \\(Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\FeaturedTorrent\\>\\) does not accept false\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/AutoRemoveFeaturedTorrent.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\DemoSeed\\:\\:fetchMovie\\(\\) has parameter \\$id with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/DemoSeed.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\DemoSeed\\:\\:fetchTv\\(\\) has parameter \\$id with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/DemoSeed.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\DemoSeed\\:\\:movie_ids\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/DemoSeed.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\DemoSeed\\:\\:tv_ids\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/DemoSeed.php
|
||||
|
||||
-
|
||||
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\GitUpdater\\:\\:backup\\(\\) has parameter \\$paths with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\GitUpdater\\:\\:checkForUpdates\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\GitUpdater\\:\\:commands\\(\\) has parameter \\$commands with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
@@ -80,16 +20,6 @@ parameters:
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\GitUpdater\\:\\:paths\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\GitUpdater\\:\\:restore\\(\\) has parameter \\$paths with no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(string\\)\\: bool\\)\\|null, 'strlen' given\\.$#"
|
||||
count: 2
|
||||
@@ -100,11 +30,6 @@ parameters:
|
||||
count: 1
|
||||
path: app/Console/Commands/GitUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Console\\\\Commands\\\\IrcMessage\\:\\:getArguments\\(\\) return type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Console/Commands/IrcMessage.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Events\\\\Chatter\\:\\:__construct\\(\\) has parameter \\$payload with no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -350,121 +275,6 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Controllers/API/TorrentController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$alive on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$bookmark on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$categories on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$dead on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$description on bool\\|stdClass\\.$#"
|
||||
count: 3
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$doubleupload on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$dying on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$featured on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$freeleech on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$genres on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$highspeed on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$imdb on bool\\|stdClass\\.$#"
|
||||
count: 3
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$internal on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$mal on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$personalrelease on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$resolutions on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$sd on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$search on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$stream on bool\\|stdClass\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$tmdb on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$tvdb on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$types on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access property \\$uploader on bool\\|stdClass\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/RssController.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\Rss\\:\\:\\$is_private \\(int\\) does not accept true\\.$#"
|
||||
count: 2
|
||||
@@ -510,56 +320,16 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Controllers/Staff/VersionController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/TicketAssigneeController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TicketController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Controllers/TicketNoteController.php
|
||||
|
||||
-
|
||||
message: "#^Access to an undefined property App\\\\Models\\\\Post\\:\\:\\$post_count\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TopicController.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\=\\=\" between Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\FeaturedTorrent\\> and 0 results in an error\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentBuffController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentBuffController.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\Torrent\\:\\:\\$featured \\(Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\FeaturedTorrent\\>\\) does not accept false\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentBuffController.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\Torrent\\:\\:\\$featured \\(Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\FeaturedTorrent\\>\\) does not accept true\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentBuffController.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Models\\\\Torrent\\:\\:\\$refundable \\(bool\\) does not accept int\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentBuffController.php
|
||||
|
||||
-
|
||||
message: "#^Comparison operation \"\\=\\=\" between Illuminate\\\\Database\\\\Eloquent\\\\Collection\\<int, App\\\\Models\\\\FeaturedTorrent\\> and 1 results in an error\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Controllers/TorrentController.php
|
||||
|
||||
-
|
||||
message: "#^Unable to resolve the template type TKey in call to function collect$#"
|
||||
count: 2
|
||||
@@ -570,21 +340,11 @@ parameters:
|
||||
count: 2
|
||||
path: app/Http/Controllers/TorrentController.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 4
|
||||
path: app/Http/Controllers/User/WarningController.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\ApplicationSearch\\:\\:applications\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/ApplicationSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/ApplicationSearch.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\AttachmentUpload\\:\\:\\$attachment has no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -610,46 +370,6 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Livewire/BackupPanel.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\BackupPanel\\:\\:\\$listeners has no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BackupPanel.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BbcodeInput\\:\\:mount\\(\\) has parameter \\$content with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BbcodeInput.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BbcodeInput\\:\\:mount\\(\\) has parameter \\$label with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BbcodeInput.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BbcodeInput\\:\\:mount\\(\\) has parameter \\$name with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BbcodeInput.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BbcodeInput\\:\\:mount\\(\\) has parameter \\$required with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BbcodeInput.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\BlockIpAddress\\:\\:ipAddresses\\(\\) return type with generic interface Illuminate\\\\Contracts\\\\Pagination\\\\LengthAwarePaginator does not specify its types\\: TItem$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BlockIpAddress.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/BlockIpAddress.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\InviteLogSearch\\:\\:updatingGroupBy\\(\\) has parameter \\$value with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/InviteLogSearch.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 0 on array\\<int, string\\>\\|false\\.$#"
|
||||
count: 1
|
||||
@@ -675,71 +395,16 @@ parameters:
|
||||
count: 1
|
||||
path: app/Http/Livewire/MissingMediaSearch.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\PasswordStrength\\:\\:updatedPassword\\(\\) has parameter \\$password with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/PasswordStrength.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\PasswordStrength\\:\\:\\$strengthLevels type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/PasswordStrength.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\PersonCredit\\:\\:updatingOccupation\\(\\) has parameter \\$value with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/PersonCredit.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Http\\\\Livewire\\\\SimilarTorrent\\:\\:\\$listeners has no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/SimilarTorrent.php
|
||||
|
||||
-
|
||||
message: "#^Possibly invalid array key type \\(array\\|string\\)\\.$#"
|
||||
count: 2
|
||||
path: app/Http/Livewire/Top10.php
|
||||
|
||||
-
|
||||
message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Builder\\:\\:ofName\\(\\)\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/TorrentSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 3
|
||||
path: app/Http/Livewire/UserNotes.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\UserSearch\\:\\:toggleProperties\\(\\) has parameter \\$property with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/UserSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 7
|
||||
path: app/Http/Livewire/UserWarnings.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Livewire\\\\WarningLogSearch\\:\\:toggleProperties\\(\\) has parameter \\$property with no type specified\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Livewire/WarningLogSearch.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Middleware/CheckForAdmin.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Middleware/CheckForModo.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$boolean of function abort_unless expects bool, int given\\.$#"
|
||||
count: 1
|
||||
path: app/Http/Middleware/CheckForOwner.php
|
||||
|
||||
-
|
||||
message: "#^Method App\\\\Http\\\\Middleware\\\\SetLanguage\\:\\:setSystemLocale\\(\\) has parameter \\$request with no type specified\\.$#"
|
||||
count: 1
|
||||
@@ -1110,16 +775,6 @@ parameters:
|
||||
count: 1
|
||||
path: app/Repositories/ChatRepository.php
|
||||
|
||||
-
|
||||
message: "#^Property App\\\\Rules\\\\EmailBlacklist\\:\\:\\$domains type has no value type specified in iterable type array\\.$#"
|
||||
count: 1
|
||||
path: app/Rules/EmailBlacklist.php
|
||||
|
||||
-
|
||||
message: "#^Class Database\\\\Factories\\\\FollowFactory extends generic class Illuminate\\\\Database\\\\Eloquent\\\\Factories\\\\Factory but does not specify its types\\: TModel$#"
|
||||
count: 1
|
||||
path: database/factories/FollowFactory.php
|
||||
|
||||
-
|
||||
message: "#^Access to an undefined property object\\:\\:\\$default_groups\\.$#"
|
||||
count: 1
|
||||
@@ -1164,8 +819,3 @@ parameters:
|
||||
message: "#^Access to an undefined property object\\:\\:\\$id\\.$#"
|
||||
count: 1
|
||||
path: database/migrations/2023_07_29_205035_add_torrent_folder_name.php
|
||||
|
||||
-
|
||||
message: "#^Undefined variable\\: \\$this$#"
|
||||
count: 1
|
||||
path: routes/console.php
|
||||
|
||||
@@ -15,5 +15,7 @@ parameters:
|
||||
excludePaths:
|
||||
- app/Helpers/Markdown
|
||||
- app/Helpers/MarkdownExtra
|
||||
- app/Http/Livewire/PersonCredit
|
||||
- app/Http/Livewire/TorrentSearch
|
||||
level: 7
|
||||
checkOctaneCompatibility: true
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
@if ($torrent->featured == 0)
|
||||
@if ($torrent->featured === false)
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('torrent_feature', ['id' => $torrent->id]) }}"
|
||||
|
||||
@@ -14,8 +14,6 @@ declare(strict_types=1);
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
*/
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
@@ -26,7 +24,3 @@ use Illuminate\Foundation\Inspiring;
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function (): void {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->purpose('Display an inspiring quote');
|
||||
|
||||
Reference in New Issue
Block a user