Skip to content

Commit

Permalink
CS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Oct 4, 2023
1 parent c54176e commit aee186d
Show file tree
Hide file tree
Showing 21 changed files with 12 additions and 60 deletions.
3 changes: 0 additions & 3 deletions Blacklight/Books.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ class Books

public array $failCache;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

/**
Expand Down
2 changes: 1 addition & 1 deletion Blacklight/Categorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public function isMovieHD(): bool

public function isMovieUHD(): bool
{
if (! preg_match('/(S\d+).*(2160p).*(Netflix|Amazon).*(TrollUHD|NTb|VLAD)/i', $this->releaseName) && false !== stripos($this->releaseName, '2160p')) {
if (! preg_match('/(S\d+).*(2160p).*(Netflix|Amazon).*(TrollUHD|NTb|VLAD)/i', $this->releaseName) && stripos($this->releaseName, '2160p') !== false) {
$this->tmpCat = Category::MOVIE_UHD;

return true;
Expand Down
2 changes: 1 addition & 1 deletion Blacklight/Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function data_getFrontPage(): \Illuminate\Database\Eloquent\Collection|st
->get();
}

public function data_getIndex(): Content|null
public function data_getIndex(): ?Content
{
return Content::query()->where(
[
Expand Down
4 changes: 1 addition & 3 deletions Blacklight/IRCClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ class IRCClient

/**
* Buffer contents.
*
* @var string
*/
protected ?string $_buffer = null;

Expand Down Expand Up @@ -530,7 +528,7 @@ protected function _writeSocket(string $command): bool
/**
* Write a single character to the socket.
*
* @param string (char) $character A single character.
* @param string (char) $character A single character.
* @return int|bool Number of bytes written or false.
*/
protected function _writeSocketChar($character)
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/IRCScraper.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class IRCScraper extends IRCClient
*/
protected mixed $_titleIgnoreRegex;

/**
* @var \Blacklight\ManticoreSearch
*/
protected manticoreSearch $manticoreSearch;

private ElasticSearchSiteSearch $elasticsearch;
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/ManticoreSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ class ManticoreSearch

public Search $search;

/**
* @var \Blacklight\ColorCLI
*/
private ColorCLI $cli;

/**
Expand Down
2 changes: 2 additions & 0 deletions Blacklight/NNTP.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ public function getXOVER(string $range)
$data[$key] = $headerArray;
$iterator = 0;
}

// Return the array of headers.
return $data;
}
Expand Down Expand Up @@ -568,6 +569,7 @@ public function getMessages(string $groupName, mixed $identifiers, bool $alterna
if ($body !== '') {
return $body;
}

// Return the error.
return $newBody;
}
Expand Down
7 changes: 0 additions & 7 deletions Blacklight/NameFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ class NameFixer

protected string $fullall;

/**
* @var \Blacklight\ColorCLI
*/
public ColorCLI $colorCLI;

/**
Expand All @@ -118,9 +115,6 @@ class NameFixer
*/
public mixed $manticore;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

private ElasticSearchSiteSearch $elasticsearch;
Expand Down Expand Up @@ -474,7 +468,6 @@ public function fixNamesWithSrr($time, $echo, $cats, $nameStatus, $show): void
* @param $time 1: 24 hours, 2: no time limit
* @param $echo 1: change the name, anything else: preview of what could have been changed.
* @param $cats 1: other categories, 2: all categories
* @param \Blacklight\NNTP $nntp
*
* @throws \Exception
*/
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/Nfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ class Nfo

public const NFO_FOUND = 1; // Release has an NFO.

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

/**
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/ReleaseImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ class ReleaseImage
*/
public string $vidSavePath;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

/**
Expand Down
12 changes: 0 additions & 12 deletions Blacklight/ReleaseRemover.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,17 @@ class ReleaseRemover
*/
protected string $query;

/**
* @var \Blacklight\Releases
*/
protected Releases $releases;

/**
* Result of the select query.
*/
protected array $result;

/**
* @var \Blacklight\NZB
*/
private NZB $nzb;

/**
* @var \Blacklight\ReleaseImage
*/
private ReleaseImage $releaseImage;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

public function __construct()
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/Releases.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class Releases extends Release

public const PASSWD_RAR = 1; // Definitely passworded.

