mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-21 17:28:31 -05:00
update: type hints
This commit is contained in:
@@ -436,12 +436,8 @@ class TorrentController extends BaseController
|
||||
|
||||
/**
|
||||
* Anonymize A Torrent Media Info.
|
||||
*
|
||||
* @param $mediainfo
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private static function anonymizeMediainfo($mediainfo)
|
||||
private static function anonymizeMediainfo(?string $mediainfo): array|string|null
|
||||
{
|
||||
if ($mediainfo === null) {
|
||||
return null;
|
||||
@@ -465,10 +461,8 @@ class TorrentController extends BaseController
|
||||
|
||||
/**
|
||||
* Parse Torrent Keywords.
|
||||
*
|
||||
* @param $text
|
||||
*/
|
||||
private static function parseKeywords($text): array
|
||||
private static function parseKeywords(?string $text): array
|
||||
{
|
||||
$parts = \explode(', ', $text);
|
||||
$result = [];
|
||||
|
||||
@@ -76,7 +76,7 @@ class BonExchange extends Model
|
||||
/**
|
||||
* @method getDownloadOptions
|
||||
*/
|
||||
public function getDownloadOptions(): array
|
||||
public function getDownloadOptions(): Collection
|
||||
{
|
||||
return self::where('download', '=', true)
|
||||
->orderBy('value')
|
||||
@@ -86,7 +86,7 @@ class BonExchange extends Model
|
||||
/**
|
||||
* @method getUploadOptions
|
||||
*/
|
||||
public function getUploadOptions(): array
|
||||
public function getUploadOptions(): Collection
|
||||
{
|
||||
return self::where('upload', '=', true)
|
||||
->orderBy('value')
|
||||
@@ -96,7 +96,7 @@ class BonExchange extends Model
|
||||
/**
|
||||
* @method getPersonalFreeleechOption
|
||||
*/
|
||||
public function getPersonalFreeleechOption(): array
|
||||
public function getPersonalFreeleechOption(): Collection
|
||||
{
|
||||
return self::where('personal_freeleech', '=', true)
|
||||
->orderBy('value')
|
||||
@@ -106,7 +106,7 @@ class BonExchange extends Model
|
||||
/**
|
||||
* @method getInviteOption
|
||||
*/
|
||||
public function getInviteOption(): array
|
||||
public function getInviteOption(): Collection
|
||||
{
|
||||
return self::where('invite', '=', true)
|
||||
->orderBy('value')
|
||||
|
||||
Reference in New Issue
Block a user