mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Remove redundant typing from DocBlocks
This commit is contained in:
@@ -93,9 +93,6 @@ class Books
|
||||
return BookInfo::query()->where('id', $id)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
*/
|
||||
public function getBookInfoByName($title): Model
|
||||
{
|
||||
//only used to get a count of words
|
||||
|
||||
@@ -121,8 +121,6 @@ class Console
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @param string $platform
|
||||
* @return false|\Illuminate\Database\Eloquent\Model
|
||||
*/
|
||||
public function getConsoleInfoByName(string $title, string $platform)
|
||||
@@ -297,9 +295,6 @@ class Console
|
||||
return $browseBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $review
|
||||
*/
|
||||
public function update($id, $title, $asin, $url, $salesrank, $platform, $publisher, $releasedate, $esrb, $cover, $genres_id, string $review = 'review'): void
|
||||
{
|
||||
$releasedate = $releasedate !== '' ? $releasedate : 'null';
|
||||
@@ -512,8 +507,6 @@ class Console
|
||||
/**
|
||||
* This function sets the platform retrieved
|
||||
* from the release to the Amazon equivalent.
|
||||
*
|
||||
* @param string $platform
|
||||
*/
|
||||
protected function _replacePlatform(string $platform): string
|
||||
{
|
||||
|
||||
@@ -37,8 +37,6 @@ class Genres
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param bool $activeOnly
|
||||
* @return array|mixed
|
||||
*/
|
||||
public function getGenres(string $type = '', bool $activeOnly = false)
|
||||
@@ -66,10 +64,6 @@ class Genres
|
||||
return $genresArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param bool $activeOnly
|
||||
*/
|
||||
private function getListQuery(string $type = '', bool $activeOnly = false): string
|
||||
{
|
||||
if (! empty($type)) {
|
||||
|
||||
@@ -213,8 +213,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Amount of times to retry before giving up when connecting.
|
||||
*
|
||||
* @param int $retries
|
||||
*/
|
||||
public function setConnectionRetries(int $retries)
|
||||
{
|
||||
@@ -245,7 +243,6 @@ class IRCClient
|
||||
* @param string $hostname Host name of the IRC server (can be a IP or a name).
|
||||
* @param int $port Port number of the IRC server.
|
||||
* @param bool $tls Use encryption for the socket transport? (make sure the port is right).
|
||||
* @return bool
|
||||
*/
|
||||
public function connect(string $hostname, int $port = 6667, bool $tls = false): bool
|
||||
{
|
||||
@@ -301,7 +298,6 @@ class IRCClient
|
||||
* @param string $userName The user name - visible in the host name.
|
||||
* @param string $realName The real name - visible in the WhoIs.
|
||||
* @param null $password The password - some servers require a password.
|
||||
* @return bool
|
||||
*/
|
||||
public function login(string $nickName, string $userName, string $realName, $password = null): bool
|
||||
{
|
||||
@@ -384,7 +380,6 @@ class IRCClient
|
||||
* Quit from IRC.
|
||||
*
|
||||
* @param string $message Optional disconnect message.
|
||||
* @return bool
|
||||
*/
|
||||
public function quit(string $message = null): bool
|
||||
{
|
||||
@@ -439,7 +434,6 @@ class IRCClient
|
||||
*
|
||||
* @param array $channels Array of channels with their passwords (null if the channel doesn't need a password).
|
||||
* array( '#exampleChannel' => 'thePassword', '#exampleChan2' => null );
|
||||
* @return bool
|
||||
*/
|
||||
public function joinChannels(array $channels = []): bool
|
||||
{
|
||||
@@ -470,9 +464,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Join a channel.
|
||||
*
|
||||
* @param string $channel
|
||||
* @param string $password
|
||||
*/
|
||||
protected function _joinChannel(string $channel, string $password)
|
||||
{
|
||||
@@ -481,8 +472,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Send PONG to a host.
|
||||
*
|
||||
* @param string $host
|
||||
*/
|
||||
protected function _pong(string $host)
|
||||
{
|
||||
@@ -498,8 +487,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Send PING to a host.
|
||||
*
|
||||
* @param string $host
|
||||
*/
|
||||
protected function _ping(string $host)
|
||||
{
|
||||
@@ -553,9 +540,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Send a command to the IRC server.
|
||||
*
|
||||
* @param string $command
|
||||
* @return bool
|
||||
*/
|
||||
protected function _writeSocket(string $command): bool
|
||||
{
|
||||
@@ -629,8 +613,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Check if we are connected to the IRC server.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function _connected(): bool
|
||||
{
|
||||
@@ -639,9 +621,6 @@ class IRCClient
|
||||
|
||||
/**
|
||||
* Strips control characters from a IRC message.
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
protected function _stripControlCharacters(string $text): string
|
||||
{
|
||||
|
||||
@@ -403,8 +403,6 @@ class IRCScraper extends IRCClient
|
||||
|
||||
/**
|
||||
* Echo new or update pre to CLI.
|
||||
*
|
||||
* @param bool $new
|
||||
*/
|
||||
protected function _doEcho(bool $new = true)
|
||||
{
|
||||
@@ -460,7 +458,6 @@ class IRCScraper extends IRCClient
|
||||
/**
|
||||
* Get a group id for a group name.
|
||||
*
|
||||
* @param string $groupName
|
||||
* @return mixed
|
||||
*/
|
||||
protected function _getGroupID(string $groupName)
|
||||
|
||||
@@ -213,7 +213,6 @@ class Movie
|
||||
* Get movie releases with covers for movie browse page.
|
||||
*
|
||||
*
|
||||
* @param int $maxAge
|
||||
* @return array|mixed
|
||||
*/
|
||||
public function getMovieRange($page, $cat, $start, $num, $orderBy, int $maxAge = -1, array $excludedCats = [])
|
||||
@@ -376,7 +375,6 @@ class Movie
|
||||
/**
|
||||
* Get trailer using IMDB Id.
|
||||
*
|
||||
* @param int $imdbId
|
||||
* @return bool|string
|
||||
*
|
||||
* @throws \Exception
|
||||
@@ -408,7 +406,6 @@ class Movie
|
||||
/**
|
||||
* Parse trakt info, insert into DB.
|
||||
*
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
public function parseTraktTv(array &$data)
|
||||
@@ -514,11 +511,6 @@ class Movie
|
||||
/**
|
||||
* Returns a tmdb, imdb or trakt variable, the one that is set. Empty string if both not set.
|
||||
*
|
||||
* @param string $variable1
|
||||
* @param string $variable2
|
||||
* @param string $variable3
|
||||
* @param string $variable4
|
||||
* @param string $variable5
|
||||
* @return array|string
|
||||
*/
|
||||
protected function setVariables(string $variable1, string $variable2, string $variable3, string $variable4, string $variable5)
|
||||
@@ -741,7 +733,6 @@ class Movie
|
||||
* Fetch info for IMDB id from TMDB.
|
||||
*
|
||||
*
|
||||
* @param bool $text
|
||||
* @return array|false
|
||||
*/
|
||||
public function fetchTMDBProperties($imdbId, bool $text = false)
|
||||
@@ -999,7 +990,6 @@ class Movie
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @return array|bool
|
||||
*
|
||||
* @throws \DariusIII\ItunesApi\Exceptions\InvalidProviderException
|
||||
@@ -1086,9 +1076,6 @@ class Movie
|
||||
* Process releases with no IMDB id's.
|
||||
*
|
||||
*
|
||||
* @param string $groupID
|
||||
* @param string $guidChar
|
||||
* @param int $lookupIMDB
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -1277,8 +1264,6 @@ class Movie
|
||||
|
||||
/**
|
||||
* Parse a movie name from a release search name.
|
||||
*
|
||||
* @param string $releaseName
|
||||
*/
|
||||
protected function parseMovieSearchName(string $releaseName): bool
|
||||
{
|
||||
|
||||
@@ -401,7 +401,6 @@ class Music
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $local
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -481,7 +480,6 @@ class Music
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $releaseName
|
||||
* @return array|false
|
||||
*/
|
||||
public function parseArtist(string $releaseName)
|
||||
@@ -618,7 +616,6 @@ class Music
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
* @return array|bool
|
||||
*
|
||||
* @throws \DariusIII\ItunesApi\Exceptions\InvalidProviderException
|
||||
|
||||
@@ -376,9 +376,6 @@ class NNTP extends \Net_NNTP_Client
|
||||
/**
|
||||
* Fetch an overview of article(s) in the currently selected group.
|
||||
*
|
||||
* @param string $range
|
||||
* @param bool $names
|
||||
* @param bool $forceNames
|
||||
* @return mixed On success : (array) Multidimensional array with article headers.
|
||||
*
|
||||
* @throws \Exception
|
||||
|
||||
@@ -139,7 +139,6 @@ class NZBContents
|
||||
* Gets the completion from the NZB, optionally looks if there is an NFO/PAR2 file.
|
||||
*
|
||||
*
|
||||
* @param bool $nfoCheck
|
||||
* @return array|false
|
||||
*
|
||||
* @throws \Exception
|
||||
@@ -243,11 +242,6 @@ class NZBContents
|
||||
/**
|
||||
* Attempts to get the releasename from a par2 file.
|
||||
*
|
||||
* @param string $guid
|
||||
* @param int $relID
|
||||
* @param int $groupID
|
||||
* @param int $nameStatus
|
||||
* @param int $show
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -241,7 +241,6 @@ class NZBImport
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $useNzbName
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -456,8 +455,6 @@ class NZBImport
|
||||
|
||||
/**
|
||||
* Echo message to browser or CLI.
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
protected function echoOut(string $message): void
|
||||
{
|
||||
|
||||
@@ -1449,8 +1449,6 @@ class NameFixer
|
||||
/**
|
||||
* Look for a TV name.
|
||||
*
|
||||
* @param bool $echo
|
||||
* @param string $type
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -95,8 +95,6 @@ class Regexes
|
||||
|
||||
/**
|
||||
* Get a single regex using its id.
|
||||
*
|
||||
* @param int $id
|
||||
*/
|
||||
public function getRegexByID(int $id): array
|
||||
{
|
||||
@@ -104,7 +102,6 @@ class Regexes
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $group_regex
|
||||
* @return mixed
|
||||
*/
|
||||
public function getRegex(string $group_regex = '')
|
||||
@@ -147,7 +144,6 @@ class Regexes
|
||||
/**
|
||||
* Delete a regex using its id.
|
||||
*
|
||||
* @param int $id
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
@@ -163,9 +159,6 @@ class Regexes
|
||||
*
|
||||
* Requires table per group to be on.
|
||||
*
|
||||
* @param string $groupName
|
||||
* @param string $regex
|
||||
* @param int $limit
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -326,8 +319,6 @@ class Regexes
|
||||
*
|
||||
* Requires at least 1 named captured group.
|
||||
*
|
||||
* @param string $regex
|
||||
* @param string $subject
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -359,8 +350,6 @@ class Regexes
|
||||
|
||||
/**
|
||||
* Format part of a query.
|
||||
*
|
||||
* @param string $group_regex
|
||||
*/
|
||||
protected function _groupQueryString(string $group_regex): string
|
||||
{
|
||||
|
||||
@@ -97,7 +97,6 @@ class ReleaseCleaning
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $usePre
|
||||
* @return array|false|string
|
||||
*
|
||||
* @throws \Exception
|
||||
@@ -402,9 +401,6 @@ class ReleaseCleaning
|
||||
|
||||
// Run at the end because this can be dangerous. In the future it's better to make these per group. There should not be numbers after yEnc because we remove them as well before inserting (even when importing).
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function generic(): array
|
||||
{
|
||||
// This regex gets almost all of the predb release names also keep in mind that not every subject ends with yEnc, some are truncated, because of the 255 character limit and some have extra charaters tacked onto the end, like (5/10).
|
||||
|
||||
@@ -67,9 +67,6 @@ class ReleaseExtra
|
||||
return ReleaseSubtitle::query()->where('releases_id', $id)->select([DB::raw("GROUP_CONCAT(subslanguage SEPARATOR ', ') AS subs")])->orderBy('subsid')->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $guid
|
||||
*/
|
||||
public function getBriefByGuid(string $guid): array
|
||||
{
|
||||
return DB::select(sprintf("SELECT containerformat, videocodec, videoduration, videoaspect,
|
||||
@@ -318,10 +315,6 @@ class ReleaseExtra
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $releaseID
|
||||
* @param string $uniqueId
|
||||
*/
|
||||
public function addUID(int $releaseID, string $uniqueId): void
|
||||
{
|
||||
$dupecheck = ReleaseUnique::query()->where('releases_id', $releaseID)->orWhere([
|
||||
|
||||
@@ -1037,7 +1037,6 @@ class ReleaseRemover
|
||||
/**
|
||||
* Delete releases from the database.
|
||||
*
|
||||
* @return true
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -1257,8 +1256,6 @@ class ReleaseRemover
|
||||
|
||||
/**
|
||||
* Check if the user wants to run the current query.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkUserResponse(): bool
|
||||
{
|
||||
@@ -1287,8 +1284,6 @@ class ReleaseRemover
|
||||
|
||||
/**
|
||||
* Remove multiple spaces and trim leading spaces.
|
||||
*
|
||||
* @param string $string
|
||||
*/
|
||||
protected function cleanSpaces(string $string): string
|
||||
{
|
||||
@@ -1331,7 +1326,6 @@ class ReleaseRemover
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $dbRegex
|
||||
* @return bool|mixed|string
|
||||
*/
|
||||
protected function extractSrchFromRegx(string $dbRegex = '')
|
||||
|
||||
@@ -340,8 +340,6 @@ class Releases extends Release
|
||||
*
|
||||
* @param array $identifiers ['g' => Release GUID(mandatory), 'id => ReleaseID(optional, pass
|
||||
* false)]
|
||||
* @param \Blacklight\NZB $nzb
|
||||
* @param \Blacklight\ReleaseImage $releaseImage
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -195,9 +195,6 @@ class Tmux
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function updateItem($setting, $value): int
|
||||
{
|
||||
return Settings::query()->where('setting', '=', $setting)->update(['value' => $value]);
|
||||
@@ -261,7 +258,6 @@ class Tmux
|
||||
* Returns random bool, weighted by $chance.
|
||||
*
|
||||
*
|
||||
* @param int $chance
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -288,9 +284,6 @@ class Tmux
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $db_name
|
||||
* @param string $ppmax
|
||||
* @param string $ppmin
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -85,8 +85,6 @@ class XXX
|
||||
|
||||
/**
|
||||
* Get XXX releases with covers for xxx browse page.
|
||||
*
|
||||
* @param int $maxAge
|
||||
*/
|
||||
public function getXXXRange($page, $cat, $start, $num, $orderBy, int $maxAge = -1, array $excludedCats = []): array
|
||||
{
|
||||
|
||||
@@ -219,8 +219,6 @@ class Geary
|
||||
* Endpoint.
|
||||
*
|
||||
* Construct an endpoint URL
|
||||
*
|
||||
* @param string $method
|
||||
*/
|
||||
private function endpoint(string $method): string
|
||||
{
|
||||
@@ -255,8 +253,6 @@ class Geary
|
||||
* Get Header.
|
||||
*
|
||||
* Get single data from header
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
private function get_header(string $name): string
|
||||
{
|
||||
@@ -277,8 +273,6 @@ class Geary
|
||||
* Prepare Header.
|
||||
*
|
||||
* Add data to header for authentication purpose
|
||||
*
|
||||
* @param array $data
|
||||
*/
|
||||
private function prepare_header(array $data): array
|
||||
{
|
||||
@@ -304,7 +298,6 @@ class Geary
|
||||
*
|
||||
* Send a signed HTTP request
|
||||
*
|
||||
* @param array $data
|
||||
* @return mixed
|
||||
*/
|
||||
private function send_signed_request(array $data)
|
||||
|
||||
@@ -165,7 +165,6 @@ class ADE extends AdultMovies
|
||||
/**
|
||||
* Gets Product Information and/or Features.
|
||||
*
|
||||
* @param bool $extras
|
||||
* @return array - ProductInfo/Extras = features
|
||||
*/
|
||||
protected function productInfo(bool $extras = false): array
|
||||
@@ -202,7 +201,6 @@ class ADE extends AdultMovies
|
||||
/**
|
||||
* Searches xxx name.
|
||||
*
|
||||
* @param string $movie
|
||||
* @return bool - True if releases has 90% match, else false
|
||||
*/
|
||||
public function processSite(string $movie): bool
|
||||
|
||||
@@ -108,9 +108,6 @@ class ADM extends AdultMovies
|
||||
|
||||
/**
|
||||
* Get Product Information and Director.
|
||||
*
|
||||
*
|
||||
* @param bool $extras
|
||||
*/
|
||||
protected function productInfo(bool $extras = false): array
|
||||
{
|
||||
|
||||
@@ -141,8 +141,6 @@ class AEBN extends AdultMovies
|
||||
|
||||
/**
|
||||
* Gets the product information.
|
||||
*
|
||||
* @param bool $extras
|
||||
*/
|
||||
protected function productInfo(bool $extras = false): array
|
||||
{
|
||||
@@ -187,8 +185,6 @@ class AEBN extends AdultMovies
|
||||
|
||||
/**
|
||||
* Searches for a XXX name.
|
||||
*
|
||||
* @param string $movie
|
||||
*/
|
||||
public function processSite(string $movie): bool
|
||||
{
|
||||
|
||||
@@ -100,8 +100,6 @@ class Hotmovies extends AdultMovies
|
||||
|
||||
/**
|
||||
* Process ProductInfo.
|
||||
*
|
||||
* @param bool $extras
|
||||
*/
|
||||
protected function productInfo(bool $extras = false): array
|
||||
{
|
||||
@@ -200,7 +198,6 @@ class Hotmovies extends AdultMovies
|
||||
/**
|
||||
* Searches for match against xxx movie name.
|
||||
*
|
||||
* @param string $movie
|
||||
* @return bool , true if search >= 90%
|
||||
*/
|
||||
public function processSite(string $movie): bool
|
||||
|
||||
@@ -139,7 +139,6 @@ class Popporn extends AdultMovies
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $extras
|
||||
* @return array|mixed
|
||||
*/
|
||||
protected function productInfo(bool $extras = false)
|
||||
@@ -230,8 +229,6 @@ class Popporn extends AdultMovies
|
||||
|
||||
/**
|
||||
* Gets categories.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function genres(): array
|
||||
{
|
||||
@@ -249,7 +246,6 @@ class Popporn extends AdultMovies
|
||||
/**
|
||||
* Searches for match against searchterm.
|
||||
*
|
||||
* @param string $movie
|
||||
* @return bool , true if search >= 90%
|
||||
*/
|
||||
public function processSite(string $movie): bool
|
||||
|
||||
@@ -119,7 +119,6 @@ class AniDB
|
||||
/**
|
||||
* Selects episode info for a local match.
|
||||
*
|
||||
* @param int $episode
|
||||
* @return \Illuminate\Database\Eloquent\Model|null|static
|
||||
*/
|
||||
private function checkAniDBInfo($anidbId, int $episode = -1)
|
||||
@@ -153,7 +152,6 @@ class AniDB
|
||||
/**
|
||||
* Extracts anime title and episode info from release searchname.
|
||||
*
|
||||
* @param string $cleanName
|
||||
* @return array $hits
|
||||
*/
|
||||
private function extractTitleEpisode(string $cleanName = ''): array
|
||||
@@ -194,7 +192,6 @@ class AniDB
|
||||
* Retrieves AniDB Info using a cleaned name.
|
||||
*
|
||||
*
|
||||
* @param string $searchName
|
||||
* @return mixed
|
||||
*/
|
||||
private function getAnidbByName(string $searchName = '')
|
||||
|
||||
@@ -41,8 +41,6 @@ class TMDB extends TV
|
||||
/**
|
||||
* Main processing director function for TMDB
|
||||
* Calls work query function and initiates processing.
|
||||
*
|
||||
* @param bool $local
|
||||
*/
|
||||
public function processSite($groupID, $guidChar, $process, bool $local = false): void
|
||||
{
|
||||
@@ -183,7 +181,6 @@ class TMDB extends TV
|
||||
* Calls the API to perform initial show name match to TMDB title
|
||||
* Returns a formatted array of show data or false if no match.
|
||||
*
|
||||
* @param string $cleanName
|
||||
* @return array|false
|
||||
*/
|
||||
protected function getShowInfo(string $cleanName): bool|array
|
||||
@@ -284,11 +281,6 @@ class TMDB extends TV
|
||||
* Gets the specific episode info for the parsed release after match
|
||||
* Returns a formatted array of episode data or false if no match.
|
||||
*
|
||||
* @param int $tmdbid
|
||||
* @param int $season
|
||||
* @param int $episode
|
||||
* @param string $airdate
|
||||
* @param int $videoId
|
||||
* @return array|false
|
||||
*/
|
||||
protected function getEpisodeInfo(int $tmdbid, int $season, int $episode, string $airdate = '', int $videoId = 0): bool|array
|
||||
|
||||
@@ -60,8 +60,6 @@ class TVDB extends TV
|
||||
/**
|
||||
* Main processing director function for scrapers
|
||||
* Calls work query function and initiates processing.
|
||||
*
|
||||
* @param bool $local
|
||||
*/
|
||||
public function processSite($groupID, $guidChar, $process, bool $local = false): void
|
||||
{
|
||||
|
||||
@@ -49,8 +49,6 @@ class TVMaze extends TV
|
||||
/**
|
||||
* Main processing director function for scrapers
|
||||
* Calls work query function and initiates processing.
|
||||
*
|
||||
* @param bool $local
|
||||
*/
|
||||
public function processSite($groupID, $guidChar, $process, bool $local = false): void
|
||||
{
|
||||
@@ -213,7 +211,6 @@ class TVMaze extends TV
|
||||
* Returns a formatted array of show data or false if no match.
|
||||
*
|
||||
*
|
||||
* @param string $cleanName
|
||||
* @return array|false
|
||||
*/
|
||||
protected function getShowInfo(string $cleanName)
|
||||
@@ -319,11 +316,6 @@ class TVMaze extends TV
|
||||
* Gets the specific episode info for the parsed release after match
|
||||
* Returns a formatted array of episode data or false if no match.
|
||||
*
|
||||
* @param int $tvMazeId
|
||||
* @param int $season
|
||||
* @param int $episode
|
||||
* @param string $airDate
|
||||
* @param int $videoId
|
||||
* @return array|false
|
||||
*/
|
||||
protected function getEpisodeInfo(int $tvMazeId, int $season, int $episode, string $airDate = '', int $videoId = 0)
|
||||
|
||||
@@ -64,8 +64,6 @@ class TraktTv extends TV
|
||||
/**
|
||||
* Main processing director function for scrapers
|
||||
* Calls work query function and initiates processing.
|
||||
*
|
||||
* @param bool $local
|
||||
*/
|
||||
public function processSite($groupID, $guidChar, $process, bool $local = false): void
|
||||
{
|
||||
@@ -197,9 +195,6 @@ class TraktTv extends TV
|
||||
/**
|
||||
* Retrieve info of TV episode from site using its API.
|
||||
*
|
||||
* @param int $siteId
|
||||
* @param int $series
|
||||
* @param int $episode
|
||||
* @return array|false False on failure, an array of information fields otherwise.
|
||||
*/
|
||||
public function getEpisodeInfo(int $siteId, int $series, int $episode)
|
||||
|
||||
@@ -32,7 +32,6 @@ class Country
|
||||
/**
|
||||
* Get a country code for a country name.
|
||||
*
|
||||
* @param string $country
|
||||
* @return mixed
|
||||
*/
|
||||
public static function countryCode(string $country)
|
||||
|
||||
@@ -33,8 +33,6 @@ class NntmuxDeleteUnVerifiedUsers extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -143,9 +143,6 @@ class NntmuxPopulateSearchIndexes extends Command
|
||||
$this->newLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function elasticReleases(): void
|
||||
{
|
||||
$elastic = new ElasticSearchSiteSearch();
|
||||
@@ -189,9 +186,6 @@ class NntmuxPopulateSearchIndexes extends Command
|
||||
$this->info('Done');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function elasticPreDB(): void
|
||||
{
|
||||
$elastic = new ElasticSearchSiteSearch();
|
||||
|
||||
@@ -35,7 +35,6 @@ class NntmuxRemoveBadReleases extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -48,8 +48,6 @@ class NntmuxResetPostProcessing extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -33,8 +33,6 @@ class NntmuxUpdateExpiredRoles extends Command
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -19,8 +19,6 @@ class Kernel extends ConsoleKernel
|
||||
|
||||
/**
|
||||
* Define the application's command schedule.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
@@ -40,8 +38,6 @@ class Kernel extends ConsoleKernel
|
||||
|
||||
/**
|
||||
* Register the commands for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function commands(): void
|
||||
{
|
||||
|
||||
@@ -28,8 +28,6 @@ class Handler extends ExceptionHandler
|
||||
|
||||
/**
|
||||
* Catch errors with Sentry.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
@@ -44,7 +42,6 @@ class Handler extends ExceptionHandler
|
||||
* Report or log an exception.
|
||||
*
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*
|
||||
* @throws \Throwable
|
||||
|
||||
@@ -25,9 +25,6 @@ namespace App\Extensions\util;
|
||||
*/
|
||||
class PhpYenc
|
||||
{
|
||||
/**
|
||||
* @param bool $ignore
|
||||
*/
|
||||
public static function decode(&$text, bool $ignore = false): bool|string
|
||||
{
|
||||
$crc = '';
|
||||
|
||||
@@ -50,7 +50,6 @@ class LoginController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Http\RedirectResponse|null
|
||||
*
|
||||
* @throws \Illuminate\Auth\AuthenticationException
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
|
||||
@@ -168,9 +168,6 @@ class BasePageController extends Controller
|
||||
return view('errors.tokenError')->with('Error', 'Token mismatch');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $retry
|
||||
*/
|
||||
public function show429(string $retry = '')
|
||||
{
|
||||
abort(429, $retry);
|
||||
|
||||
@@ -9,9 +9,6 @@ class Authenticate extends Middleware
|
||||
{
|
||||
/**
|
||||
* Get the path the user should be redirected to when they are not authenticated.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return string
|
||||
*/
|
||||
protected function redirectTo(Request $request): string
|
||||
{
|
||||
|
||||
@@ -12,8 +12,6 @@ class ClearanceMiddleware
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -11,9 +11,6 @@ class Google2FAMiddleware
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
|
||||
@@ -11,10 +11,6 @@ class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next, ?string $guard = null): Response
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ class LoginLoginRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ class RegisterRegisterRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ class ShowLinkRequestFormForgotPasswordRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ class ContactContactURequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -8,8 +8,6 @@ class Disable2faPasswordSecurityRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
|
||||
@@ -25,8 +25,6 @@ class RemoveInactiveAccounts implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -22,8 +22,6 @@ class SendAccountChangedEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -32,8 +30,6 @@ class SendAccountChangedEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -22,8 +22,6 @@ class SendAccountDeletedEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -32,8 +30,6 @@ class SendAccountDeletedEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -22,8 +22,6 @@ class SendAccountExpiredEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -32,8 +30,6 @@ class SendAccountExpiredEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -31,8 +31,6 @@ class SendAccountWillExpireEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -37,8 +37,6 @@ class SendInviteEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -22,8 +22,6 @@ class SendNewRegisteredAccountMail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -32,8 +30,6 @@ class SendNewRegisteredAccountMail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -24,8 +24,6 @@ class SendPasswordForgottenEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user, $resetLink)
|
||||
{
|
||||
@@ -35,8 +33,6 @@ class SendPasswordForgottenEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -27,9 +27,6 @@ class SendPasswordResetEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @param string $newPass
|
||||
*/
|
||||
public function __construct(User $user, string $newPass)
|
||||
{
|
||||
@@ -39,8 +36,6 @@ class SendPasswordResetEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -22,8 +22,6 @@ class SendWelcomeEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -32,8 +30,6 @@ class SendWelcomeEmail implements ShouldQueue
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
|
||||
@@ -19,8 +19,6 @@ class UpdateUserAccessedApi
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UserAccessedApi $event): void
|
||||
{
|
||||
|
||||
@@ -19,8 +19,6 @@ class UpdateUserLoggedIn
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UserLoggedIn $event): void
|
||||
{
|
||||
|
||||
@@ -28,8 +28,6 @@ class AccountChange extends Mailable
|
||||
|
||||
/**
|
||||
* AccountChange constructor.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -41,7 +39,6 @@ class AccountChange extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,6 @@ class AccountDeleted extends Mailable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@ class AccountExpired extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -39,8 +39,6 @@ class AccountWillExpire extends Mailable
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build(): static
|
||||
{
|
||||
|
||||
@@ -26,7 +26,6 @@ class ContactUs extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,6 @@ class ForgottenPassword extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -39,8 +39,6 @@ class NewAccountCreatedEmail extends Mailable
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build(): static
|
||||
{
|
||||
|
||||
@@ -33,8 +33,6 @@ class PasswordReset extends Mailable
|
||||
|
||||
/**
|
||||
* PasswordReset constructor.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user, $newPass)
|
||||
{
|
||||
@@ -47,7 +45,6 @@ class PasswordReset extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -33,8 +33,6 @@ class SendInvite extends Mailable
|
||||
|
||||
/**
|
||||
* SendInvite constructor.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user, $invite)
|
||||
{
|
||||
@@ -47,7 +45,6 @@ class SendInvite extends Mailable
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -28,8 +28,6 @@ class WelcomeEmail extends Mailable
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
*/
|
||||
public function __construct(User $user)
|
||||
{
|
||||
@@ -40,8 +38,6 @@ class WelcomeEmail extends Mailable
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build(): static
|
||||
{
|
||||
|
||||
@@ -76,17 +76,11 @@ class AnidbInfo extends Model
|
||||
*/
|
||||
protected $table = 'anidb_info';
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function title(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AnidbTitle::class, 'anidbid');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function episode(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(AnidbEpisode::class, 'anidbid');
|
||||
|
||||
@@ -67,17 +67,11 @@ class BookInfo extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs(): string
|
||||
{
|
||||
return 'ix_bookinfo_author_title_ft';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -267,17 +267,11 @@ class Category extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function releases(): HasMany
|
||||
{
|
||||
return $this->hasMany(Release::class, 'categories_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function parent(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(RootCategory::class, 'root_categories_id');
|
||||
@@ -308,9 +302,6 @@ class Category extends Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function getCategorySearch(array $cat = []): string
|
||||
{
|
||||
$categories = [];
|
||||
|
||||
@@ -55,11 +55,6 @@ class Forumpost extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @param int $locked
|
||||
* @param int $sticky
|
||||
* @param int $replies
|
||||
*/
|
||||
public static function add($parentId, $userid, $subject, $message, int $locked = 0, int $sticky = 0, int $replies = 0): int
|
||||
{
|
||||
if ($message === '') {
|
||||
@@ -139,7 +134,6 @@ class Forumpost extends Model
|
||||
*
|
||||
*
|
||||
* @param $start
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getBrowseRange(): LengthAwarePaginator
|
||||
{
|
||||
|
||||
@@ -65,17 +65,11 @@ class GamesInfo extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs(): string
|
||||
{
|
||||
return 'ix_title_ft';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -76,17 +76,11 @@ class MusicInfo extends Model
|
||||
return $this->belongsTo(Genre::class, 'genres_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs(): string
|
||||
{
|
||||
return 'ix_musicinfo_artist_title_ft';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -152,7 +152,6 @@ class Predb extends Model
|
||||
/**
|
||||
* Try to match a single release to a PreDB title when the release is created.
|
||||
*
|
||||
* @param string $cleanerName
|
||||
* @return array|false Array with title/id from PreDB if found, false if not found.
|
||||
*/
|
||||
public static function matchPre(string $cleanerName)
|
||||
@@ -184,7 +183,6 @@ class Predb extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $search
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
@@ -235,17 +233,11 @@ class Predb extends Model
|
||||
return self::query()->where('id', $preID)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs(): string
|
||||
{
|
||||
return 'ft_predb_filename';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -48,9 +48,6 @@ class PredbHash extends Model
|
||||
*/
|
||||
protected $primaryKey = 'hash';
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function predb(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Predb::class, 'predb_id');
|
||||
|
||||
@@ -164,25 +164,16 @@ class Release extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function group(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(UsenetGroup::class, 'groups_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function download(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserDownload::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function userRelease(): HasMany
|
||||
{
|
||||
return $this->hasMany(UsersRelease::class, 'releases_id');
|
||||
@@ -193,73 +184,46 @@ class Release extends Model
|
||||
return $this->hasMany(ReleaseFile::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function category(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Category::class, 'categories_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function predb(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Predb::class, 'predb_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function failed(): HasMany
|
||||
{
|
||||
return $this->hasMany(DnzbFailure::class, 'release_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function releaseExtra(): HasMany
|
||||
{
|
||||
return $this->hasMany(ReleaseExtraFull::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function nfo(): HasOne
|
||||
{
|
||||
return $this->hasOne(ReleaseNfo::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function comment(): HasMany
|
||||
{
|
||||
return $this->hasMany(ReleaseComment::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function releaseGroup(): HasMany
|
||||
{
|
||||
return $this->hasMany(ReleasesGroups::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function video(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Video::class, 'videos_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function episode(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TvEpisode::class, 'tv_episodes_id');
|
||||
@@ -345,7 +309,6 @@ class Release extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $guid
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
@@ -541,9 +504,6 @@ class Release extends Model
|
||||
|
||||
/**
|
||||
* Get a range of releases. used in admin manage list.
|
||||
*
|
||||
*
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getFailedRange(): LengthAwarePaginator
|
||||
{
|
||||
|
||||
@@ -67,17 +67,11 @@ class ReleaseComment extends Model
|
||||
*/
|
||||
protected $dateFormat = false;
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function release(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Release::class, 'releases_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'users_id');
|
||||
@@ -94,9 +88,6 @@ class ReleaseComment extends Model
|
||||
return self::query()->where('id', $id)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function getComments($id): array
|
||||
{
|
||||
return self::query()->where('releases_id', $id)->orderByDesc('created_at')->get()->toArray();
|
||||
@@ -155,9 +146,6 @@ class ReleaseComment extends Model
|
||||
|
||||
/**
|
||||
* Get release_comments rows by limit.
|
||||
*
|
||||
*
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getCommentsRange(): LengthAwarePaginator
|
||||
{
|
||||
@@ -188,9 +176,6 @@ class ReleaseComment extends Model
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getCommentsForUserRange($uid): LengthAwarePaginator
|
||||
{
|
||||
return self::query()
|
||||
|
||||
@@ -85,8 +85,6 @@ class ReleaseFile extends Model
|
||||
* Add new files for a release ID.
|
||||
*
|
||||
*
|
||||
* @param string $hash
|
||||
* @param string $crc
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,6 @@ class ReleaseNfo extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $getNfoString
|
||||
* @return \Illuminate\Database\Eloquent\Model|null|static
|
||||
*/
|
||||
public static function getReleaseNfo($id, bool $getNfoString = true)
|
||||
|
||||
@@ -119,7 +119,6 @@ class Settings extends Model
|
||||
/**
|
||||
* Adapted from https://laravel.io/forum/01-15-2016-overriding-eloquent-attributes.
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get(string $key)
|
||||
|
||||
@@ -44,17 +44,11 @@ class SteamApp extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function searchableAs(): string
|
||||
{
|
||||
return 'ix_name_ft';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toSearchableArray(): array
|
||||
{
|
||||
return [
|
||||
|
||||
@@ -56,9 +56,6 @@ class TvEpisode extends Model
|
||||
return $this->belongsTo(Video::class, 'videos_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function release(): HasMany
|
||||
{
|
||||
return $this->hasMany(Release::class, 'tv_episodes_id');
|
||||
|
||||
@@ -93,9 +93,6 @@ class UsenetGroup extends Model
|
||||
$this->allasmgr = (int) Settings::settingValue('..allasmgr') === 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function release(): HasMany
|
||||
{
|
||||
return $this->hasMany(Release::class, 'groups_id');
|
||||
@@ -229,9 +226,7 @@ class UsenetGroup extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $groupname
|
||||
* @param null $active
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getGroupsRange(string $groupname = '', $active = null): LengthAwarePaginator
|
||||
{
|
||||
@@ -252,9 +247,6 @@ class UsenetGroup extends Model
|
||||
|
||||
/**
|
||||
* Update an existing group.
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function updateGroup($group): int
|
||||
{
|
||||
@@ -420,9 +412,6 @@ class UsenetGroup extends Model
|
||||
/**
|
||||
* Adds new newsgroups based on a regular expression match against USP available.
|
||||
*
|
||||
* @param string $groupList
|
||||
* @param int $active
|
||||
* @param int $backfill
|
||||
* @return array|string
|
||||
*
|
||||
* @throws \Exception
|
||||
|
||||
@@ -198,65 +198,41 @@ class User extends Authenticatable
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function role(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Role::class, 'roles_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function request(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserRequest::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function download(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserDownload::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function release(): HasMany
|
||||
{
|
||||
return $this->hasMany(UsersRelease::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function series(): HasMany
|
||||
{
|
||||
return $this->hasMany(UserSerie::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function invitation(): HasMany
|
||||
{
|
||||
return $this->hasMany(Invitation::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function failedRelease(): HasMany
|
||||
{
|
||||
return $this->hasMany(DnzbFailure::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function comment(): HasMany
|
||||
{
|
||||
return $this->hasMany(ReleaseComment::class, 'users_id');
|
||||
@@ -270,12 +246,6 @@ class User extends Authenticatable
|
||||
self::find($id)->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $role
|
||||
* @param string $username
|
||||
* @param string $host
|
||||
* @param string $email
|
||||
*/
|
||||
public static function getCount(string $role = '', string $username = '', string $host = '', string $email = ''): int
|
||||
{
|
||||
$res = self::query()->where('email', '<>', 'sharing@nZEDb.com');
|
||||
@@ -398,7 +368,6 @@ class User extends Authenticatable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
|
||||
@@ -45,17 +45,11 @@ class UserDownload extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'users_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function release(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Release::class, 'releases_id');
|
||||
@@ -64,7 +58,6 @@ class UserDownload extends Model
|
||||
/**
|
||||
* Get the COUNT of how many NZB's the user has downloaded in the past day.
|
||||
*
|
||||
* @param int $userID
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
||||
@@ -49,9 +49,6 @@ class UserRequest extends Model
|
||||
*/
|
||||
protected $fillable = ['id', 'users_id', 'request', 'hosthash', 'timestamp'];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'users_id');
|
||||
@@ -70,7 +67,6 @@ class UserRequest extends Model
|
||||
/**
|
||||
* Get the quantity of API requests in the last day for the users_id.
|
||||
*
|
||||
* @param int $userID
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
|
||||
@@ -41,9 +41,6 @@ class UserSerie extends Model
|
||||
*/
|
||||
protected $dateFormat = false;
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'users_id');
|
||||
|
||||
@@ -63,25 +63,16 @@ class Video extends Model
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function alias(): HasMany
|
||||
{
|
||||
return $this->hasMany(VideoAlias::class, 'videos_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function release(): HasMany
|
||||
{
|
||||
return $this->hasMany(Release::class, 'videos_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function episode(): HasMany
|
||||
{
|
||||
return $this->hasMany(TvEpisode::class, 'videos_id');
|
||||
@@ -104,10 +95,6 @@ class Video extends Model
|
||||
|
||||
/**
|
||||
* Retrieves a range of all shows for the show-edit admin list.
|
||||
*
|
||||
*
|
||||
* @param string $showname
|
||||
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator
|
||||
*/
|
||||
public static function getRange(string $showname = ''): LengthAwarePaginator
|
||||
{
|
||||
@@ -124,9 +111,6 @@ class Video extends Model
|
||||
|
||||
/**
|
||||
* Returns a count of all shows -- usually used by pager.
|
||||
*
|
||||
*
|
||||
* @param string $showname
|
||||
*/
|
||||
public static function getCount(string $showname = ''): int
|
||||
{
|
||||
@@ -141,9 +125,6 @@ class Video extends Model
|
||||
|
||||
/**
|
||||
* Retrieves and returns a list of shows with eligible releases.
|
||||
*
|
||||
* @param string $letter
|
||||
* @param string $showname
|
||||
*/
|
||||
public static function getSeriesList($uid, string $letter = '', string $showname = ''): array
|
||||
{
|
||||
|
||||
@@ -35,9 +35,6 @@ class VideoAlias extends Model
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function video(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Video::class, 'videos_id');
|
||||
|
||||
@@ -16,7 +16,6 @@ class UserServiceObserver
|
||||
/**
|
||||
* Handle the user "created" event.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Jrean\UserVerification\Exceptions\ModelNotCompliantException
|
||||
*/
|
||||
|
||||
@@ -9,8 +9,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
@@ -21,8 +19,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
|
||||
@@ -17,8 +17,6 @@ class AuthServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Register any authentication / authorization services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
|
||||
@@ -9,8 +9,6 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
|
||||
@@ -34,8 +34,6 @@ class EventServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Register any events for your application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
|
||||
@@ -10,8 +10,6 @@ class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
@@ -26,8 +24,6 @@ class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
||||
* Register the Horizon gate.
|
||||
*
|
||||
* This gate determines who can access Horizon in non-local environments.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function gate(): void
|
||||
{
|
||||
@@ -40,8 +36,6 @@ class HorizonServiceProvider extends HorizonApplicationServiceProvider
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
|
||||
@@ -11,8 +11,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
@@ -23,8 +21,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map(): void
|
||||
{
|
||||
@@ -39,8 +35,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
* Define the "web" routes for the application.
|
||||
*
|
||||
* These routes all receive session state, CSRF protection, etc.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapWebRoutes(): void
|
||||
{
|
||||
@@ -52,8 +46,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
* Define the "api" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapApiRoutes(): void
|
||||
{
|
||||
@@ -66,8 +58,6 @@ class RouteServiceProvider extends ServiceProvider
|
||||
* Define the "rss" routes for the application.
|
||||
*
|
||||
* These routes are typically stateless.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function mapRssRoutes(): void
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user