/**
* @var \Blacklight\ManticoreSearch
*/
public ManticoreSearch $manticoreSearch;

public int $passwordStatus;
Expand Down
3 changes: 0 additions & 3 deletions Blacklight/Tmux.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class Tmux

public $tmux_session;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

/**
Expand Down
6 changes: 0 additions & 6 deletions Blacklight/XXX.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ class XXX

protected string $imgSavePath;

/**
* @var \Blacklight\ReleaseImage
*/
protected ReleaseImage $releaseImage;

protected string|int|null $movieQty;
Expand All @@ -45,9 +42,6 @@ class XXX

protected string $cookie;

/**
* @var \Blacklight\ColorCLI
*/
protected ColorCLI $colorCli;

public function __construct()
Expand Down
2 changes: 1 addition & 1 deletion Blacklight/libraries/Forking.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ protected function _executeCommand(string $command): string
$process = Process::fromShellCommandline($command);
$process->setTimeout(1800);
$process->run(function ($type, $buffer) {
if (Process::ERR === $type) {
if ($type === Process::ERR) {
echo $buffer;
}
});
Expand Down
2 changes: 1 addition & 1 deletion Blacklight/processing/adult/Popporn.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function covers(): array
{
if ($ret = $this->_html->find('div[id=box-art], a[rel=box-art]', 1)) {
$this->_res['boxcover'] = trim($ret->href);
if (false !== stripos(trim($ret->href), '_aa')) {
if (stripos(trim($ret->href), '_aa') !== false) {
$this->_res['backcover'] = str_ireplace('_aa', '_bb', trim($ret->href));
} else {
$this->_res['backcover'] = str_ireplace('.jpg', '_b.jpg', trim($ret->href));
Expand Down
1 change: 1 addition & 0 deletions Blacklight/utility/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public static function streamSslContextOptions(bool $forceIgnore = false): array
$options['capath'] = config('nntmux_ssl.ssl_capath');
}
}

// If we set the transport to tls and the server falls back to ssl,
// the context options would be for tls and would not apply to ssl,
// so set both tls and ssl context in case the server does not support tls.
Expand Down
2 changes: 0 additions & 2 deletions app/Extensions/helper/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ function is_it_json($isIt)
}

/**
* @return \STS\ZipStream\ZipStream
*
* @throws \Exception
*/
function getStreamingZip(array $guids = []): STS\ZipStream\ZipStream
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/RedirectIfAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RedirectIfAuthenticated
/**
* Handle an incoming request.
*/
public function handle(Request $request, Closure $next, ?string $guard = null): Response
public function handle(Request $request, Closure $next, string $guard = null): Response
{
if (Auth::guard($guard)->check()) {
return redirect()->to('/');
Expand Down
6 changes: 3 additions & 3 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
*/
class User extends Authenticatable
{
use Notifiable, UserVerification, HasRoles, InviteTrait;
use HasRoles, InviteTrait, Notifiable, UserVerification;

public const ERR_SIGNUP_BADUNAME = -1;

Expand Down Expand Up @@ -246,7 +246,7 @@ public static function deleteUser($id): void
self::find($id)->delete();
}

public static function getCount(string|null $role = null, string|null $username = '', string|null $host = '', string|null $email = ''): int
public static function getCount(string $role = null, ?string $username = '', ?string $host = '', ?string $email = ''): int
{
$res = self::query()->where('email', '<>', '[email protected]');

Expand Down Expand Up @@ -580,7 +580,7 @@ public static function checkAndUseInvite(string $inviteCode): int
/**
* @return false|int|mixed
*/
public static function add(string $userName, string $password, string $email, int $role, string|null $notes = '', string $host = '', int $invites = Invitation::DEFAULT_INVITES, int $invitedBy = 0)
public static function add(string $userName, string $password, string $email, int $role, ?string $notes = '', string $host = '', int $invites = Invitation::DEFAULT_INVITES, int $invitedBy = 0)
{
$password = self::hashPassword($password);
if (! $password) {
Expand Down
1 change: 0 additions & 1 deletion misc/update/tmux/monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ function errorOnSQL()
}

/**
* @param \PDOStatement $ps
* @return bool|int|string
*/
function getTableRowCount(PDOStatement $ps, $table)
Expand Down

0 comments on commit aee186d

Please sign in to comment.