PHP Style Change (Laravel Pint CI)

This commit is contained in:
HDVinnie
2024-01-09 21:13:21 +00:00
committed by HDVinne
parent 1bae1d1805
commit de87f975a6
44 changed files with 93 additions and 93 deletions
+11 -11
View File
@@ -127,7 +127,7 @@ final class AnnounceController extends Controller
/**
* Check Client Is Valid.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkClient(Request $request): void
@@ -186,7 +186,7 @@ final class AnnounceController extends Controller
/**
* Check Passkey Exist and Valid.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkPasskey($passkey): void
@@ -210,7 +210,7 @@ final class AnnounceController extends Controller
/**
* Extract and validate Announce fields.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkAnnounceFields(Request $request): array
@@ -298,7 +298,7 @@ final class AnnounceController extends Controller
/**
* Get User Via Validated Passkey.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkUser(string $passkey, array $queries): object
@@ -325,7 +325,7 @@ final class AnnounceController extends Controller
/**
* Get Users Group.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkGroup($user): object
@@ -362,7 +362,7 @@ final class AnnounceController extends Controller
/**
* Check If Torrent Exist In Database.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkTorrent(string $infoHash): object
@@ -411,7 +411,7 @@ final class AnnounceController extends Controller
/**
* Check If Peer Exist In Database.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkPeer(object $torrent, array $queries, object $user): void
@@ -430,7 +430,7 @@ final class AnnounceController extends Controller
/**
* Check A Peers Min Annnounce Interval.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Exception
* @throws Throwable
*/
@@ -476,7 +476,7 @@ final class AnnounceController extends Controller
/**
* Check A Users Max Connections.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkMaxConnections(object $torrent, object $user): void
@@ -496,7 +496,7 @@ final class AnnounceController extends Controller
/**
* Check A Users Download Slots.
*
* @throws \App\Exceptions\TrackerException
* @throws TrackerException
* @throws Throwable
*/
private function checkDownloadSlots(array $queries, object $torrent, object $user, object $group): void
@@ -720,7 +720,7 @@ final class AnnounceController extends Controller
/**
* Process Peers Job.
*
* @see \App\Jobs\ProcessAnnounce
* @see ProcessAnnounce
*/
ProcessAnnounce::dispatch(
bin2hex($queries['peer_id']),
+14 -14
View File
@@ -26,13 +26,13 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
// Default Laravel
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
//\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\BlockIpAddress::class,
Middleware\BlockIpAddress::class,
];
/**
@@ -42,14 +42,14 @@ class Kernel extends HttpKernel
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\UpdateLastAction::class,
Middleware\VerifyCsrfToken::class,
Middleware\UpdateLastAction::class,
\HDVinnie\SecureHeaders\SecureHeadersMiddleware::class,
//'throttle:web',
],
@@ -72,18 +72,18 @@ class Kernel extends HttpKernel
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'admin' => \App\Http\Middleware\CheckForAdmin::class,
'auth' => \App\Http\Middleware\Authenticate::class,
'admin' => Middleware\CheckForAdmin::class,
'auth' => Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'banned' => \App\Http\Middleware\CheckIfBanned::class,
'banned' => Middleware\CheckIfBanned::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'csrf' => \App\Http\Middleware\VerifyCsrfToken::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'language' => \App\Http\Middleware\SetLanguage::class,
'modo' => \App\Http\Middleware\CheckForModo::class,
'owner' => \App\Http\Middleware\CheckForOwner::class,
'csrf' => Middleware\VerifyCsrfToken::class,
'guest' => Middleware\RedirectIfAuthenticated::class,
'language' => Middleware\SetLanguage::class,
'modo' => Middleware\CheckForModo::class,
'owner' => Middleware\CheckForOwner::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequestsWithRedis::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
+4 -4
View File
@@ -68,7 +68,7 @@ class BackupPanel extends Component
}
/**
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
final public function getBackupsProperty(): array
{
@@ -108,7 +108,7 @@ class BackupPanel extends Component
}
/**
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
final public function downloadBackup(string $filePath): Response|StreamedResponse|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory
{
@@ -156,7 +156,7 @@ class BackupPanel extends Component
}
/**
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
private function validateActiveDisk(): void
{
@@ -179,7 +179,7 @@ class BackupPanel extends Component
}
/**
* @throws \Illuminate\Validation\ValidationException
* @throws ValidationException
*/
private function validateFilePath(string $filePath): void
{
+2 -2
View File
@@ -20,8 +20,8 @@ use Livewire\WithPagination;
use SplFileInfo;
/**
* @property \Illuminate\Support\Collection $logFiles
* @property \Illuminate\Pagination\LengthAwarePaginator $entries
* @property \Illuminate\Support\Collection $logFiles
* @property LengthAwarePaginator $entries
*/
class LaravelLogViewer extends Component
{
+3 -3
View File
@@ -39,17 +39,17 @@ $app = new Illuminate\Foundation\Application(
$app->singleton(
'Illuminate\Contracts\Http\Kernel',
\App\Http\Kernel::class
App\Http\Kernel::class
);
$app->singleton(
'Illuminate\Contracts\Console\Kernel',
\App\Console\Kernel::class
App\Console\Kernel::class
);
$app->singleton(
'Illuminate\Contracts\Debug\ExceptionHandler',
\App\Exceptions\Handler::class
App\Exceptions\Handler::class
);
/*
+11 -11
View File
@@ -143,19 +143,19 @@ return [
*/
'notifications' => [
'notifications' => [
\Spatie\Backup\Notifications\Notifications\BackupHasFailedNotification::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFoundNotification::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\CleanupHasFailedNotification::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFoundNotification::class => ['mail'],
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessfulNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\BackupHasFailedNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFoundNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\CleanupHasFailedNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\HealthyBackupWasFoundNotification::class => ['mail'],
Spatie\Backup\Notifications\Notifications\CleanupWasSuccessfulNotification::class => ['mail'],
],
/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
'notifiable' => Spatie\Backup\Notifications\Notifiable::class,
'mail' => [
'to' => env('DEFAULT_OWNER_EMAIL'),
@@ -190,8 +190,8 @@ return [
'name' => 'UNIT3D',
'disks' => ['backups'],
'health_checks' => [
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
],
],
@@ -217,7 +217,7 @@ return [
* No matter how you configure it the default strategy will never
* delete the newest backup.
*/
'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
'strategy' => Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
'default_strategy' => [
/*
@@ -255,6 +255,6 @@ return [
'security' => [
'password' => env('APP_KEY'),
'encryption' => \App\Helpers\BackupEncryption::ENCRYPTION_DEFAULT,
'encryption' => App\Helpers\BackupEncryption::ENCRYPTION_DEFAULT,
],
];
@@ -22,37 +22,37 @@ return new class () extends Migration {
foreach ($comments as $comment) {
if ($comment->torrent_id !== null) {
$comment->commentable_id = $comment->torrent_id;
$comment->commentable_type = \App\Models\Torrent::class;
$comment->commentable_type = App\Models\Torrent::class;
$comment->save();
}
if ($comment->article_id !== null) {
$comment->commentable_id = $comment->article_id;
$comment->commentable_type = \App\Models\Article::class;
$comment->commentable_type = App\Models\Article::class;
$comment->save();
}
if ($comment->requests_id !== null) {
$comment->commentable_id = $comment->requests_id;
$comment->commentable_type = \App\Models\TorrentRequest::class;
$comment->commentable_type = App\Models\TorrentRequest::class;
$comment->save();
}
if ($comment->collection_id !== null) {
$comment->commentable_id = $comment->collection_id;
$comment->commentable_type = \App\Models\Collection::class;
$comment->commentable_type = App\Models\Collection::class;
$comment->save();
}
if ($comment->playlist_id !== null) {
$comment->commentable_id = $comment->playlist_id;
$comment->commentable_type = \App\Models\Playlist::class;
$comment->commentable_type = App\Models\Playlist::class;
$comment->save();
}
if ($comment->ticket_id !== null) {
$comment->commentable_id = $comment->ticket_id;
$comment->commentable_type = \App\Models\Ticket::class;
$comment->commentable_type = App\Models\Ticket::class;
$comment->save();
}
}
@@ -17,7 +17,7 @@ test('destroy returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
$response = $this->actingAs($authUser)->delete(route('users.notifications.destroy', [$user, $notification]));
@@ -32,7 +32,7 @@ test('destroy aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -129,7 +129,7 @@ test('show returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
$response = $this->actingAs($authUser)->get(route('users.notifications.show', [$user, $notification]));
@@ -143,7 +143,7 @@ test('show aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -157,7 +157,7 @@ test('update returns an ok response', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
$response = $this->actingAs($authUser)->patch(route('users.notifications.update', [$user, $notification]), [
@@ -173,7 +173,7 @@ test('update aborts with a 403', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
$user = User::factory()->create();
$notification = \App\Models\Notification::factory()->create();
$notification = App\Models\Notification::factory()->create();
$authUser = User::factory()->create();
// TODO: perform additional setup to trigger `abort_unless(403)`...
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoBanDisposableUsers
* @see App\Console\Commands\AutoBanDisposableUsers
*/
use Database\Seeders\GroupsTableSeeder;
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoBonAllocation
* @see App\Console\Commands\AutoBonAllocation
*/
it('runs successfully', function (): void {
$this->artisan('auto:bon_allocation')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoCorrectHistory
* @see App\Console\Commands\AutoCorrectHistory
*/
it('runs successfully', function (): void {
$this->artisan('auto:correct_history')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoDeactivateWarning
* @see App\Console\Commands\AutoDeactivateWarning
*/
it('runs successfully', function (): void {
$this->artisan('auto:deactivate_warning')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoDisableInactiveUsers
* @see App\Console\Commands\AutoDisableInactiveUsers
*/
it('runs successfully', function (): void {
$this->artisan('auto:disable_inactive_users')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoFlushPeers
* @see App\Console\Commands\AutoFlushPeers
*/
it('runs successfully', function (): void {
$this->artisan('auto:flush_peers')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoGroup
* @see App\Console\Commands\AutoGroup
*/
it('runs successfully', function (): void {
$this->artisan('auto:group')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoHighspeedTag
* @see App\Console\Commands\AutoHighspeedTag
*/
it('runs successfully', function (): void {
$this->artisan('auto:highspeed_tag')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoNerdStat
* @see App\Console\Commands\AutoNerdStat
*/
use Database\Seeders\BotsTableSeeder;
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoPreWarning
* @see App\Console\Commands\AutoPreWarning
*/
it('runs successfully', function (): void {
$this->artisan('auto:prewarning')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRecycleAudits
* @see App\Console\Commands\AutoRecycleAudits
*/
it('runs successfully', function (): void {
$this->artisan('auto:recycle_activity_log')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRecycleClaimedTorrentRequests
* @see App\Console\Commands\AutoRecycleClaimedTorrentRequests
*/
it('runs successfully', function (): void {
$this->artisan('auto:recycle_claimed_torrent_requests')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRecycleFailedLogins
* @see App\Console\Commands\AutoRecycleFailedLogins
*/
it('runs successfully', function (): void {
$this->artisan('auto:recycle_failed_logins')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRecycleInvites
* @see App\Console\Commands\AutoRecycleInvites
*/
it('runs successfully', function (): void {
$this->artisan('auto:recycle_invites')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRefundDownload
* @see App\Console\Commands\AutoRefundDownload
*/
it('runs successfully', function (): void {
$this->artisan('auto:refund_download')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRemoveFeaturedTorrent
* @see App\Console\Commands\AutoRemoveFeaturedTorrent
*/
it('runs successfully', function (): void {
$this->artisan('auto:remove_featured_torrent')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRemovePersonalFreeleech
* @see App\Console\Commands\AutoRemovePersonalFreeleech
*/
it('runs successfully', function (): void {
$this->artisan('auto:remove_personal_freeleech')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRemoveTimedTorrentBuffs
* @see App\Console\Commands\AutoRemoveTimedTorrentBuffs
*/
it('runs successfully', function (): void {
$this->artisan('auto:remove_torrent_buffs')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoResetUserFlushes
* @see App\Console\Commands\AutoResetUserFlushes
*/
it('runs successfully', function (): void {
$this->artisan('auto:reset_user_flushes')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoRewardResurrection
* @see App\Console\Commands\AutoRewardResurrection
*/
it('runs successfully', function (): void {
$this->artisan('auto:reward_resurrection')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoSoftDeleteDisabledUsers
* @see App\Console\Commands\AutoSoftDeleteDisabledUsers
*/
it('runs successfully', function (): void {
$this->artisan('auto:softdelete_disabled_users')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoStatsClients
* @see App\Console\Commands\AutoStatsClients
*/
it('runs successfully', function (): void {
$this->artisan('auto:stats_clients')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoTorrentBalance
* @see App\Console\Commands\AutoTorrentBalance
*/
it('runs successfully', function (): void {
$this->artisan('auto:torrent_balance')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\AutoWarning
* @see App\Console\Commands\AutoWarning
*/
it('runs successfully', function (): void {
$this->artisan('auto:warning')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\CheckForStaleTickets
* @see App\Console\Commands\CheckForStaleTickets
*/
it('runs successfully', function (): void {
$this->artisan('tickets:stale')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\ClearCache
* @see App\Console\Commands\ClearCache
*/
it('runs successfully', function (): void {
$this->artisan('clear:all_cache')
+1 -1
View File
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\DbDump
* @see App\Console\Commands\DbDump
*/
it('runs successfully', function (): void {
$this->artisan('db:dump')
+1 -1
View File
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\DbLoad
* @see App\Console\Commands\DbLoad
*/
it('runs successfully', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\EmailBlacklistUpdate
* @see App\Console\Commands\EmailBlacklistUpdate
*/
it('runs successfully', function (): void {
$this->artisan('auto:email-blacklist-update')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\FetchReleaseYears
* @see App\Console\Commands\FetchReleaseYears
*/
it('runs successfully', function (): void {
$this->artisan('fetch:release_years')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\GitUpdater
* @see App\Console\Commands\GitUpdater
*/
it('runs successfully', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
+1 -1
View File
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\SetCache
* @see App\Console\Commands\SetCache
*/
it('runs successfully', function (): void {
$this->artisan('set:all_cache')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\SyncPeers
* @see App\Console\Commands\SyncPeers
*/
it('runs successfully', function (): void {
$this->artisan('auto:sync_peers')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\SyncTorrentSeasonEpisode
* @see App\Console\Commands\SyncTorrentSeasonEpisode
*/
it('runs successfully', function (): void {
$this->artisan('auto:sync_torrent_season_episode')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\TestMailSettings
* @see App\Console\Commands\TestMailSettings
*/
it('runs successfully', function (): void {
$this->artisan('test:email')
@@ -12,7 +12,7 @@
*/
/**
* @see \App\Console\Commands\VendorCleanup
* @see App\Console\Commands\VendorCleanup
*/
it('runs successfully', function (): void {
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');