update: type hints

This commit is contained in:
HDVinnie
2022-01-08 14:53:33 -05:00
parent a2cdb5f5ff
commit 9ddd9736ac
2 changed files with 6 additions and 12 deletions
@@ -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 = [];
+4 -4
View File
@@ -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')