From 97394c062f51528117af08e362227b1fb80c79f9 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Fri, 7 Jan 2022 23:35:33 -0500 Subject: [PATCH 01/18] chore: adopt type hints --- app/Achievements/UserMadeTenComments.php | 4 +- app/Bots/CasinoBot.php | 32 +- app/Bots/IRCAnnounceBot.php | 12 +- app/Bots/NerdBot.php | 80 ++--- app/Bots/SystemBot.php | 23 +- app/Console/Commands/AutoBan.php | 2 +- .../Commands/AutoBanDisposableUsers.php | 2 +- app/Console/Commands/AutoBonAllocation.php | 2 +- app/Console/Commands/AutoCorrectHistory.php | 2 +- .../Commands/AutoDeactivateWarning.php | 2 +- .../Commands/AutoDisableInactiveUsers.php | 2 +- app/Console/Commands/AutoFlushPeers.php | 2 +- app/Console/Commands/AutoGraveyard.php | 2 +- app/Console/Commands/AutoGroup.php | 2 +- app/Console/Commands/AutoHighspeedTag.php | 2 +- app/Console/Commands/AutoNerdStat.php | 2 +- app/Console/Commands/AutoPreWarning.php | 2 +- app/Console/Commands/AutoRecycleAudits.php | 2 +- .../AutoRecycleClaimedTorrentRequests.php | 2 +- .../Commands/AutoRecycleFailedLogins.php | 2 +- app/Console/Commands/AutoRecycleInvites.php | 2 +- .../Commands/AutoRemoveFeaturedTorrent.php | 2 +- .../Commands/AutoRemovePersonalFreeleech.php | 2 +- app/Console/Commands/AutoResetUserFlushes.php | 2 +- .../Commands/AutoRevokePermissions.php | 2 +- .../Commands/AutoSoftDeleteDisabledUsers.php | 2 +- app/Console/Commands/AutoStatsClients.php | 2 +- app/Console/Commands/AutoWarning.php | 2 +- app/Console/Commands/CheckForStaleTickets.php | 2 +- app/Console/Commands/ClearCache.php | 2 +- app/Console/Commands/DbDump.php | 2 +- app/Console/Commands/DbLoad.php | 2 +- app/Console/Commands/DemoSeed.php | 6 +- app/Console/Commands/EmailBlacklistUpdate.php | 2 +- app/Console/Commands/FetchMeta.php | 2 +- app/Console/Commands/FetchReleaseYears.php | 2 +- app/Console/Commands/GitUpdater.php | 47 ++- app/Console/Commands/IrcMessage.php | 6 +- app/Console/Commands/SetCache.php | 2 +- app/Console/Commands/SyncPeers.php | 2 +- app/Console/Commands/TestMailSettings.php | 2 +- app/Console/Commands/VendorCleanup.php | 21 +- app/Console/Kernel.php | 8 +- app/Events/Chatter.php | 4 +- app/Events/CommentCreated.php | 2 +- app/Events/MessageDeleted.php | 6 +- app/Events/MessageEdited.php | 6 +- app/Events/MessageSent.php | 6 +- app/Events/Ping.php | 8 +- app/Events/TicketAssigned.php | 2 +- app/Events/TicketClosed.php | 2 +- app/Events/TicketCreated.php | 2 +- app/Events/TicketWentStale.php | 2 +- app/Exceptions/Handler.php | 4 +- app/Helpers/BBCodeConverter.php | 40 +-- app/Helpers/BackupPassword.php | 4 +- app/Helpers/Bbcode.php | 29 +- app/Helpers/Bencode.php | 6 +- app/Helpers/EmailBlacklistUpdater.php | 2 +- app/Helpers/HiddenCaptcha.php | 13 +- app/Helpers/Language.php | 4 +- app/Helpers/LanguageCensor.php | 4 +- app/Helpers/Linkify.php | 2 +- app/Helpers/MediaInfo.php | 18 +- app/Helpers/Nfo.php | 4 +- app/Helpers/StringHelper.php | 14 +- app/Helpers/SystemInformation.php | 12 +- app/Helpers/TorrentHelper.php | 2 +- app/Helpers/TorrentTools.php | 24 +- app/Http/Controllers/API/BaseController.php | 4 +- app/Http/Controllers/API/ChatController.php | 42 +-- .../Controllers/API/TorrentController.php | 20 +- .../Controllers/AchievementsController.php | 4 +- app/Http/Controllers/AlbumController.php | 10 +- app/Http/Controllers/AnnounceController.php | 9 +- app/Http/Controllers/ArticleController.php | 4 +- .../Auth/ForgotPasswordController.php | 2 +- app/Http/Controllers/Auth/LoginController.php | 10 +- .../Auth/ResetPasswordController.php | 4 +- .../Controllers/Auth/TwoStepController.php | 18 +- app/Http/Controllers/BonusController.php | 59 +--- app/Http/Controllers/CommentController.php | 22 +- app/Http/Controllers/ContactController.php | 4 +- app/Http/Controllers/FollowController.php | 6 +- .../Controllers/ForumCategoryController.php | 4 +- app/Http/Controllers/ForumController.php | 4 +- app/Http/Controllers/GraveyardController.php | 7 +- app/Http/Controllers/ImageController.php | 12 +- app/Http/Controllers/InviteController.php | 7 +- .../MediaHub/CollectionController.php | 4 +- app/Http/Controllers/MissingController.php | 2 +- .../Controllers/NotificationController.php | 23 +- app/Http/Controllers/PageController.php | 4 +- app/Http/Controllers/PlaylistController.php | 4 +- .../Controllers/PlaylistTorrentController.php | 4 +- app/Http/Controllers/PollController.php | 8 +- app/Http/Controllers/PostController.php | 16 +- .../Controllers/PrivateMessageController.php | 24 +- app/Http/Controllers/ReportController.php | 9 +- app/Http/Controllers/RequestController.php | 44 +-- app/Http/Controllers/RssController.php | 19 +- app/Http/Controllers/SeedboxController.php | 8 +- .../Staff/ApplicationController.php | 11 +- .../Controllers/Staff/ArticleController.php | 11 +- .../Controllers/Staff/AuditController.php | 4 +- app/Http/Controllers/Staff/BanController.php | 7 +- .../Controllers/Staff/CategoryController.php | 11 +- .../Controllers/Staff/ChatBotController.php | 23 +- .../Controllers/Staff/ChatRoomController.php | 7 +- .../Staff/ChatStatusController.php | 7 +- .../Controllers/Staff/FlushController.php | 8 +- .../Controllers/Staff/ForumController.php | 16 +- .../Controllers/Staff/GroupController.php | 7 +- .../Controllers/Staff/InternalController.php | 8 +- .../Staff/MassActionController.php | 4 +- .../Staff/MediaLanguageController.php | 11 +- .../Staff/ModerationController.php | 3 +- app/Http/Controllers/Staff/NoteController.php | 7 +- app/Http/Controllers/Staff/PageController.php | 11 +- app/Http/Controllers/Staff/PollController.php | 20 +- .../Controllers/Staff/ReportController.php | 8 +- .../Staff/ResolutionController.php | 4 +- app/Http/Controllers/Staff/RssController.php | 16 +- .../Controllers/Staff/SeedboxController.php | 4 +- app/Http/Controllers/Staff/TypeController.php | 11 +- app/Http/Controllers/Staff/UserController.php | 22 +- .../Controllers/Staff/VersionController.php | 4 +- app/Http/Controllers/StatsController.php | 9 +- app/Http/Controllers/SubtitleController.php | 15 +- .../TicketAttachmentController.php | 2 +- app/Http/Controllers/TicketController.php | 8 +- app/Http/Controllers/TopicController.php | 41 +-- app/Http/Controllers/TopicLabelController.php | 28 +- app/Http/Controllers/TorrentController.php | 48 +-- app/Http/Controllers/UserController.php | 202 +++-------- app/Http/Controllers/WarningController.php | 24 +- app/Http/Controllers/WishController.php | 8 +- app/Http/Livewire/AttachmentUpload.php | 4 +- app/Http/Livewire/BackupPanel.php | 4 +- app/Http/Livewire/BookmarkButton.php | 2 +- app/Http/Livewire/DislikeButton.php | 2 +- app/Http/Livewire/GraveyardSearch.php | 24 +- app/Http/Livewire/LikeButton.php | 2 +- app/Http/Livewire/MissingMediaSearch.php | 12 +- app/Http/Livewire/QuickSearchDropdown.php | 8 +- app/Http/Livewire/SimilarTorrent.php | 10 +- app/Http/Livewire/SmallBookmarkButton.php | 2 +- app/Http/Livewire/SubtitleSearch.php | 12 +- app/Http/Livewire/ThankButton.php | 2 +- app/Http/Livewire/TicketSearch.php | 12 +- app/Http/Livewire/TorrentCardSearch.php | 48 +-- app/Http/Livewire/TorrentListSearch.php | 48 +-- app/Http/Livewire/TorrentRequestSearch.php | 32 +- app/Http/Livewire/UserSearch.php | 8 +- app/Http/Livewire/WatchlistSearch.php | 10 +- app/Http/Middleware/CheckForAdmin.php | 3 +- app/Http/Middleware/CheckForModo.php | 3 +- app/Http/Middleware/CheckForOwner.php | 3 +- app/Http/Middleware/CheckIfBanned.php | 4 +- app/Http/Middleware/Http2ServerPush.php | 30 +- app/Http/Middleware/SetLanguage.php | 13 +- app/Http/Middleware/TrustHosts.php | 4 +- app/Http/Middleware/UpdateLastAction.php | 3 +- app/Http/Requests/StorePoll.php | 12 +- app/Http/Requests/VoteOnPoll.php | 12 +- app/Http/Resources/BotResource.php | 4 +- app/Http/Resources/ChatMessageResource.php | 4 +- app/Http/Resources/ChatRoomResource.php | 4 +- app/Http/Resources/ChatUserResource.php | 4 +- app/Http/Resources/TorrentResource.php | 8 +- app/Http/Resources/TorrentsResource.php | 12 +- app/Http/Resources/UserAudibleResource.php | 4 +- app/Http/Resources/UserEchoResource.php | 4 +- app/Http/Resources/UserResource.php | 4 +- app/Jobs/ProcessBackup.php | 4 +- app/Jobs/ProcessBasicAnnounceRequest.php | 4 +- app/Jobs/ProcessCollectionJob.php | 4 +- app/Jobs/ProcessCompanyJob.php | 4 +- app/Jobs/ProcessCompletedAnnounceRequest.php | 4 +- app/Jobs/ProcessMassPM.php | 4 +- app/Jobs/ProcessMovieJob.php | 2 +- app/Jobs/ProcessStartedAnnounceRequest.php | 8 +- app/Jobs/ProcessStoppedAnnounceRequest.php | 4 +- app/Jobs/ProcessTvJob.php | 2 +- app/Jobs/SendActivationMail.php | 8 +- app/Jobs/SendDeleteUserMail.php | 8 +- app/Jobs/SendDisableUserMail.php | 8 +- app/Listeners/AchievementUnlocked.php | 4 +- app/Listeners/FailedLoginListener.php | 4 +- app/Listeners/LoginListener.php | 4 +- .../NotifyStaffCommentWasCreated.php | 4 +- .../NotifyStaffTicketWasAssigned.php | 4 +- app/Listeners/NotifyStaffTicketWasClosed.php | 4 +- app/Listeners/NotifyStaffTicketWasCreated.php | 4 +- app/Listeners/NotifyUserCommentWasCreated.php | 4 +- app/Listeners/NotifyUserTicketIsStale.php | 4 +- app/Listeners/NotifyUserTicketWasAssigned.php | 4 +- app/Listeners/NotifyUserTicketWasClosed.php | 4 +- app/Listeners/NotifyUserTicketWasCreated.php | 4 +- app/Mail/ActivateUser.php | 2 +- app/Mail/BanUser.php | 4 +- app/Mail/Contact.php | 4 +- app/Mail/DeleteUser.php | 4 +- app/Mail/DenyApplication.php | 4 +- app/Mail/DisableUser.php | 4 +- app/Mail/InviteUser.php | 4 +- app/Mail/TestEmail.php | 4 +- app/Mail/UnbanUser.php | 4 +- app/Models/Album.php | 8 +- app/Models/Application.php | 16 +- app/Models/ApplicationImageProof.php | 4 +- app/Models/ApplicationUrlProof.php | 4 +- app/Models/Article.php | 19 +- app/Models/Audit.php | 4 +- app/Models/Ban.php | 8 +- app/Models/BonExchange.php | 20 +- app/Models/BonTransactions.php | 16 +- app/Models/Bookmark.php | 8 +- app/Models/BotTransaction.php | 16 +- app/Models/Cast.php | 20 +- app/Models/Category.php | 8 +- app/Models/ChatStatus.php | 4 +- app/Models/Chatroom.php | 8 +- app/Models/Collection.php | 9 +- app/Models/Comment.php | 32 +- app/Models/Company.php | 10 +- app/Models/Crew.php | 20 +- app/Models/Distributor.php | 8 +- app/Models/Episode.php | 29 +- app/Models/FeaturedTorrent.php | 8 +- app/Models/Follow.php | 8 +- app/Models/Forum.php | 52 +-- app/Models/Genre.php | 10 +- app/Models/Graveyard.php | 8 +- app/Models/Group.php | 12 +- app/Models/GuestStar.php | 5 +- app/Models/History.php | 12 +- app/Models/Image.php | 2 +- app/Models/Internal.php | 4 +- app/Models/Invite.php | 8 +- app/Models/Keyword.php | 4 +- app/Models/Language.php | 44 +-- app/Models/Like.php | 8 +- app/Models/Message.php | 22 +- app/Models/Movie.php | 40 +-- app/Models/Network.php | 10 +- app/Models/Note.php | 8 +- app/Models/Option.php | 4 +- app/Models/Page.php | 6 +- app/Models/Peer.php | 16 +- app/Models/Permission.php | 8 +- app/Models/Person.php | 20 +- app/Models/Playlist.php | 12 +- app/Models/PlaylistTorrent.php | 8 +- app/Models/Poll.php | 26 +- app/Models/Post.php | 39 +-- app/Models/PrivateMessage.php | 14 +- app/Models/Region.php | 8 +- app/Models/Report.php | 20 +- app/Models/Resolution.php | 8 +- app/Models/Rss.php | 16 +- app/Models/Season.php | 29 +- app/Models/Seedbox.php | 8 +- app/Models/Subscription.php | 12 +- app/Models/Subtitle.php | 19 +- app/Models/Thank.php | 8 +- app/Models/Ticket.php | 26 +- app/Models/TicketAttachment.php | 10 +- app/Models/Topic.php | 32 +- app/Models/Torrent.php | 121 ++----- app/Models/TorrentFile.php | 11 +- app/Models/TorrentRequest.php | 46 +-- app/Models/TorrentRequestBounty.php | 8 +- app/Models/Tv.php | 49 +-- app/Models/TwoStepAuth.php | 4 +- app/Models/Type.php | 8 +- app/Models/User.php | 316 +++++------------- app/Models/UserActivation.php | 4 +- app/Models/UserAudible.php | 16 +- app/Models/UserEcho.php | 16 +- app/Models/UserNotification.php | 16 +- app/Models/UserPrivacy.php | 16 +- app/Models/Voter.php | 8 +- app/Models/Warning.php | 16 +- app/Models/Watchlist.php | 8 +- app/Models/Wish.php | 4 +- app/Notifications/FailedLogin.php | 12 +- app/Notifications/NewBon.php | 8 +- app/Notifications/NewComment.php | 8 +- app/Notifications/NewCommentTag.php | 8 +- app/Notifications/NewFollow.php | 8 +- app/Notifications/NewPost.php | 8 +- app/Notifications/NewPostTag.php | 8 +- app/Notifications/NewPostTip.php | 8 +- app/Notifications/NewRequestBounty.php | 8 +- app/Notifications/NewRequestClaim.php | 8 +- app/Notifications/NewRequestFill.php | 8 +- app/Notifications/NewRequestFillApprove.php | 8 +- app/Notifications/NewRequestFillReject.php | 8 +- app/Notifications/NewRequestUnclaim.php | 8 +- app/Notifications/NewReseedRequest.php | 8 +- app/Notifications/NewThank.php | 8 +- app/Notifications/NewTopic.php | 8 +- app/Notifications/NewUnfollow.php | 8 +- app/Notifications/NewUpload.php | 8 +- app/Notifications/NewUploadTip.php | 8 +- app/Notifications/StaffCommentCreated.php | 12 +- app/Notifications/StaffTicketAssigned.php | 12 +- app/Notifications/StaffTicketClosed.php | 12 +- app/Notifications/StaffTicketCreated.php | 12 +- app/Notifications/TwoStepAuthCode.php | 8 +- app/Notifications/UserCommentCreated.php | 12 +- app/Notifications/UserTicketAssigned.php | 12 +- app/Notifications/UserTicketClosed.php | 12 +- app/Notifications/UserTicketCreated.php | 12 +- app/Notifications/UserTicketStale.php | 12 +- app/Notifications/UsernameReminder.php | 8 +- app/Observers/TorrentObserver.php | 20 +- app/Observers/UserObserver.php | 20 +- app/Providers/AppServiceProvider.php | 8 +- app/Providers/AuthServiceProvider.php | 4 +- app/Providers/BroadcastServiceProvider.php | 4 +- .../EmailBlacklistServiceProvider.php | 8 +- app/Providers/EventServiceProvider.php | 4 +- app/Providers/RouteServiceProvider.php | 8 +- app/Repositories/ChatRepository.php | 20 +- app/Repositories/TaggedUserRepository.php | 27 +- app/Repositories/WishRepository.php | 13 +- app/Rules/BackupDisk.php | 4 +- app/Rules/PathToZip.php | 4 +- app/Services/Tmdb/Client/Collection.php | 9 +- app/Services/Tmdb/Client/Company.php | 14 +- app/Services/Tmdb/Client/Episode.php | 9 +- app/Services/Tmdb/Client/FindMovie.php | 5 +- app/Services/Tmdb/Client/FindTv.php | 5 +- app/Services/Tmdb/Client/Genre.php | 7 +- app/Services/Tmdb/Client/Movie.php | 13 +- app/Services/Tmdb/Client/Network.php | 7 +- app/Services/Tmdb/Client/Person.php | 7 +- app/Services/Tmdb/Client/Season.php | 9 +- app/Services/Tmdb/Client/TV.php | 15 +- app/Services/Tmdb/TMDB.php | 8 +- app/Services/Tmdb/TMDBScraper.php | 8 +- app/Traits/Auditable.php | 4 +- app/Traits/TwoStep.php | 10 +- app/Validators/EmailBlacklistValidator.php | 21 +- database/factories/AlbumFactory.php | 4 +- database/factories/ApplicationFactory.php | 4 +- .../ApplicationImageProofFactory.php | 4 +- .../factories/ApplicationUrlProofFactory.php | 4 +- database/factories/ArticleFactory.php | 4 +- database/factories/AuditFactory.php | 4 +- database/factories/BanFactory.php | 4 +- database/factories/BonExchangeFactory.php | 4 +- database/factories/BonTransactionsFactory.php | 4 +- database/factories/BookmarkFactory.php | 4 +- database/factories/BotFactory.php | 4 +- database/factories/BotTransactionFactory.php | 4 +- database/factories/CategoryFactory.php | 4 +- database/factories/ChatStatusFactory.php | 4 +- database/factories/ChatroomFactory.php | 4 +- database/factories/CommentFactory.php | 4 +- .../factories/FailedLoginAttemptFactory.php | 4 +- database/factories/FeaturedTorrentFactory.php | 4 +- database/factories/FollowFactory.php | 4 +- database/factories/ForumFactory.php | 4 +- database/factories/FreeleechTokenFactory.php | 4 +- database/factories/GitUpdateFactory.php | 4 +- database/factories/GraveyardFactory.php | 4 +- database/factories/GroupFactory.php | 4 +- database/factories/HistoryFactory.php | 4 +- database/factories/ImageFactory.php | 4 +- database/factories/InviteFactory.php | 4 +- database/factories/LikeFactory.php | 4 +- database/factories/MessageFactory.php | 4 +- database/factories/NoteFactory.php | 4 +- database/factories/NotificationFactory.php | 4 +- database/factories/OptionFactory.php | 4 +- database/factories/PageFactory.php | 4 +- database/factories/PeerFactory.php | 4 +- database/factories/PermissionFactory.php | 4 +- .../factories/PersonalFreeleechFactory.php | 4 +- database/factories/PlaylistFactory.php | 4 +- database/factories/PlaylistTorrentFactory.php | 4 +- database/factories/PollFactory.php | 4 +- database/factories/PostFactory.php | 4 +- database/factories/PrivateMessageFactory.php | 4 +- database/factories/ReportFactory.php | 4 +- database/factories/ResolutionFactory.php | 4 +- database/factories/RssFactory.php | 4 +- database/factories/SeedboxFactory.php | 4 +- database/factories/SubscriptionFactory.php | 4 +- database/factories/ThankFactory.php | 4 +- database/factories/TopicFactory.php | 4 +- database/factories/TorrentFactory.php | 4 +- database/factories/TorrentFileFactory.php | 4 +- .../factories/TorrentRequestBountyFactory.php | 4 +- .../factories/TorrentRequestClaimFactory.php | 4 +- database/factories/TorrentRequestFactory.php | 4 +- database/factories/TwoStepAuthFactory.php | 4 +- database/factories/TypeFactory.php | 4 +- database/factories/UserActivationFactory.php | 4 +- database/factories/UserAudibleFactory.php | 4 +- database/factories/UserEchoFactory.php | 4 +- database/factories/UserFactory.php | 4 +- .../factories/UserNotificationFactory.php | 4 +- database/factories/UserPrivacyFactory.php | 4 +- database/factories/VoterFactory.php | 4 +- database/factories/WarningFactory.php | 4 +- database/factories/WishFactory.php | 4 +- ...017_12_10_020753_create_articles_table.php | 4 +- .../2017_12_10_020753_create_ban_table.php | 4 +- ...12_10_020753_create_bon_exchange_table.php | 4 +- ...0_020753_create_bon_transactions_table.php | 4 +- ...17_12_10_020753_create_bookmarks_table.php | 4 +- ...7_12_10_020753_create_categories_table.php | 4 +- ...2017_12_10_020753_create_clients_table.php | 4 +- ...017_12_10_020753_create_comments_table.php | 4 +- ...753_create_failed_login_attempts_table.php | 4 +- ..._020753_create_featured_torrents_table.php | 4 +- .../2017_12_10_020753_create_files_table.php | 4 +- ...2017_12_10_020753_create_follows_table.php | 4 +- .../2017_12_10_020753_create_forums_table.php | 4 +- ...17_12_10_020753_create_graveyard_table.php | 4 +- .../2017_12_10_020753_create_groups_table.php | 4 +- ...2017_12_10_020753_create_history_table.php | 4 +- ...2017_12_10_020753_create_invites_table.php | 4 +- .../2017_12_10_020753_create_jobs_table.php | 4 +- .../2017_12_10_020753_create_likes_table.php | 4 +- ..._10_020753_create_log_activities_table.php | 4 +- ...2_10_020753_create_notifications_table.php | 4 +- ...2017_12_10_020753_create_options_table.php | 4 +- .../2017_12_10_020753_create_pages_table.php | 4 +- ...10_020753_create_password_resets_table.php | 4 +- .../2017_12_10_020753_create_peers_table.php | 4 +- ..._12_10_020753_create_permissions_table.php | 4 +- ...020753_create_personal_freeleech_table.php | 4 +- .../2017_12_10_020753_create_polls_table.php | 4 +- .../2017_12_10_020753_create_posts_table.php | 4 +- ...0_020753_create_private_messages_table.php | 4 +- ...2017_12_10_020753_create_reports_table.php | 4 +- ..._10_020753_create_request_bounty_table.php | 4 +- ..._10_020753_create_request_claims_table.php | 4 +- ...017_12_10_020753_create_requests_table.php | 4 +- .../2017_12_10_020753_create_rss_table.php | 4 +- ...017_12_10_020753_create_sessions_table.php | 4 +- ...017_12_10_020753_create_shoutbox_table.php | 4 +- ..._12_10_020753_create_tag_torrent_table.php | 4 +- .../2017_12_10_020753_create_tags_table.php | 4 +- .../2017_12_10_020753_create_thanks_table.php | 4 +- .../2017_12_10_020753_create_topics_table.php | 4 +- ...017_12_10_020753_create_torrents_table.php | 4 +- .../2017_12_10_020753_create_types_table.php | 4 +- ...0_020753_create_user_activations_table.php | 4 +- ...7_12_10_020753_create_user_notes_table.php | 4 +- .../2017_12_10_020753_create_users_table.php | 4 +- .../2017_12_10_020753_create_voters_table.php | 4 +- ...017_12_10_020753_create_warnings_table.php | 4 +- ...754_add_foreign_keys_to_articles_table.php | 4 +- ...0_020754_add_foreign_keys_to_ban_table.php | 4 +- ...0754_add_foreign_keys_to_clients_table.php | 4 +- ...754_add_foreign_keys_to_comments_table.php | 4 +- ...0754_add_foreign_keys_to_history_table.php | 4 +- ...020754_add_foreign_keys_to_peers_table.php | 4 +- ...0754_add_foreign_keys_to_reports_table.php | 4 +- ...0_020754_add_foreign_keys_to_rss_table.php | 4 +- ...754_add_foreign_keys_to_torrents_table.php | 4 +- ...20754_add_foreign_keys_to_voters_table.php | 4 +- ...754_add_foreign_keys_to_warnings_table.php | 4 +- ...1_123452_add_custom_css_to_users_table.php | 4 +- .../2017_12_27_000000_add_locale_column.php | 4 +- ...095412_add_implemented_to_topics_table.php | 4 +- ...1_25_000000_add_twostep_to_users_table.php | 4 +- ...2024_add_last_reply_at_to_topics_table.php | 4 +- ...000000_add_is_internal_to_groups_table.php | 4 +- ...00000_add_position_to_categories_table.php | 4 +- ...03_21_000000_add_censor_to_users_table.php | 4 +- ..._000000_add_chat_hidden_to_users_table.php | 4 +- ..._04_19_221542_create_failed_jobs_table.php | 4 +- .../2018_04_21_181026_create_wishes_table.php | 4 +- .../2018_04_22_195516_alter_reports_table.php | 4 +- ...2018_04_28_021651_alter_shoutbox_table.php | 4 +- ...18_04_28_022305_create_chatrooms_table.php | 4 +- ..._022344_add_chatroom_id_to_users_table.php | 4 +- ...5_04_101711_create_chat_statuses_table.php | 4 +- ...2055_add_chat_status_id_to_users_table.php | 4 +- ..._183534_add_can_upload_to_groups_table.php | 4 +- ...d_receiver_id_column_to_messages_table.php | 4 +- .../2018_05_18_144651_rename_ban_table.php | 4 +- ...2459_add_torrent_layout_to_users_table.php | 4 +- .../2018_05_21_192858_alter_peers_table.php | 4 +- ...22_224911_alter_private_messages_table.php | 4 +- .../2018_05_31_120936_create_albums_table.php | 2 +- .../2018_05_31_120955_create_images_table.php | 2 +- ...10000_create_topic_subscriptions_table.php | 4 +- ...12_114125_add_soft_deletes_to_warnings.php | 4 +- ..._08_19_212319_create_git_updates_table.php | 4 +- ..._153849_add_soft_deletes_to_user_table.php | 4 +- ..._205852_add_internal_to_torrents_table.php | 4 +- ...9_29_163937_add_anon_to_requests_table.php | 4 +- ...64525_add_anon_to_request_bounty_table.php | 4 +- ..._09_010002_add_immune_to_history_table.php | 4 +- ...12_03_024251_create_applications_table.php | 4 +- ..._create_application_image_proofs_table.php | 4 +- ...12_create_application_url_proofs_table.php | 4 +- ..._12_06_012908_update_tag_torrent_table.php | 4 +- ...0_020753_create_freeleech_tokens_table.php | 4 +- ...1_20_070937_create_two_step_auth_table.php | 4 +- ...19_01_09_151754_alter_categories_table.php | 4 +- ...9_175336_add_incognito_to_groups_table.php | 4 +- ...102512_add_request_id_to_reports_table.php | 4 +- .../2019_01_11_001150_alter_rss_table.php | 4 +- ...210_add_torrent_filters_to_users_table.php | 4 +- ...23_034500_alter_bon_transactions_table.php | 4 +- ...33802_rename_topic_subscriptions_table.php | 4 +- ...2019_01_24_190220_alter_torrents_table.php | 4 +- ...01_27_005216_create_user_privacy_table.php | 4 +- .../2019_01_28_031842_alter_groups_table.php | 4 +- ...225127_create_user_notifications_table.php | 4 +- .../2019_01_29_054104_alter_users_tables.php | 4 +- ..._02_04_041644_create_user_echoes_table.php | 4 +- .../2019_02_05_220444_create_bots_table.php | 4 +- ...06_005248_add_bot_id_to_messages_table.php | 4 +- ...6_075938_create_bot_transactions_table.php | 4 +- ...2_07_022409_create_user_audibles_table.php | 4 +- ...9_02_10_010213_fix_chat_related_tables.php | 4 +- ...21_133950_add_is_owner_to_groups_table.php | 4 +- ...1047_add_request_to_user_privacy_table.php | 4 +- .../2019_03_20_214306_alter_users_table.php | 4 +- ..._172554_add_last_action_to_users_table.php | 4 +- ...645_add_release_year_to_torrents_table.php | 4 +- .../2019_07_30_210848_create_tv_table.php | 4 +- ...2019_07_30_210849_create_seasons_table.php | 4 +- .../2019_07_30_210850_create_cast_table.php | 4 +- ...9_07_30_210850_create_collection_table.php | 4 +- ...19_07_30_210850_create_companies_table.php | 4 +- ...019_07_30_210850_create_episodes_table.php | 4 +- .../2019_07_30_210850_create_genres_table.php | 4 +- .../2019_07_30_210850_create_movie_table.php | 4 +- ...019_07_30_210850_create_networks_table.php | 4 +- .../2019_07_30_210850_create_person_table.php | 4 +- ...2019_07_31_024816_alter_requests_table.php | 4 +- ...07_31_210850_create_cast_episode_table.php | 4 +- ...9_07_31_210850_create_cast_movie_table.php | 4 +- ..._07_31_210850_create_cast_season_table.php | 4 +- ...2019_07_31_210850_create_cast_tv_table.php | 4 +- ...9_07_31_210850_create_company_tv_table.php | 4 +- ...07_31_210850_create_crew_episode_table.php | 4 +- ...9_07_31_210850_create_crew_movie_table.php | 4 +- ..._07_31_210850_create_crew_season_table.php | 4 +- ...2019_07_31_210850_create_crew_tv_table.php | 4 +- ...210850_create_episode_guest_star_table.php | 4 +- ..._31_210850_create_episode_person_table.php | 4 +- ...019_07_31_210850_create_genre_tv_table.php | 4 +- ...9_07_31_210850_create_network_tv_table.php | 4 +- ...07_31_210850_create_person_movie_table.php | 4 +- ...19_07_31_210850_create_person_tv_table.php | 4 +- ...1_210851_create_collection_movie_table.php | 5 +- ...7_31_210851_create_company_movie_table.php | 4 +- ..._07_31_210851_create_genre_movie_table.php | 4 +- ...7_31_210851_create_person_season_table.php | 4 +- ...19_09_22_204439_create_playlists_table.php | 4 +- ..._204613_create_playlist_torrents_table.php | 4 +- ...2019_09_24_160123_alter_comments_table.php | 4 +- .../2019_11_05_233558_create_audits_table.php | 4 +- ...11_27_025048_add_api_token_field_users.php | 4 +- ...019_12_17_030908_create_keywords_table.php | 4 +- ..._01_02_203432_bdinfo_to_torrents_table.php | 4 +- ...85120_add_foreign_key_to_options_table.php | 4 +- ...202935_drop_ip_checking_in_polls_table.php | 4 +- ...203001_drop_ip_address_in_voters_table.php | 4 +- ...020_03_02_031656_update_comments_table.php | 4 +- ...20_03_26_030235_create_subtitles_table.php | 4 +- ...26_034620_create_media_languages_table.php | 4 +- ...7_add_is_double_upload_to_groups_table.php | 4 +- ...9_023939_add_type_id_to_torrents_table.php | 4 +- ...6_053632_add_type_id_to_requests_table.php | 4 +- ..._06_06_185230_create_resolutions_table.php | 4 +- ...38_add_resolution_id_to_torrents_table.php | 4 +- ...32_add_resolution_id_to_requests_table.php | 4 +- .../2020_06_10_014256_unique_groups.php | 4 +- ...115296_add_bumped_at_to_torrents_table.php | 4 +- .../2020_07_07_202935_drop_tags_tables.php | 4 +- ...6_143759_add_uuid_to_failed_jobs_table.php | 4 +- ..._10_07_012129_create_job_batches_table.php | 4 +- ...0_18_235628_create_genre_torrent_table.php | 4 +- .../2020_11_01_165838_update_wishes_table.php | 4 +- .../2021_01_02_230512_update_users_table.php | 4 +- ...72_update_nfo_column_on_torrents_table.php | 4 +- ...2021_01_18_191121_create_tickets_table.php | 4 +- ..._191321_create_ticket_categories_table.php | 4 +- ..._191336_create_ticket_priorities_table.php | 4 +- ...191357_create_ticket_attachments_table.php | 4 +- ...191596_add_ticket_id_to_comments_table.php | 4 +- ...1_03_04_042851_create_watchlists_table.php | 4 +- ...add_personal_release_to_torrents_table.php | 4 +- ...4_093812_add_read_column_tickets_table.php | 4 +- ...421_update_about_column_on_users_table.php | 4 +- .../2021_04_18_085155_add_internals_table.php | 8 +- ...26_215430_create_recommendations_table.php | 4 +- ...3452_add_standalone_css_to_users_table.php | 4 +- ...537_add_flush_own_peers_to_users_table.php | 4 +- ...021_07_27_140562_change_torrents_table.php | 4 +- ...07_27_185231_create_distributors_table.php | 4 +- ...2021_07_27_285231_create_regions_table.php | 4 +- ...8_add_connectable_state_to_peers_table.php | 4 +- ..._change_torrent_to_nullable_in_warning.php | 4 +- ...021_10_03_180121_add_indexes_to_tables.php | 4 +- ...1_11_22_115517_add_more_torrent_promos.php | 6 +- ...021_11_26_024738_update_torrents_table.php | 4 +- .../2021_12_19_202317_fix_database_indexs.php | 4 +- .../seeders/AchievementDetailsTableSeeder.php | 6 +- database/seeders/ArticlesTableSeeder.php | 6 +- database/seeders/BonExchangeTableSeeder.php | 6 +- database/seeders/BotsTableSeeder.php | 6 +- database/seeders/CategoriesTableSeeder.php | 6 +- database/seeders/ChatStatusSeeder.php | 6 +- database/seeders/ChatroomTableSeeder.php | 6 +- database/seeders/DatabaseSeeder.php | 4 +- database/seeders/DistributorsTableSeeder.php | 6 +- database/seeders/ForumsTableSeeder.php | 6 +- database/seeders/GroupsTableSeeder.php | 6 +- database/seeders/MediaLanguagesSeeder.php | 4 +- database/seeders/PagesTableSeeder.php | 6 +- database/seeders/PermissionsTableSeeder.php | 6 +- database/seeders/RegionsTableSeeder.php | 6 +- database/seeders/ResolutionsTableSeeder.php | 6 +- .../seeders/TicketCategoriesTableSeeder.php | 2 +- .../seeders/TicketPrioritiesTableSeeder.php | 2 +- database/seeders/TypesTableSeeder.php | 6 +- database/seeders/UsersTableSeeder.php | 6 +- tests/Feature/Factories/UserFactoryTest.php | 2 +- .../Controllers/API/TorrentControllerTest.php | 8 +- .../AchievementsControllerTest.php | 4 +- .../Http/Controllers/AlbumControllerTest.php | 10 +- .../Controllers/AnnounceControllerTest.php | 2 +- .../Controllers/ArticleControllerTest.php | 4 +- .../Auth/ActivationControllerTest.php | 2 +- .../Auth/ApplicationControllerTest.php | 4 +- .../Auth/ForgotUsernameControllerTest.php | 4 +- .../Auth/TwoStepControllerTest.php | 6 +- .../Http/Controllers/BonusControllerTest.php | 22 +- .../Controllers/CommentControllerTest.php | 14 +- .../Controllers/ContactControllerTest.php | 4 +- .../Http/Controllers/FollowControllerTest.php | 4 +- .../ForumCategoryControllerTest.php | 4 +- .../Http/Controllers/ForumControllerTest.php | 16 +- .../Http/Controllers/HomeControllerTest.php | 6 +- .../Staff/ArticleControllerTest.php | 14 +- .../Staff/CategoryControllerTest.php | 14 +- .../Staff/ChatBotControllerTest.php | 14 +- .../Staff/ChatRoomControllerTest.php | 10 +- .../Staff/ChatStatusControllerTest.php | 10 +- .../Staff/CheaterControllerTest.php | 4 +- .../Staff/CommandControllerTest.php | 20 +- .../Controllers/Staff/GiftControllerTest.php | 6 +- .../Controllers/Staff/GroupControllerTest.php | 12 +- .../Staff/InviteControllerTest.php | 4 +- .../Staff/MassActionControllerTest.php | 8 +- .../Controllers/Staff/NoteControllerTest.php | 8 +- .../Controllers/Staff/PageControllerTest.php | 14 +- .../Controllers/Staff/TypeControllerTest.php | 14 +- .../Controllers/API/ChatControllerTest.php | 40 +-- .../Controllers/BookmarkControllerTest.php | 6 +- .../Controllers/GraveyardControllerTest.php | 8 +- .../Http/Controllers/ImageControllerTest.php | 8 +- .../Http/Controllers/InviteControllerTest.php | 8 +- .../Controllers/LanguageControllerTest.php | 2 +- .../Http/Controllers/LikeControllerTest.php | 4 +- .../NotificationControllerTest.php | 14 +- .../Http/Controllers/PageControllerTest.php | 14 +- .../Controllers/PlaylistControllerTest.php | 14 +- .../PlaylistTorrentControllerTest.php | 4 +- .../Http/Controllers/PollControllerTest.php | 10 +- .../Http/Controllers/PostControllerTest.php | 8 +- .../PrivateMessageControllerTest.php | 20 +- .../Http/Controllers/ReportControllerTest.php | 6 +- .../Controllers/RequestControllerTest.php | 26 +- .../Http/Controllers/RssControllerTest.php | 14 +- .../Controllers/SeedboxControllerTest.php | 2 +- .../Staff/ApplicationControllerTest.php | 8 +- .../Controllers/Staff/AuditControllerTest.php | 4 +- .../Staff/AuthenticationControllerTest.php | 2 +- .../Staff/BackupControllerTest.php | 12 +- .../Controllers/Staff/BanControllerTest.php | 6 +- .../Controllers/Staff/FlushControllerTest.php | 4 +- .../Controllers/Staff/ForumControllerTest.php | 12 +- .../Controllers/Staff/HomeControllerTest.php | 2 +- .../Staff/ModerationControllerTest.php | 8 +- .../Controllers/Staff/PollControllerTest.php | 10 +- .../Staff/ReportControllerTest.php | 6 +- .../Controllers/Staff/RssControllerTest.php | 12 +- .../Staff/SeedboxControllerTest.php | 4 +- .../Controllers/Staff/UserControllerTest.php | 10 +- .../Staff/VersionControllerTest.php | 2 +- .../Staff/WarningControllerTest.php | 2 +- .../Http/Controllers/StatsControllerTest.php | 36 +- .../SubscriptionControllerTest.php | 8 +- .../Http/Controllers/ThankControllerTest.php | 2 +- .../Http/Controllers/TopicControllerTest.php | 20 +- .../Controllers/TopicLabelControllerTest.php | 14 +- .../Controllers/TorrentControllerTest.php | 46 +-- .../Http/Controllers/UserControllerTest.php | 64 ++-- .../Controllers/WarningControllerTest.php | 12 +- .../Http/Controllers/WishControllerTest.php | 6 +- .../Commands/AutoBanDisposableUsersTest.php | 2 +- .../Console/Commands/AutoNerdStatTest.php | 2 +- .../Commands/AutoRevokePermissionsTest.php | 2 +- .../Unit/Console/Commands/FetchGenresTest.php | 2 +- .../Commands/FetchReleaseYearsTest.php | 2 +- .../Unit/Console/Commands/GitUpdaterTest.php | 2 +- .../Console/Commands/TestMailSettingsTest.php | 2 +- .../Console/Commands/VendorCleanupTest.php | 2 +- .../Todo/Unit/Http/Requests/StorePollTest.php | 9 +- .../Unit/Http/Requests/VoteOnPollTest.php | 9 +- tests/Unit/Console/Commands/AutoBanTest.php | 2 +- .../Commands/AutoBonAllocationTest.php | 2 +- .../Commands/AutoCorrectHistoryTest.php | 2 +- .../Commands/AutoDeactivateWarningTest.php | 2 +- .../Commands/AutoDisableInactiveUsersTest.php | 2 +- .../Console/Commands/AutoFlushPeersTest.php | 2 +- .../Console/Commands/AutoGraveyardTest.php | 2 +- tests/Unit/Console/Commands/AutoGroupTest.php | 2 +- .../Console/Commands/AutoHighspeedTagTest.php | 2 +- .../Console/Commands/AutoPreWarningTest.php | 2 +- .../Commands/AutoRecycleAuditsTest.php | 2 +- .../AutoRecycleClaimedTorrentRequestsTest.php | 2 +- .../Commands/AutoRecycleFailedLoginsTest.php | 2 +- .../Commands/AutoRecycleInvitesTest.php | 2 +- .../AutoRemoveFeaturedTorrentTest.php | 2 +- .../AutoRemovePersonalFreeleechTest.php | 2 +- .../AutoSoftDeleteDisabledUsersTest.php | 2 +- .../Unit/Console/Commands/AutoWarningTest.php | 2 +- .../Unit/Console/Commands/ClearCacheTest.php | 2 +- tests/Unit/Console/Commands/SetCacheTest.php | 2 +- tests/Unit/Console/Commands/SyncPeersTest.php | 2 +- tests/Unit/ExampleTest.php | 4 +- 737 files changed, 1968 insertions(+), 4307 deletions(-) diff --git a/app/Achievements/UserMadeTenComments.php b/app/Achievements/UserMadeTenComments.php index a8ba1327aa..0bb25f185d 100644 --- a/app/Achievements/UserMadeTenComments.php +++ b/app/Achievements/UserMadeTenComments.php @@ -35,14 +35,14 @@ class UserMadeTenComments extends Achievement /* * Triggers whenever an Achiever makes progress on this achievement */ - public function whenProgress($progress) + public function whenProgress($progress): void { } /* * Triggers whenever an Achiever unlocks this achievement */ - public function whenUnlocked($progress) + public function whenUnlocked($progress): void { } } diff --git a/app/Bots/CasinoBot.php b/app/Bots/CasinoBot.php index 3713a01691..791892bd0b 100644 --- a/app/Bots/CasinoBot.php +++ b/app/Bots/CasinoBot.php @@ -30,19 +30,19 @@ class CasinoBot private $chat; - private $target; + private ?\App\Models\User $target = null; private $type; - private $message; + private ?string $message = null; - private $targeted; + private ?int $targeted = null; - private $log; + private ?string $log = null; - private $expiresAt; + private \Carbon\Carbon $expiresAt; - private $current; + private \Carbon\Carbon $current; /** * NerdBot Constructor. @@ -62,7 +62,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function replaceVars($output) + public function replaceVars($output): array|string { $output = \str_replace(['{me}', '{command}'], [$this->bot->name, $this->bot->command], $output); if (\str_contains($output, '{bots}')) { @@ -81,14 +81,11 @@ public function replaceVars($output) /** * Send Bot Donation. * - * @param int $amount - * @param string $note * * @throws \Exception * - * @return string */ - public function putDonate($amount = 0, $note = '') + public function putDonate(int $amount = 0, string $note = ''): string { $output = \implode($note, ' '); $v = \validator(['bot_id' => $this->bot->id, 'amount'=> $amount, 'note'=> $output], [ @@ -125,13 +122,11 @@ public function putDonate($amount = 0, $note = '') /** * Get Bot Donations. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getDonations($duration = 'default') + public function getDonations(string $duration = 'default'): string { $donations = \cache()->get('casinobot-donations'); if (! $donations) { @@ -152,7 +147,7 @@ public function getDonations($duration = 'default') /** * Get Help. */ - public function getHelp() + public function getHelp(): array|string { return $this->replaceVars($this->bot->help); } @@ -161,14 +156,11 @@ public function getHelp() * Process Message. * * @param $type - * @param string $message - * @param int $targeted * * @throws \Exception * - * @return bool */ - public function process($type, User $user, $message = '', $targeted = 0) + public function process($type, User $user, string $message = '', int $targeted = 0): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $this->target = $user; if ($type == 'message') { @@ -221,7 +213,7 @@ public function process($type, User $user, $message = '', $targeted = 0) /** * Output Message. */ - public function pm() + public function pm(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $type = $this->type; $target = $this->target; diff --git a/app/Bots/IRCAnnounceBot.php b/app/Bots/IRCAnnounceBot.php index ee35e8a925..8c31c6a016 100644 --- a/app/Bots/IRCAnnounceBot.php +++ b/app/Bots/IRCAnnounceBot.php @@ -46,7 +46,7 @@ class IRCAnnounceBot private $username; - private $registered = false; + private bool $registered = false; public function __construct() { @@ -72,7 +72,7 @@ public function __destruct() } } - private function connect() + private function connect(): void { while ($data = \fgets($this->socket)) { \flush(); @@ -89,22 +89,22 @@ private function connect() } } - private function send_data($data) + private function send_data($data): void { \fwrite($this->socket, \sprintf('%s', $data)); } - private function say($channel, $string) + private function say($channel, $string): void { $this->send_data(\sprintf('PRIVMSG %s %s', $channel, $string)); } - private function join($channel) + private function join($channel): void { $this->send_data(\sprintf('JOIN %s', $channel)); } - public function message($channel, $message) + public function message($channel, $message): void { // Messages an specific IRC Channel if ($this->joinchannel && \preg_match('/#(\w*[a-zA-Z_0-9]+\w*)/', $channel)) { diff --git a/app/Bots/NerdBot.php b/app/Bots/NerdBot.php index 9eb994dd52..7c97907d00 100644 --- a/app/Bots/NerdBot.php +++ b/app/Bots/NerdBot.php @@ -34,19 +34,19 @@ class NerdBot private $chat; - private $target; + private ?\App\Models\User $target = null; private $type; - private $message; + private ?string $message = null; - private $targeted; + private ?int $targeted = null; private $log; - private $expiresAt; + private \Carbon\Carbon $expiresAt; - private $current; + private \Carbon\Carbon $current; /** * NerdBot Constructor. @@ -66,7 +66,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function replaceVars($output) + public function replaceVars($output): array|string { $output = \str_replace(['{me}', '{command}'], [$this->bot->name, $this->bot->command], $output); if (\str_contains($output, '{bots}')) { @@ -85,13 +85,11 @@ public function replaceVars($output) /** * Get Banker. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getBanker($duration = 'default') + public function getBanker(string $duration = 'default'): string { $banker = \cache()->get('nerdbot-banker'); if (! $banker) { @@ -105,13 +103,11 @@ public function getBanker($duration = 'default') /** * Get Snatched. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getSnatched($duration = 'default') + public function getSnatched(string $duration = 'default'): string { $snatched = \cache()->get('nerdbot-snatched'); if (! $snatched) { @@ -125,13 +121,11 @@ public function getSnatched($duration = 'default') /** * Get Leeched. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getLeeched($duration = 'default') + public function getLeeched(string $duration = 'default'): string { $leeched = \cache()->get('nerdbot-leeched'); if (! $leeched) { @@ -145,13 +139,11 @@ public function getLeeched($duration = 'default') /** * Get Seeded. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getSeeded($duration = 'default') + public function getSeeded(string $duration = 'default'): string { $seeded = \cache()->get('nerdbot-seeded'); if (! $seeded) { @@ -165,13 +157,11 @@ public function getSeeded($duration = 'default') /** * Get FL. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getFreeleech($duration = 'default') + public function getFreeleech(string $duration = 'default'): string { $fl = \cache()->get('nerdbot-fl'); if (! $fl) { @@ -185,13 +175,11 @@ public function getFreeleech($duration = 'default') /** * Get DU. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getDoubleUpload($duration = 'default') + public function getDoubleUpload(string $duration = 'default'): string { $du = \cache()->get('nerdbot-doubleup'); if (! $du) { @@ -205,13 +193,11 @@ public function getDoubleUpload($duration = 'default') /** * Get Peers. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getPeers($duration = 'default') + public function getPeers(string $duration = 'default'): string { $peers = \cache()->get('nerdbot-peers'); if (! $peers) { @@ -225,13 +211,11 @@ public function getPeers($duration = 'default') /** * Get Bans. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getBans($duration = 'default') + public function getBans(string $duration = 'default'): string { $bans = \cache()->get('nerdbot-bans'); if (! $bans) { @@ -245,13 +229,11 @@ public function getBans($duration = 'default') /** * Get Warnings. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getWarnings($duration = 'default') + public function getWarnings(string $duration = 'default'): string { $warnings = \cache()->get('nerdbot-warnings'); if (! $warnings) { @@ -265,13 +247,11 @@ public function getWarnings($duration = 'default') /** * Get Uploads. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getUploads($duration = 'default') + public function getUploads(string $duration = 'default'): string { $uploads = \cache()->get('nerdbot-uploads'); if (! $uploads) { @@ -285,13 +265,11 @@ public function getUploads($duration = 'default') /** * Get Logins. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getLogins($duration = 'default') + public function getLogins(string $duration = 'default'): string { $logins = \cache()->get('nerdbot-logins'); if (! $logins) { @@ -305,13 +283,11 @@ public function getLogins($duration = 'default') /** * Get Registrations. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getRegistrations($duration = 'default') + public function getRegistrations(string $duration = 'default'): string { $registrations = \cache()->get('nerdbot-users'); if (! $registrations) { @@ -325,13 +301,11 @@ public function getRegistrations($duration = 'default') /** * Get Bot Donations. * - * @param string $duration * * @throws \Exception * - * @return string */ - public function getDonations($duration = 'default') + public function getDonations(string $duration = 'default'): string { $donations = \cache()->get('nerdbot-donations'); if (! $donations) { @@ -352,7 +326,7 @@ public function getDonations($duration = 'default') /** * Get Help. */ - public function getHelp() + public function getHelp(): array|string { return $this->replaceVars($this->bot->help); } @@ -360,7 +334,7 @@ public function getHelp() /** * Get King. */ - public function getKing() + public function getKing(): string { return \config('other.title').' Is King!'; } @@ -368,14 +342,11 @@ public function getKing() /** * Send Bot Donation. * - * @param int $amount - * @param string $note * * @throws \Exception * - * @return string */ - public function putDonate($amount = 0, $note = '') + public function putDonate(int $amount = 0, string $note = ''): string { $output = \implode(' ', $note); $v = \validator(['bot_id' => $this->bot->id, 'amount'=> $amount, 'note'=> $output], [ @@ -413,14 +384,11 @@ public function putDonate($amount = 0, $note = '') * Process Message. * * @param $type - * @param string $message - * @param int $targeted * * @throws \Exception * - * @return bool */ - public function process($type, User $user, $message = '', $targeted = 0) + public function process($type, User $user, string $message = '', int $targeted = 0): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $this->target = $user; if ($type == 'message') { @@ -529,7 +497,7 @@ public function process($type, User $user, $message = '', $targeted = 0) /** * Output Message. */ - public function pm() + public function pm(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $type = $this->type; $target = $this->target; diff --git a/app/Bots/SystemBot.php b/app/Bots/SystemBot.php index cce3e51828..5006475341 100644 --- a/app/Bots/SystemBot.php +++ b/app/Bots/SystemBot.php @@ -31,13 +31,13 @@ class SystemBot private $chat; - private $target; + private ?\App\Models\User $target = null; private $type; - private $message; + private ?string $message = null; - private $targeted; + private ?int $targeted = null; private $log; @@ -57,7 +57,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function replaceVars($output) + public function replaceVars($output): array|string { $output = \str_replace(['{me}', '{command}'], [$this->bot->name, $this->bot->command], $output); if (\str_contains($output, '{bots}')) { @@ -76,7 +76,7 @@ public function replaceVars($output) /** * Get Help. */ - public function getHelp() + public function getHelp(): array|string { return $this->replaceVars($this->bot->help); } @@ -84,13 +84,9 @@ public function getHelp() /** * Send Gift. * - * @param string $receiver - * @param int $amount - * @param string $note * - * @return string */ - public function putGift($receiver = '', $amount = 0, $note = '') + public function putGift(string $receiver = '', int $amount = 0, string $note = ''): string { $output = \implode(' ', $note); $v = \validator(['receiver' => $receiver, 'amount'=> $amount, 'note'=> $output], [ @@ -143,12 +139,9 @@ public function putGift($receiver = '', $amount = 0, $note = '') * Process Message. * * @param $type - * @param string $message - * @param int $targeted * - * @return bool */ - public function process($type, User $user, $message = '', $targeted = 0) + public function process($type, User $user, string $message = '', int $targeted = 0): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $this->target = $user; $x = $type == 'message' ? 0 : 1; @@ -189,7 +182,7 @@ public function process($type, User $user, $message = '', $targeted = 0) /** * Output Message. */ - public function pm() + public function pm(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool { $type = $this->type; $target = $this->target; diff --git a/app/Console/Commands/AutoBan.php b/app/Console/Commands/AutoBan.php index be53ff56f2..75be57c880 100644 --- a/app/Console/Commands/AutoBan.php +++ b/app/Console/Commands/AutoBan.php @@ -47,7 +47,7 @@ class AutoBan extends Command * * @return mixed */ - public function handle() + public function handle(): void { $bannedGroup = \cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id')); diff --git a/app/Console/Commands/AutoBanDisposableUsers.php b/app/Console/Commands/AutoBanDisposableUsers.php index 614195a51c..643d9319dc 100644 --- a/app/Console/Commands/AutoBanDisposableUsers.php +++ b/app/Console/Commands/AutoBanDisposableUsers.php @@ -47,7 +47,7 @@ class AutoBanDisposableUsers extends Command * * @return mixed */ - public function handle() + public function handle(): void { $bannedGroup = \cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id')); diff --git a/app/Console/Commands/AutoBonAllocation.php b/app/Console/Commands/AutoBonAllocation.php index fccd45ff19..289d861dc0 100644 --- a/app/Console/Commands/AutoBonAllocation.php +++ b/app/Console/Commands/AutoBonAllocation.php @@ -43,7 +43,7 @@ class AutoBonAllocation extends Command * * @return mixed */ - public function handle(ByteUnits $byteUnits) + public function handle(ByteUnits $byteUnits): void { $dyingTorrent = DB::table('peers') ->select(DB::raw('count(DISTINCT(peers.info_hash)) as value'), 'peers.user_id') diff --git a/app/Console/Commands/AutoCorrectHistory.php b/app/Console/Commands/AutoCorrectHistory.php index acfdd30d63..16db39976d 100644 --- a/app/Console/Commands/AutoCorrectHistory.php +++ b/app/Console/Commands/AutoCorrectHistory.php @@ -43,7 +43,7 @@ class AutoCorrectHistory extends Command * * @return mixed */ - public function handle() + public function handle(): void { $carbon = new Carbon(); $history = History::select(['id', 'active', 'updated_at'])->where('active', '=', 1)->where('updated_at', '<', $carbon->copy()->subHours(2)->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoDeactivateWarning.php b/app/Console/Commands/AutoDeactivateWarning.php index f89964d841..fb1a706159 100644 --- a/app/Console/Commands/AutoDeactivateWarning.php +++ b/app/Console/Commands/AutoDeactivateWarning.php @@ -42,7 +42,7 @@ class AutoDeactivateWarning extends Command * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $warnings = Warning::with(['warneduser', 'torrenttitle'])->where('active', '=', 1)->where('expires_on', '<', $current)->get(); diff --git a/app/Console/Commands/AutoDisableInactiveUsers.php b/app/Console/Commands/AutoDisableInactiveUsers.php index dcaa064791..f208586ce4 100644 --- a/app/Console/Commands/AutoDisableInactiveUsers.php +++ b/app/Console/Commands/AutoDisableInactiveUsers.php @@ -45,7 +45,7 @@ class AutoDisableInactiveUsers extends Command * * @return mixed */ - public function handle() + public function handle(): void { if (\config('pruning.user_pruning') == true) { $disabledGroup = \cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id')); diff --git a/app/Console/Commands/AutoFlushPeers.php b/app/Console/Commands/AutoFlushPeers.php index 746d991903..32a63064ac 100644 --- a/app/Console/Commands/AutoFlushPeers.php +++ b/app/Console/Commands/AutoFlushPeers.php @@ -44,7 +44,7 @@ class AutoFlushPeers extends Command * * @return mixed */ - public function handle() + public function handle(): void { $carbon = new Carbon(); $peers = Peer::select(['id', 'info_hash', 'user_id', 'updated_at'])->where('updated_at', '<', $carbon->copy()->subHours(2)->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoGraveyard.php b/app/Console/Commands/AutoGraveyard.php index c18e231004..45d3c41ab1 100644 --- a/app/Console/Commands/AutoGraveyard.php +++ b/app/Console/Commands/AutoGraveyard.php @@ -53,7 +53,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function handle() + public function handle(): void { foreach (Graveyard::where('rewarded', '!=', 1)->oldest()->get() as $reward) { $user = User::where('id', '=', $reward->user_id)->first(); diff --git a/app/Console/Commands/AutoGroup.php b/app/Console/Commands/AutoGroup.php index bcf6655466..a5f49d4edf 100644 --- a/app/Console/Commands/AutoGroup.php +++ b/app/Console/Commands/AutoGroup.php @@ -45,7 +45,7 @@ class AutoGroup extends Command * * @return mixed */ - public function handle(ByteUnits $byteUnits) + public function handle(ByteUnits $byteUnits): void { // Temp Hard Coding of Immune Groups (Config Files To Come) $current = Carbon::now(); diff --git a/app/Console/Commands/AutoHighspeedTag.php b/app/Console/Commands/AutoHighspeedTag.php index a1c29f4042..f0da2300ca 100644 --- a/app/Console/Commands/AutoHighspeedTag.php +++ b/app/Console/Commands/AutoHighspeedTag.php @@ -43,7 +43,7 @@ class AutoHighspeedTag extends Command * * @return mixed */ - public function handle() + public function handle(): void { DB::statement('UPDATE torrents SET highspeed = 0'); diff --git a/app/Console/Commands/AutoNerdStat.php b/app/Console/Commands/AutoNerdStat.php index 9681e723e5..fe24fddde6 100644 --- a/app/Console/Commands/AutoNerdStat.php +++ b/app/Console/Commands/AutoNerdStat.php @@ -56,7 +56,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function handle() + public function handle(): void { if (\config('chat.nerd_bot') == true) { // Site Birthday diff --git a/app/Console/Commands/AutoPreWarning.php b/app/Console/Commands/AutoPreWarning.php index 9e77b1f3f5..5753cb353f 100644 --- a/app/Console/Commands/AutoPreWarning.php +++ b/app/Console/Commands/AutoPreWarning.php @@ -45,7 +45,7 @@ class AutoPreWarning extends Command * * @return mixed */ - public function handle() + public function handle(): void { if (\config('hitrun.enabled') == true) { $carbon = new Carbon(); diff --git a/app/Console/Commands/AutoRecycleAudits.php b/app/Console/Commands/AutoRecycleAudits.php index ad9b8af1bc..a23faa4372 100644 --- a/app/Console/Commands/AutoRecycleAudits.php +++ b/app/Console/Commands/AutoRecycleAudits.php @@ -41,7 +41,7 @@ class AutoRecycleAudits extends Command * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $audits = Audit::where('created_at', '<', $current->copy()->subDays(\config('audit.recycle'))->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php b/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php index 16b4efb6cc..85be842cab 100644 --- a/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php +++ b/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php @@ -53,7 +53,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $torrentRequests = TorrentRequest::where('claimed', '=', 1) diff --git a/app/Console/Commands/AutoRecycleFailedLogins.php b/app/Console/Commands/AutoRecycleFailedLogins.php index b250a5d591..8b2344b2b0 100644 --- a/app/Console/Commands/AutoRecycleFailedLogins.php +++ b/app/Console/Commands/AutoRecycleFailedLogins.php @@ -41,7 +41,7 @@ class AutoRecycleFailedLogins extends Command * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $failedLogins = FailedLoginAttempt::where('created_at', '<', $current->copy()->subDays(30)->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoRecycleInvites.php b/app/Console/Commands/AutoRecycleInvites.php index 4f225a0f0f..fa4a53fce2 100644 --- a/app/Console/Commands/AutoRecycleInvites.php +++ b/app/Console/Commands/AutoRecycleInvites.php @@ -41,7 +41,7 @@ class AutoRecycleInvites extends Command * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $invites = Invite::whereNull('accepted_by')->whereNull('accepted_at')->where('expires_on', '<', $current)->get(); diff --git a/app/Console/Commands/AutoRemoveFeaturedTorrent.php b/app/Console/Commands/AutoRemoveFeaturedTorrent.php index e2eb5254c8..96ceefd52f 100644 --- a/app/Console/Commands/AutoRemoveFeaturedTorrent.php +++ b/app/Console/Commands/AutoRemoveFeaturedTorrent.php @@ -51,7 +51,7 @@ public function __construct(private ChatRepository $chatRepository) * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $featuredTorrents = FeaturedTorrent::where('created_at', '<', $current->copy()->subDays(7)->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoRemovePersonalFreeleech.php b/app/Console/Commands/AutoRemovePersonalFreeleech.php index 4e5262743b..4fdb9d6012 100644 --- a/app/Console/Commands/AutoRemovePersonalFreeleech.php +++ b/app/Console/Commands/AutoRemovePersonalFreeleech.php @@ -42,7 +42,7 @@ class AutoRemovePersonalFreeleech extends Command * * @return mixed */ - public function handle() + public function handle(): void { $current = Carbon::now(); $personalFreeleech = PersonalFreeleech::where('created_at', '<', $current->copy()->subDays(1)->toDateTimeString())->get(); diff --git a/app/Console/Commands/AutoResetUserFlushes.php b/app/Console/Commands/AutoResetUserFlushes.php index a6d9fab831..d210d4d45a 100644 --- a/app/Console/Commands/AutoResetUserFlushes.php +++ b/app/Console/Commands/AutoResetUserFlushes.php @@ -37,7 +37,7 @@ class AutoResetUserFlushes extends Command * * @return mixed */ - public function handle() + public function handle(): void { // Updates own_flushes for each user User::where('own_flushes', '<', '2')->update(['own_flushes' => '2']); diff --git a/app/Console/Commands/AutoRevokePermissions.php b/app/Console/Commands/AutoRevokePermissions.php index 86a02e42f7..e4d871cb7b 100644 --- a/app/Console/Commands/AutoRevokePermissions.php +++ b/app/Console/Commands/AutoRevokePermissions.php @@ -45,7 +45,7 @@ class AutoRevokePermissions extends Command * * @return mixed */ - public function handle() + public function handle(): void { $bannedGroup = \cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id')); $validatingGroup = \cache()->rememberForever('validating_group', fn () => Group::where('slug', '=', 'validating')->pluck('id')); diff --git a/app/Console/Commands/AutoSoftDeleteDisabledUsers.php b/app/Console/Commands/AutoSoftDeleteDisabledUsers.php index 5a3ce06eea..c7b86e8aaf 100644 --- a/app/Console/Commands/AutoSoftDeleteDisabledUsers.php +++ b/app/Console/Commands/AutoSoftDeleteDisabledUsers.php @@ -57,7 +57,7 @@ class AutoSoftDeleteDisabledUsers extends Command * * @return mixed */ - public function handle() + public function handle(): void { if (\config('pruning.user_pruning') == true) { $disabledGroup = \cache()->rememberForever('disabled_group', fn () => Group::where('slug', '=', 'disabled')->pluck('id')); diff --git a/app/Console/Commands/AutoStatsClients.php b/app/Console/Commands/AutoStatsClients.php index 64cdd6040e..2476b0328d 100644 --- a/app/Console/Commands/AutoStatsClients.php +++ b/app/Console/Commands/AutoStatsClients.php @@ -36,7 +36,7 @@ class AutoStatsClients extends Command /** * Execute the console command. */ - public function handle() + public function handle(): void { $peers = Peer::where('seeder', '=', 1)->get(); diff --git a/app/Console/Commands/AutoWarning.php b/app/Console/Commands/AutoWarning.php index 45bd7e7439..8108ed8dd1 100644 --- a/app/Console/Commands/AutoWarning.php +++ b/app/Console/Commands/AutoWarning.php @@ -45,7 +45,7 @@ class AutoWarning extends Command * * @return mixed */ - public function handle() + public function handle(): void { if (\config('hitrun.enabled') == true) { $carbon = new Carbon(); diff --git a/app/Console/Commands/CheckForStaleTickets.php b/app/Console/Commands/CheckForStaleTickets.php index 86c92e7b8a..0535718e8f 100644 --- a/app/Console/Commands/CheckForStaleTickets.php +++ b/app/Console/Commands/CheckForStaleTickets.php @@ -37,7 +37,7 @@ class CheckForStaleTickets extends Command * * @return mixed */ - public function handle() + public function handle(): void { Ticket::checkForStaleTickets(); } diff --git a/app/Console/Commands/ClearCache.php b/app/Console/Commands/ClearCache.php index a1de116ba0..f59a82c313 100644 --- a/app/Console/Commands/ClearCache.php +++ b/app/Console/Commands/ClearCache.php @@ -39,7 +39,7 @@ class ClearCache extends Command * * @return mixed */ - public function handle() + public function handle(): void { $this->comment("Clearing several common cache's ..."); $this->call('view:clear'); diff --git a/app/Console/Commands/DbDump.php b/app/Console/Commands/DbDump.php index 64dadc4a28..9e76b5c4e8 100644 --- a/app/Console/Commands/DbDump.php +++ b/app/Console/Commands/DbDump.php @@ -25,7 +25,7 @@ class DbDump extends Command * * @return mixed */ - public function handle() + public function handle(): void { $outfile = \config('database.pristine-db-file'); $host = \config('database.connections.mysql.host'); diff --git a/app/Console/Commands/DbLoad.php b/app/Console/Commands/DbLoad.php index b45e883593..c3b04447e9 100644 --- a/app/Console/Commands/DbLoad.php +++ b/app/Console/Commands/DbLoad.php @@ -27,7 +27,7 @@ class DbLoad extends Command * * @return mixed */ - public function handle() + public function handle(): void { $input = \config('database.pristine-db-file'); $db = \config('database.connections.mysql.database'); diff --git a/app/Console/Commands/DemoSeed.php b/app/Console/Commands/DemoSeed.php index cf5cbacd32..e599e4da61 100644 --- a/app/Console/Commands/DemoSeed.php +++ b/app/Console/Commands/DemoSeed.php @@ -43,7 +43,7 @@ class DemoSeed extends Command * * @return mixed */ - public function handle() + public function handle(): void { $this->alert('Demo Seeder v2.0 (Author: Poppabear)'); $this->warn('*** This process could take a few minutes ***'); @@ -500,7 +500,7 @@ private function fetchTv($id) return (new TV($id))->getData(); } - private function movie_ids() + private function movie_ids(): array { return [ '15283', @@ -606,7 +606,7 @@ private function movie_ids() ]; } - private function tv_ids() + private function tv_ids(): array { return [ '119815', diff --git a/app/Console/Commands/EmailBlacklistUpdate.php b/app/Console/Commands/EmailBlacklistUpdate.php index a6822a7249..3c869553a3 100644 --- a/app/Console/Commands/EmailBlacklistUpdate.php +++ b/app/Console/Commands/EmailBlacklistUpdate.php @@ -39,7 +39,7 @@ class EmailBlacklistUpdate extends Command * * @return mixed */ - public function handle() + public function handle(): void { $count = EmailBlacklistUpdater::update(); diff --git a/app/Console/Commands/FetchMeta.php b/app/Console/Commands/FetchMeta.php index 6045d857b0..4d37a871bd 100644 --- a/app/Console/Commands/FetchMeta.php +++ b/app/Console/Commands/FetchMeta.php @@ -38,7 +38,7 @@ class FetchMeta extends Command * * @return mixed */ - public function handle() + public function handle(): void { $this->alert('Meta Fetcher Started'); diff --git a/app/Console/Commands/FetchReleaseYears.php b/app/Console/Commands/FetchReleaseYears.php index 1ccdd810b4..15cd8fdb52 100644 --- a/app/Console/Commands/FetchReleaseYears.php +++ b/app/Console/Commands/FetchReleaseYears.php @@ -42,7 +42,7 @@ class FetchReleaseYears extends Command * * @return mixed */ - public function handle() + public function handle(): void { $appurl = \config('app.url'); diff --git a/app/Console/Commands/GitUpdater.php b/app/Console/Commands/GitUpdater.php index d8eac416fd..796cefeabf 100644 --- a/app/Console/Commands/GitUpdater.php +++ b/app/Console/Commands/GitUpdater.php @@ -30,7 +30,7 @@ class GitUpdater extends Command /** * The copy command. */ - private $copyCommand = 'cp -Rfp'; + private string $copyCommand = 'cp -Rfp'; /** * The console command signature. @@ -56,10 +56,8 @@ class GitUpdater extends Command /** * Execute the console command. - * - * @return void */ - public function handle() + public function handle(): void { $this->input = new ArgvInput(); $this->output = new ConsoleOutput(); @@ -103,7 +101,7 @@ public function handle() $this->done(); } - private function update() + private function update(): void { $updating = $this->checkForUpdates(); @@ -176,7 +174,7 @@ private function update() } } - private function checkForUpdates() + private function checkForUpdates(): array { $this->header('Checking For Updates'); @@ -189,7 +187,7 @@ private function checkForUpdates() return $updating; } - private function manualUpdate($updating) + private function manualUpdate($updating): void { $this->alertInfo('Manual Update'); $this->red('Updating will cause you to LOSE any changes you might have made to the file!'); @@ -203,12 +201,12 @@ private function manualUpdate($updating) $this->done(); } - private function updateFile($file) + private function updateFile($file): void { $this->process(\sprintf('git checkout origin/master -- %s', $file)); } - private function backup(array $paths) + private function backup(array $paths): void { $this->header('Backing Up Files'); @@ -226,7 +224,7 @@ private function backup(array $paths) $this->done(); } - private function restore(array $paths) + private function restore(array $paths): void { $this->header('Restoring Backups'); @@ -249,7 +247,7 @@ private function restore(array $paths) ]); } - private function composer() + private function composer(): void { $this->header('Installing Composer Packages'); @@ -260,7 +258,7 @@ private function composer() $this->done(); } - private function compile() + private function compile(): void { $this->header('Compiling Assets ...'); @@ -274,49 +272,49 @@ private function compile() $this->done(); } - private function updateUNIT3DConfig() + private function updateUNIT3DConfig(): void { $this->header('Updating UNIT3D Configuration File'); $this->process('git fetch origin && git checkout origin/master -- config/unit3d.php'); $this->done(); } - private function clearComposerCache() + private function clearComposerCache(): void { $this->header('Clearing Composer Cache'); $this->process('composer clear-cache --no-interaction --ansi --verbose'); $this->done(); } - private function clearCache() + private function clearCache(): void { $this->header('Clearing Application Cache'); $this->call('optimize:clear'); $this->done(); } - private function setCache() + private function setCache(): void { $this->header('Setting Cache'); $this->call('optimize'); $this->done(); } - private function migrations() + private function migrations(): void { $this->header('Running New Migrations'); $this->call('migrate'); $this->done(); } - private function permissions() + private function permissions(): void { $this->header('Refreshing Permissions'); $this->process('chown -R www-data: storage bootstrap public config'); $this->done(); } - private function supervisor() + private function supervisor(): void { $this->header('Restarting Supervisor'); $this->call('queue:restart'); @@ -324,21 +322,21 @@ private function supervisor() $this->done(); } - private function php() + private function php(): void { $this->header('Restarting PHP'); $this->process('systemctl restart php8.0-fpm'); $this->done(); } - private function validatePath($path) + private function validatePath($path): void { if (! \is_file(\base_path($path)) && ! \is_dir(\base_path($path))) { $this->red(\sprintf("The path '%s' is invalid", $path)); } } - private function createBackupPath($path) + private function createBackupPath($path): void { if (! \is_dir(\storage_path(\sprintf('gitupdate/%s', $path))) && ! \is_file(\base_path($path))) { if (! \mkdir($concurrentDirectory = \storage_path(\sprintf('gitupdate/%s', $path)), 0775, true) && ! \is_dir($concurrentDirectory)) { @@ -353,10 +351,7 @@ private function createBackupPath($path) } } - /** - * @return array - */ - private function paths() + private function paths(): array { $p = $this->process('git diff master --name-only'); $paths = \array_filter(\explode("\n", $p->getOutput()), 'strlen'); diff --git a/app/Console/Commands/IrcMessage.php b/app/Console/Commands/IrcMessage.php index 57153b8036..f3a4f6f16d 100644 --- a/app/Console/Commands/IrcMessage.php +++ b/app/Console/Commands/IrcMessage.php @@ -38,7 +38,7 @@ class IrcMessage extends Command * * @return mixed */ - public function handle() + public function handle(): void { $this->info('Messaging '.$this->argument('channel').': '.$this->argument('message')); $ircAnnounceBot = new IRCAnnounceBot(); @@ -47,10 +47,8 @@ public function handle() /** * Get the console command arguments. - * - * @return array */ - protected function getArguments() + protected function getArguments(): array { return [ ['channel', InputArgument::REQUIRED, 'Channel that you would like to message'], diff --git a/app/Console/Commands/SetCache.php b/app/Console/Commands/SetCache.php index df23233a55..93b69e64dc 100644 --- a/app/Console/Commands/SetCache.php +++ b/app/Console/Commands/SetCache.php @@ -39,7 +39,7 @@ class SetCache extends Command * * @return mixed */ - public function handle() + public function handle(): void { $this->comment("Setting several common cache's ..."); $this->call('view:cache'); diff --git a/app/Console/Commands/SyncPeers.php b/app/Console/Commands/SyncPeers.php index 0e14c96931..c019eca6bb 100644 --- a/app/Console/Commands/SyncPeers.php +++ b/app/Console/Commands/SyncPeers.php @@ -40,7 +40,7 @@ class SyncPeers extends Command * * @return mixed */ - public function handle() + public function handle(): void { $torrents = Torrent::select(['id', 'seeders', 'leechers']) ->with('peers') diff --git a/app/Console/Commands/TestMailSettings.php b/app/Console/Commands/TestMailSettings.php index 57d116ca9f..35ec2c19a3 100644 --- a/app/Console/Commands/TestMailSettings.php +++ b/app/Console/Commands/TestMailSettings.php @@ -41,7 +41,7 @@ class TestMailSettings extends Command * * @return mixed */ - public function handle() + public function handle(): void { $owner = \config('other.email'); diff --git a/app/Console/Commands/VendorCleanup.php b/app/Console/Commands/VendorCleanup.php index a8da91be33..6c303df7e6 100644 --- a/app/Console/Commands/VendorCleanup.php +++ b/app/Console/Commands/VendorCleanup.php @@ -32,7 +32,7 @@ class VendorCleanup extends Command */ protected $description = 'Cleans up useless files from vendor folder.'; - protected $patterns = + protected array $patterns = [ 'test', 'tests', @@ -75,7 +75,7 @@ class VendorCleanup extends Command * * @return void */ - protected $excluded = + protected array $excluded = [ /**List of Folders*/ 'src', @@ -92,7 +92,7 @@ class VendorCleanup extends Command * * @return mixed */ - public function handle() + public function handle(): void { $patterns = \array_diff($this->patterns, $this->excluded); @@ -143,11 +143,9 @@ public function handle() /** * Recursively traverses the directory tree. * - * @param string $dir * - * @return array */ - protected function expandDirectoryTree($dir) + protected function expandDirectoryTree(string $dir): array { $directories = []; foreach (\array_diff(\scandir($dir), ['.', '..']) as $file) { @@ -164,11 +162,10 @@ protected function expandDirectoryTree($dir) /** * Recursively deletes the directory. * - * @param string $dir * * @return bool */ - protected function delTree($dir) + protected function delTree(string $dir) { if (! \file_exists($dir) || ! \is_dir($dir)) { return false; @@ -192,16 +189,14 @@ protected function delTree($dir) /** * Prepare word. * - * @param string $matches * - * @return string */ - protected function prepareWord($matches) + protected function prepareWord(string $matches): string { return '['.\strtolower($matches[1]).\strtoupper($matches[1]).']'; } - protected function arrayFind($needle, array $haystack) + protected function arrayFind($needle, array $haystack): int|string|bool { foreach ($haystack as $key => $value) { if (false !== \stripos($value, $needle)) { @@ -212,7 +207,7 @@ protected function arrayFind($needle, array $haystack) return false; } - protected function out($message) + protected function out($message): void { if ($this->option('check')) { echo $message.PHP_EOL; diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 5626d91f8c..e09e09112a 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -30,10 +30,8 @@ class Kernel extends ConsoleKernel /** * Define the application's command schedule. * - * - * @return void */ - protected function schedule(Schedule $schedule) + protected function schedule(Schedule $schedule): void { $schedule->command('auto:group ')->daily(); $schedule->command('auto:nerdstat ')->hourly(); @@ -66,10 +64,8 @@ protected function schedule(Schedule $schedule) /** * Register the Closure based commands for the application. - * - * @return void */ - protected function commands() + protected function commands(): void { $this->load(__DIR__.'/Commands'); diff --git a/app/Events/Chatter.php b/app/Events/Chatter.php index 0b8e18cabc..ca21869708 100644 --- a/app/Events/Chatter.php +++ b/app/Events/Chatter.php @@ -57,10 +57,8 @@ public function __construct(public $type, public $target, $payload) /** * Get the channels the event should broadcast on. - * - * @return PrivateChannel */ - public function broadcastOn() + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('chatter.'.$this->target); } diff --git a/app/Events/CommentCreated.php b/app/Events/CommentCreated.php index ea4b91ffbf..7bddeeeb97 100644 --- a/app/Events/CommentCreated.php +++ b/app/Events/CommentCreated.php @@ -39,7 +39,7 @@ public function __construct(public Comment $comment, public User $user) /** * Get the channels the event should broadcast on. */ - public function broadcastOn(): \Illuminate\Broadcasting\Channel|array + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('channel-name'); } diff --git a/app/Events/MessageDeleted.php b/app/Events/MessageDeleted.php index 52c97e4895..df70b6e31c 100644 --- a/app/Events/MessageDeleted.php +++ b/app/Events/MessageDeleted.php @@ -42,17 +42,15 @@ public function __construct(Message $message) /** * Get the channels the event should broadcast on. - * - * @return PresenceChannel */ - public function broadcastOn() + public function broadcastOn(): \Illuminate\Broadcasting\PresenceChannel { // $this->dontBroadcastToCurrentUser(); return new PresenceChannel('chatroom.'.$this->message->chatroom_id); } - public function broadcastAs() + public function broadcastAs(): string { return 'delete.message'; } diff --git a/app/Events/MessageEdited.php b/app/Events/MessageEdited.php index 152e060715..5f16d986fb 100644 --- a/app/Events/MessageEdited.php +++ b/app/Events/MessageEdited.php @@ -44,17 +44,15 @@ public function __construct(Message $message) /** * Get the channels the event should broadcast on. - * - * @return PresenceChannel */ - public function broadcastOn() + public function broadcastOn(): \Illuminate\Broadcasting\PresenceChannel { // $this->dontBroadcastToCurrentUser(); return new PresenceChannel('chatroom.'.$this->message->chatroom_id); } - public function broadcastAs() + public function broadcastAs(): string { return 'edit.message'; } diff --git a/app/Events/MessageSent.php b/app/Events/MessageSent.php index b1ca0ec50a..1c90e610b3 100644 --- a/app/Events/MessageSent.php +++ b/app/Events/MessageSent.php @@ -51,17 +51,15 @@ public function __construct(Message $message) /** * Get the channels the event should broadcast on. - * - * @return PresenceChannel */ - public function broadcastOn() + public function broadcastOn(): \Illuminate\Broadcasting\PresenceChannel { // $this->dontBroadcastToCurrentUser(); return new PresenceChannel('chatroom.'.$this->message->chatroom_id); } - public function broadcastAs() + public function broadcastAs(): string { return 'new.message'; } diff --git a/app/Events/Ping.php b/app/Events/Ping.php index 76037efdac..255597a3a1 100644 --- a/app/Events/Ping.php +++ b/app/Events/Ping.php @@ -25,7 +25,7 @@ class Ping implements ShouldBroadcastNow use InteractsWithSockets; use SerializesModels; - public $ping; + public array $ping; /** * Ping Constructor. @@ -40,15 +40,13 @@ public function __construct(public $room, $id) /** * Get the channels the event should broadcast on. - * - * @return PresenceChannel */ - public function broadcastOn() + public function broadcastOn(): \Illuminate\Broadcasting\PresenceChannel { return new PresenceChannel('chatroom.'.$this->room); } - public function broadcastAs() + public function broadcastAs(): string { return 'new.ping'; } diff --git a/app/Events/TicketAssigned.php b/app/Events/TicketAssigned.php index baa11bb4ab..ec169cc5f1 100644 --- a/app/Events/TicketAssigned.php +++ b/app/Events/TicketAssigned.php @@ -38,7 +38,7 @@ public function __construct(public Ticket $ticket) /** * Get the channels the event should broadcast on. */ - public function broadcastOn(): \Illuminate\Broadcasting\Channel|array + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('channel-name'); } diff --git a/app/Events/TicketClosed.php b/app/Events/TicketClosed.php index 8b3c509d91..f71e1c74cb 100644 --- a/app/Events/TicketClosed.php +++ b/app/Events/TicketClosed.php @@ -38,7 +38,7 @@ public function __construct(public Ticket $ticket) /** * Get the channels the event should broadcast on. */ - public function broadcastOn(): \Illuminate\Broadcasting\Channel|array + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('channel-name'); } diff --git a/app/Events/TicketCreated.php b/app/Events/TicketCreated.php index 4f6fda61a8..60981d0c04 100644 --- a/app/Events/TicketCreated.php +++ b/app/Events/TicketCreated.php @@ -39,7 +39,7 @@ public function __construct(public Ticket $ticket, public User $user) /** * Get the channels the event should broadcast on. */ - public function broadcastOn(): \Illuminate\Broadcasting\Channel|array + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('channel-name'); } diff --git a/app/Events/TicketWentStale.php b/app/Events/TicketWentStale.php index dfc289ed9b..ba1a9530ba 100644 --- a/app/Events/TicketWentStale.php +++ b/app/Events/TicketWentStale.php @@ -38,7 +38,7 @@ public function __construct(public Ticket $ticket) /** * Get the channels the event should broadcast on. */ - public function broadcastOn(): \Illuminate\Broadcasting\Channel|array + public function broadcastOn(): \Illuminate\Broadcasting\PrivateChannel { return new PrivateChannel('channel-name'); } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 57558f0ed3..7e4ba5cfa1 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -40,10 +40,8 @@ class Handler extends ExceptionHandler /** * Register the exception handling callbacks for the application. - * - * @return void */ - public function register() + public function register(): void { $this->reportable(function (Throwable $e) { // diff --git a/app/Helpers/BBCodeConverter.php b/app/Helpers/BBCodeConverter.php index e66d5cb6eb..d6d3ce8766 100644 --- a/app/Helpers/BBCodeConverter.php +++ b/app/Helpers/BBCodeConverter.php @@ -27,7 +27,7 @@ public function __construct(public $text) /** * @brief Replaces BBCode size. */ - protected function replaceSize() + protected function replaceSize(): void { $this->text = \preg_replace_callback('#\[size=([\W\D\w\s]*?)\]([\W\D\w\s]*?)\[/size\]#iu', @@ -40,7 +40,7 @@ protected function replaceSize() /** * @brief Replaces BBCode center. */ - protected function replaceCenter() + protected function replaceCenter(): void { $this->text = \preg_replace_callback('#\[center\]([\W\D\w\s]*?)\[/center\]#iu', @@ -53,7 +53,7 @@ protected function replaceCenter() /** * @brief Replaces BBCode bold. */ - protected function replaceBold() + protected function replaceBold(): void { $this->text = \preg_replace_callback('#\[b\]([\W\D\w\s]*?)\[/b\]#iu', @@ -66,7 +66,7 @@ protected function replaceBold() /** * @brief Replaces BBCode italic. */ - protected function replaceItalic() + protected function replaceItalic(): void { $this->text = \preg_replace_callback('#\[i\]([\W\D\w\s]*?)\[/i\]#iu', @@ -79,7 +79,7 @@ protected function replaceItalic() /** * @brief Replaces BBCode underline. Hoedown support underline. */ - protected function replaceUnderline() + protected function replaceUnderline(): void { $this->text = \preg_replace_callback('#\[u\]([\W\D\w\s]*?)\[/u\]#iu', @@ -92,7 +92,7 @@ protected function replaceUnderline() /** * @brief Replaces BBCode strikethrough. */ - protected function replaceStrikethrough() + protected function replaceStrikethrough(): void { $this->text = \preg_replace_callback('#\[s\]([\W\D\w\s]*?)\[/s\]#iu', @@ -105,7 +105,7 @@ protected function replaceStrikethrough() /** * @brief Replaces BBCode lists. */ - protected function replaceLists() + protected function replaceLists(): void { $this->text = \preg_replace_callback('#\[list(?P=1)?\](?P[\W\D\w\s]*?)\[/list\]#iu', @@ -152,7 +152,7 @@ function ($matches) { /** * @brief Replaces BBCode tables. */ - protected function replaceTables() + protected function replaceTables(): void { $replaceRow = function ($matches) { $columns = $matches['columns']; @@ -202,7 +202,7 @@ protected function replaceTables() /** * @brief Replaces BBCode urls. */ - protected function replaceUrls() + protected function replaceUrls(): void { $this->text = \preg_replace_callback('#\[url\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\]([\W\D\w\s]*?)\[/url\]#iu', @@ -221,7 +221,7 @@ function ($matches) { /** * @brief Replaces BBCode images. */ - protected function replaceImage() + protected function replaceImage(): void { $this->text = \preg_replace_callback('#\[img\]([\W\D\w\s]*?)\[/img\]#iu', @@ -234,7 +234,7 @@ protected function replaceImage() /** * @brief Replaces BBCode images. */ - protected function replaceImages() + protected function replaceImages(): void { $this->text = \preg_replace_callback('#\[img\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\[/img\]#iu', @@ -247,7 +247,7 @@ protected function replaceImages() /** * @brief Replaces BBCode quotes. */ - protected function replaceQuotes() + protected function replaceQuotes(): void { // Removes the inner quotes, leaving just one level. $this->text = \preg_replace('#\G(?(\[quote\b[^]]*](?>[^[]++|\[(?!/?quote)|(?1))*\[/quote])|(?[^[]++|\[(?!/?quote))+\K)|\[quote\b[^]]*]\K#', '', $this->text); @@ -268,7 +268,7 @@ function ($matches) { /** * @brief Replaces BBCode snippets. */ - protected function replaceSnippets() + protected function replaceSnippets(): void { $this->text = \preg_replace_callback('#\[code\s*=?(?P\w*)\](?P[\W\D\w\s]*?)\[\/code\]#iu', @@ -315,7 +315,7 @@ function ($matches) { /** * @brief Replace BBCode spoiler. */ - protected function replaceSpoilers() + protected function replaceSpoilers(): void { $this->text = \preg_replace_callback('#\[spoiler\](.*?)\[\/spoiler\]#ius', @@ -328,7 +328,7 @@ protected function replaceSpoilers() /** * @brief Replace BBCode named spoiler. */ - protected function replaceNamedSpoilers() + protected function replaceNamedSpoilers(): void { $this->text = \preg_replace_callback('#\[spoiler\=(.*?)\](.*?)\[\/spoiler\]#ius', @@ -341,7 +341,7 @@ protected function replaceNamedSpoilers() /** * @brief Replace BBCode color. */ - protected function replaceColor() + protected function replaceColor(): void { $this->text = \preg_replace_callback('#\[color=([\W\D\w\s]*?)\]([\W\D\w\s]*?)\[/color\]#iu', @@ -354,7 +354,7 @@ protected function replaceColor() /** * @brief Replace BBCode Video. */ - protected function replaceVideo() + protected function replaceVideo(): void { $this->text = \preg_replace_callback('#\[video=[^\]]*.([\W\D\w\s][^\[]*)\[/video]#iu', @@ -367,7 +367,7 @@ protected function replaceVideo() /** * @brief Replace BBCode Youtube. */ - protected function replaceYoutube() + protected function replaceYoutube(): void { $this->text = \preg_replace_callback('#\[youtube\]([\W\D\w\s]*?)\[/youtube\]#iu', @@ -380,7 +380,7 @@ protected function replaceYoutube() /** * @brief Replace BBCode Alert. */ - protected function replaceAlert() + protected function replaceAlert(): void { $this->text = \preg_replace_callback('#\[alert\]([\W\D\w\s]*?)\[/alert\]#iu', @@ -393,7 +393,7 @@ protected function replaceAlert() /** * @brief Replace BBCode Note. */ - protected function replaceNote() + protected function replaceNote(): void { $this->text = \preg_replace_callback('#\[note\]([\W\D\w\s]*?)\[/note\]#iu', diff --git a/app/Helpers/BackupPassword.php b/app/Helpers/BackupPassword.php index 4164b66217..fa6c57c531 100644 --- a/app/Helpers/BackupPassword.php +++ b/app/Helpers/BackupPassword.php @@ -20,10 +20,8 @@ class BackupPassword { /** * Path to .zip-file. - * - * @var string */ - public $path; + public ?string $path; /** * The chosen password. diff --git a/app/Helpers/Bbcode.php b/app/Helpers/Bbcode.php index 87ec1fdcea..d07ab5d673 100644 --- a/app/Helpers/Bbcode.php +++ b/app/Helpers/Bbcode.php @@ -15,10 +15,7 @@ class Bbcode { - /** - * @var array - */ - public $parsers = [ + public array $parsers = [ 'h1' => [ 'pattern' => '/\[h1\](.*?)\[\/h1\]/s', 'replace' => '

$1

', @@ -278,10 +275,7 @@ class Bbcode ], ]; - /** - * @var array - */ - protected $enabledParsers = []; + protected array $enabledParsers = []; public function __construct() { @@ -292,11 +286,9 @@ public function __construct() * Parses the BBCode string. * * @param $source - * @param bool $caseInsensitive * - * @return string */ - public function parse($source, $caseInsensitive = false) + public function parse($source, bool $caseInsensitive = false): string { foreach ($this->enabledParsers as $name => $parser) { $pattern = ($caseInsensitive) ? $parser['pattern'].'i' : $parser['pattern']; @@ -310,11 +302,10 @@ public function parse($source, $caseInsensitive = false) /** * Remove all BBCode. * - * @param string $source * * @return string Parsed text */ - public function stripBBCodeTags($source) + public function stripBBCodeTags(string $source): string { foreach ($this->parsers as $name => $parser) { $source = $this->searchAndReplace($parser['pattern'].'i', $parser['content'], $source); @@ -332,7 +323,7 @@ public function stripBBCodeTags($source) * * @return string Parsed text */ - protected function searchAndReplace($pattern, $replace, $source) + protected function searchAndReplace(string $pattern, string $replace, string $source): ?string { while (\preg_match($pattern, $source)) { $source = \preg_replace($pattern, $replace, $source); @@ -348,7 +339,7 @@ protected function searchAndReplace($pattern, $replace, $source) * * @return string Parsed text */ - public function parseCaseSensitive($source) + public function parseCaseSensitive(string $source): string { return $this->parse($source, false); } @@ -360,7 +351,7 @@ public function parseCaseSensitive($source) * * @return string Parsed text */ - public function parseCaseInsensitive($source) + public function parseCaseInsensitive(string $source): string { return $this->parse($source, true); } @@ -370,7 +361,7 @@ public function parseCaseInsensitive($source) * * @return array array of parsers */ - public function getParsers() + public function getParsers(): array { return $this->enabledParsers; } @@ -383,10 +374,8 @@ public function getParsers() * @param string $pattern Pattern * @param string $replace Replace pattern * @param string $content Parsed text pattern - * - * @return void */ - public function setParser($name, $pattern, $replace, $content) + public function setParser(string $name, string $pattern, string $replace, string $content): void { $this->parsers[$name] = [ 'pattern' => $pattern, diff --git a/app/Helpers/Bencode.php b/app/Helpers/Bencode.php index 56db923690..9d925471e6 100644 --- a/app/Helpers/Bencode.php +++ b/app/Helpers/Bencode.php @@ -211,12 +211,12 @@ public static function bdecode_file($filename) return self::bdecode($f); } - public static function get_infohash($t) + public static function get_infohash($t): string { return \sha1(self::bencode($t['info'])); } - public static function get_meta($t) + public static function get_meta($t): array { $result = []; $size = 0; @@ -241,7 +241,7 @@ public static function get_meta($t) return $result; } - public static function is_v2_or_hybrid($t) + public static function is_v2_or_hybrid($t): bool { return isset($t['piece layers']); } diff --git a/app/Helpers/EmailBlacklistUpdater.php b/app/Helpers/EmailBlacklistUpdater.php index 8d43c070dc..455c7ca567 100644 --- a/app/Helpers/EmailBlacklistUpdater.php +++ b/app/Helpers/EmailBlacklistUpdater.php @@ -17,7 +17,7 @@ class EmailBlacklistUpdater { - public static function update() + public static function update(): bool|int { $url = \config('email-blacklist.source'); if ($url === null) { diff --git a/app/Helpers/HiddenCaptcha.php b/app/Helpers/HiddenCaptcha.php index 9aaf1691b0..f0dfdabb07 100644 --- a/app/Helpers/HiddenCaptcha.php +++ b/app/Helpers/HiddenCaptcha.php @@ -22,11 +22,9 @@ class HiddenCaptcha /** * Set the hidden captcha tags to put in your form. * - * @param string $mustBeEmptyField * - * @return string */ - public static function render($mustBeEmptyField = '_username') + public static function render(string $mustBeEmptyField = '_username'): string { $ts = \time(); $random = Str::random(16); @@ -50,12 +48,9 @@ public static function render($mustBeEmptyField = '_username') /** * Check the hidden captcha values. * - * @param int $minLimit - * @param int $maxLimit * - * @return bool */ - public static function check(Validator $validator, $minLimit = 0, $maxLimit = 1_200) + public static function check(Validator $validator, int $minLimit = 0, int $maxLimit = 1_200): bool { $formData = $validator->getData(); @@ -88,10 +83,8 @@ public static function check(Validator $validator, $minLimit = 0, $maxLimit = 1_ /** * Get and check the token values. - * - * @param string $captcha */ - private static function getToken($captcha): string|bool|array + private static function getToken(string $captcha): string|bool|array { // Get the token values try { diff --git a/app/Helpers/Language.php b/app/Helpers/Language.php index 4b305a3e6f..552d00ef73 100644 --- a/app/Helpers/Language.php +++ b/app/Helpers/Language.php @@ -13,10 +13,8 @@ if (! function_exists('language')) { /** * Get the language instance. - * - * @return App\Models\Language */ - function language() + function language(): \App\Models\Language { return app('language'); } diff --git a/app/Helpers/LanguageCensor.php b/app/Helpers/LanguageCensor.php index f9c94a3edd..5a28dba068 100644 --- a/app/Helpers/LanguageCensor.php +++ b/app/Helpers/LanguageCensor.php @@ -25,12 +25,12 @@ class LanguageCensor */ private const SPECIAL_CHARS = "<>\n [].;,"; - protected static function isSpecial($c) + protected static function isSpecial($c): bool { return \str_contains(self::SPECIAL_CHARS, $c); } - protected static function matchWordIndexes($string, $word) + protected static function matchWordIndexes($string, $word): array { $result = []; $length = \strlen($word); diff --git a/app/Helpers/Linkify.php b/app/Helpers/Linkify.php index 5274eac7a4..a4459abefb 100644 --- a/app/Helpers/Linkify.php +++ b/app/Helpers/Linkify.php @@ -22,7 +22,7 @@ class Linkify /** * @var string */ - public function linky($text) + public function linky($text): string { $validator = new Validator( false, // bool - if should use top level domain to match urls without scheme diff --git a/app/Helpers/MediaInfo.php b/app/Helpers/MediaInfo.php index 2468d0fdd9..97e994e949 100644 --- a/app/Helpers/MediaInfo.php +++ b/app/Helpers/MediaInfo.php @@ -35,7 +35,7 @@ class MediaInfo */ private const FACTORS = ['b' => 0, 'kb' => 1, 'mb' => 2, 'gb' => 3, 'tb' => 4, 'pb' => 5, 'eb' => 6, 'zb' => 7, 'yb' => 8]; - public function parse($string) + public function parse($string): array { $string = \trim($string); $string = \str_replace("\xc2\xa0", ' ', $string); @@ -61,7 +61,7 @@ public function parse($string) return $this->formatOutput($output); } - private function parseSections(array $sections) + private function parseSections(array $sections): array { $output = []; foreach ($sections as $key => $section) { @@ -78,7 +78,7 @@ private function parseSections(array $sections) return $output; } - private function parseProperty($sections, $section) + private function parseProperty($sections, $section): array { $output = []; foreach ($sections as $info) { @@ -310,7 +310,7 @@ private function parseProperty($sections, $section) return $output; } - public static function stripPath($string) + public static function stripPath($string): string { $string = \str_replace('\\', '/', $string); $pathParts = \pathinfo($string); @@ -329,22 +329,22 @@ private function parseFileSize($string) return $number; } - private function parseBitRate($string) + private function parseBitRate($string): string { return \str_replace([' ', 'kbps'], ['', ' kbps'], \strtolower($string)); } - private function parseWidthHeight($string) + private function parseWidthHeight($string): string { return \str_replace(['pixels', ' '], null, \strtolower($string)); } - private function parseAudioChannels($string) + private function parseAudioChannels($string): array|string { return \str_ireplace(\array_keys(self::REPLACE), self::REPLACE, $string); } - private function formatOutput($data) + private function formatOutput($data): array { $output = []; $output['general'] = empty($data['general']) ? null : $data['general']; @@ -355,7 +355,7 @@ private function formatOutput($data) return $output; } - private function computerSize($number, $size) + private function computerSize($number, $size): float { $bytes = (float) $number; $size = \strtolower($size); diff --git a/app/Helpers/Nfo.php b/app/Helpers/Nfo.php index 309582a443..cd756d7e30 100644 --- a/app/Helpers/Nfo.php +++ b/app/Helpers/Nfo.php @@ -20,10 +20,8 @@ class Nfo * Code for Viewing NFO file. * * @param $nfo - * - * @return string */ - public static function parseNfo($nfo) + public static function parseNfo($nfo): string { $cf = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 8962, 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 162, 163, 165, 8359, 402, 225, 237, 243, 250, 241, 209, 170, 186, 191, 8976, 172, 189, 188, 161, 171, 187, 9617, 9618, 9619, 9474, 9508, 9569, 9570, 9558, 9557, 9571, 9553, 9559, 9565, 9564, 9563, 9488, 9492, 9524, 9516, 9500, 9472, 9532, 9566, 9567, 9562, 9556, 9577, 9574, 9568, 9552, 9580, 9575, 9576, 9572, 9573, 9561, 9560, 9554, 9555, 9579, 9578, 9496, 9484, 9608, 9604, 9612, 9616, 9600, 945, 223, 915, 960, 931, 963, 181, 964, 934, 920, 937, 948, 8734, 966, 949, 8745, 8801, 177, 8805, 8804, 8992, 8993, 247, 8776, 176, 8729, 183, 8730, 8319, 178, 9632, 160]; $s = ''; diff --git a/app/Helpers/StringHelper.php b/app/Helpers/StringHelper.php index c1ff7fabab..bf4551702d 100644 --- a/app/Helpers/StringHelper.php +++ b/app/Helpers/StringHelper.php @@ -35,7 +35,7 @@ class StringHelper */ private const ENDS = ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th']; - public static function generateRandomString($length = 20) + public static function generateRandomString($length = 20): string { $string = ''; for ($i = 0; $i < $length; $i++) { @@ -45,7 +45,7 @@ public static function generateRandomString($length = 20) return $string; } - public static function formatBytes($bytes = 0, $precision = 2) + public static function formatBytes($bytes = 0, $precision = 2): string { $minus = false; if ($bytes < 0) { @@ -84,10 +84,8 @@ public static function formatBytes($bytes = 0, $precision = 2) * @method timeRemaining * * @param time $seconds in bigInt - * - * @return string */ - public static function timeRemaining($seconds) + public static function timeRemaining($seconds): string { $minutes = 0; $hours = 0; @@ -147,10 +145,8 @@ public static function timeRemaining($seconds) * @method timeElapsed * * @param time $seconds in bigInt - * - * @return string */ - public static function timeElapsed($seconds) + public static function timeElapsed($seconds): string { $minutes = 0; $hours = 0; @@ -204,7 +200,7 @@ public static function timeElapsed($seconds) return $years.$months.$weeks.$days.$hours.$minutes.$seconds; } - public static function ordinal($number) + public static function ordinal($number): string { if ((($number % 100) >= 11) && (($number % 100) <= 13)) { return $number.'th'; diff --git a/app/Helpers/SystemInformation.php b/app/Helpers/SystemInformation.php index 308dfac0c6..2b2ba74537 100644 --- a/app/Helpers/SystemInformation.php +++ b/app/Helpers/SystemInformation.php @@ -40,7 +40,7 @@ public function avg() } } - public function memory() + public function memory(): array { if (\is_readable('/proc/meminfo')) { $content = \file_get_contents('/proc/meminfo'); @@ -65,7 +65,7 @@ public function memory() ]; } - protected function formatBytes($bytes, $precision = 2) + protected function formatBytes($bytes, $precision = 2): string { $bytes = \max($bytes, 0); $pow = \floor(($bytes ? \log($bytes) : 0) / \log(1_024)); @@ -77,7 +77,7 @@ protected function formatBytes($bytes, $precision = 2) return \round($bytes, $precision).' '.self::UNITS[$pow]; } - public function disk() + public function disk(): array { $total = \disk_total_space(\base_path()); $free = \disk_free_space(\base_path()); @@ -101,7 +101,7 @@ public function systemTime(): Carbon return Carbon::now(); } - public function basic() + public function basic(): array { return [ 'os' => PHP_OS, @@ -124,10 +124,8 @@ private function getDatabase() /** * Get all the directory permissions as well as the recommended ones. - * - * @return array */ - public function directoryPermissions() + public function directoryPermissions(): array { return [ [ diff --git a/app/Helpers/TorrentHelper.php b/app/Helpers/TorrentHelper.php index 2553ffb7e2..20cb9aa0ab 100644 --- a/app/Helpers/TorrentHelper.php +++ b/app/Helpers/TorrentHelper.php @@ -36,7 +36,7 @@ class TorrentHelper { - public static function approveHelper($id) + public static function approveHelper($id): void { $appurl = \config('app.url'); $appname = \config('app.name'); diff --git a/app/Helpers/TorrentTools.php b/app/Helpers/TorrentTools.php index 26f37fda16..8da46e7870 100644 --- a/app/Helpers/TorrentTools.php +++ b/app/Helpers/TorrentTools.php @@ -18,12 +18,12 @@ class TorrentTools /** * Name of the file to be saved. */ - public static $fileName = ''; + public static string $fileName = ''; /** * Representative table of the decoded torrent. */ - public static $decodedTorrent = []; + public static array $decodedTorrent = []; /** * Moves and decodes the torrent. @@ -68,10 +68,8 @@ public static function normalizeTorrent($torrentFile) * Calculate the number of files in the torrent. * * @param $decodedTorrent - * - * @return int */ - public static function getFileCount($decodedTorrent) + public static function getFileCount($decodedTorrent): int { // Multiple file torrent ? if (\array_key_exists('files', $decodedTorrent['info']) && (\is_countable($decodedTorrent['info']['files']) ? \count($decodedTorrent['info']['files']) : 0)) { @@ -142,10 +140,8 @@ public static function getTorrentFiles($decodedTorrent) * Returns file and folder names from the torrent. * * @param $decodedTorrent - * - * @return array */ - public static function getFilenameArray($decodedTorrent) + public static function getFilenameArray($decodedTorrent): array { $filenames = []; @@ -169,10 +165,8 @@ public static function getFilenameArray($decodedTorrent) * Returns the sha1 (hash) of the torrent. * * @param $decodedTorrent - * - * @return string */ - public static function getTorrentHash($decodedTorrent) + public static function getTorrentHash($decodedTorrent): string { return \sha1(Bencode::bencode($decodedTorrent['info'])); } @@ -181,10 +175,8 @@ public static function getTorrentHash($decodedTorrent) * Returns the number of the torrent file. * * @param $decodedTorrent - * - * @return int */ - public static function getTorrentFileCount($decodedTorrent) + public static function getTorrentFileCount($decodedTorrent): int { if (\array_key_exists('files', $decodedTorrent['info'])) { return \is_countable($decodedTorrent['info']['files']) ? \count($decodedTorrent['info']['files']) : 0; @@ -218,10 +210,8 @@ public static function getNfo($inputFile) * Check if the filename is valid or not. * * @param $filename - * - * @return bool */ - public static function isValidFilename($filename) + public static function isValidFilename($filename): bool { $result = true; if (\strlen($filename) > 255 || diff --git a/app/Http/Controllers/API/BaseController.php b/app/Http/Controllers/API/BaseController.php index 5734cbcc43..d92da0331c 100644 --- a/app/Http/Controllers/API/BaseController.php +++ b/app/Http/Controllers/API/BaseController.php @@ -17,7 +17,7 @@ class BaseController extends Controller { - public function sendResponse($result, $message) + public function sendResponse($result, $message): \Illuminate\Http\JsonResponse { $response = [ 'success' => true, @@ -28,7 +28,7 @@ public function sendResponse($result, $message) return \response()->json($response, 200); } - public function sendError($error, $errorMessages = [], $code = 404) + public function sendError($error, $errorMessages = [], $code = 404): \Illuminate\Http\JsonResponse { $response = [ 'success' => false, diff --git a/app/Http/Controllers/API/ChatController.php b/app/Http/Controllers/API/ChatController.php index 8b7ae1c4ab..a468cab55e 100644 --- a/app/Http/Controllers/API/ChatController.php +++ b/app/Http/Controllers/API/ChatController.php @@ -45,13 +45,13 @@ public function __construct(private ChatRepository $chatRepository, private Fact } /* STATUSES */ - public function statuses() + public function statuses(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { return \response($this->chatRepository->statuses()); } /* ECHOES */ - public function echoes() + public function echoes(): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { $user = User::with(['echoes'])->findOrFail($this->authFactory->user()->id); @@ -66,7 +66,7 @@ public function echoes() } /* AUDIBLES */ - public function audibles() + public function audibles(): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { $user = User::with(['audibles'])->findOrFail($this->authFactory->user()->id); @@ -82,36 +82,36 @@ public function audibles() } /* BOTS */ - public function bots() + public function bots(): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { return BotResource::collection($this->chatRepository->bots()); } /* ROOMS */ - public function rooms() + public function rooms(): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { return ChatRoomResource::collection($this->chatRepository->rooms()); } - public function config() + public function config(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { return \response($this->chatRepository->config()); } /* MESSAGES */ - public function messages($roomId) + public function messages($roomId): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { return ChatMessageResource::collection($this->chatRepository->messages($roomId)); } /* MESSAGES */ - public function privateMessages($targetId) + public function privateMessages($targetId): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { return ChatMessageResource::collection($this->chatRepository->privateMessages($this->authFactory->user()->id, $targetId)); } /* MESSAGES */ - public function botMessages($botId) + public function botMessages($botId): \Illuminate\Http\Resources\Json\AnonymousResourceCollection { $bot = Bot::where('id', '=', $botId)->firstOrFail(); if ($bot->is_systembot) { @@ -125,7 +125,7 @@ public function botMessages($botId) return ChatMessageResource::collection($this->chatRepository->botMessages($this->authFactory->user()->id, $bot->id)); } - public function createMessage(Request $request) + public function createMessage(Request $request): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|bool|\App\Http\Resources\ChatMessageResource { $user = $this->authFactory->user(); @@ -370,14 +370,14 @@ public function createMessage(Request $request) return \response('success'); } - public function deleteMessage($id) + public function deleteMessage($id): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $this->chatRepository->deleteMessage($id); return \response('success'); } - public function deleteRoomEcho(Request $request, $userId) + public function deleteRoomEcho(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserEcho::where('user_id', '=', $userId)->where('room_id', '=', $request->input('room_id'))->firstOrFail(); $echo->delete(); @@ -399,7 +399,7 @@ public function deleteRoomEcho(Request $request, $userId) return \response($user); } - public function deleteTargetEcho(Request $request, $userId) + public function deleteTargetEcho(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserEcho::where('user_id', '=', $userId)->where('target_id', '=', $request->input('target_id'))->firstOrFail(); $echo->delete(); @@ -414,7 +414,7 @@ public function deleteTargetEcho(Request $request, $userId) return \response($user); } - public function deleteBotEcho(Request $request, $userId) + public function deleteBotEcho(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserEcho::where('user_id', '=', $userId)->where('bot_id', '=', $request->input('bot_id'))->firstOrFail(); $echo->delete(); @@ -429,7 +429,7 @@ public function deleteBotEcho(Request $request, $userId) return \response($user); } - public function toggleRoomAudible(Request $request, $userId) + public function toggleRoomAudible(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserAudible::where('user_id', '=', $userId)->where('room_id', '=', $request->input('room_id'))->firstOrFail(); $echo->status = ($echo->status == 1 ? 0 : 1); @@ -445,7 +445,7 @@ public function toggleRoomAudible(Request $request, $userId) return \response($user); } - public function toggleTargetAudible(Request $request, $userId) + public function toggleTargetAudible(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserAudible::where('user_id', '=', $userId)->where('target_id', '=', $request->input('target_id'))->firstOrFail(); $echo->status = ($echo->status == 1 ? 0 : 1); @@ -461,7 +461,7 @@ public function toggleTargetAudible(Request $request, $userId) return \response($user); } - public function toggleBotAudible(Request $request, $userId) + public function toggleBotAudible(Request $request, $userId): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $echo = UserAudible::where('user_id', '=', $userId)->where('bot_id', '=', $request->input('bot_id'))->firstOrFail(); $echo->status = ($echo->status == 1 ? 0 : 1); @@ -478,7 +478,7 @@ public function toggleBotAudible(Request $request, $userId) } /* USERS */ - public function updateUserChatStatus(Request $request, $id) + public function updateUserChatStatus(Request $request, $id): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $systemUser = User::where('username', 'System')->firstOrFail(); @@ -497,7 +497,7 @@ public function updateUserChatStatus(Request $request, $id) return \response($user); } - public function updateUserRoom(Request $request, $id) + public function updateUserRoom(Request $request, $id): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $user = User::with(['chatStatus', 'chatroom', 'group', 'echoes'])->findOrFail($id); $room = $this->chatRepository->roomFindOrFail($request->input('room_id')); @@ -538,14 +538,14 @@ public function updateUserRoom(Request $request, $id) return \response($user); } - public function updateUserTarget($id) + public function updateUserTarget($id): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $user = User::with(['chatStatus', 'chatroom', 'group', 'echoes'])->findOrFail($id); return \response($user); } - public function updateBotTarget($id) + public function updateBotTarget($id): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $user = User::with(['chatStatus', 'chatroom', 'group', 'echoes'])->findOrFail($id); diff --git a/app/Http/Controllers/API/TorrentController.php b/app/Http/Controllers/API/TorrentController.php index f0cfbf6d62..781648e432 100644 --- a/app/Http/Controllers/API/TorrentController.php +++ b/app/Http/Controllers/API/TorrentController.php @@ -39,11 +39,11 @@ */ class TorrentController extends BaseController { - public $perPage = 25; + public int $perPage = 25; - public $sortField = 'bumped_at'; + public string $sortField = 'bumped_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; /** * TorrentController Constructor. @@ -54,10 +54,8 @@ public function __construct(private ChatRepository $chatRepository) /** * Display a listing of the resource. - * - * @return TorrentsResource */ - public function index() + public function index(): \App\Http\Resources\TorrentsResource { return new TorrentsResource(Torrent::with(['category', 'type', 'resolution']) ->orderBy('sticky', 'desc') @@ -71,7 +69,7 @@ public function index() * * @throws \Illuminate\Contracts\Container\BindingResolutionException */ - public function store(Request $request): \Illuminate\Http\JsonResponse|\Illuminate\Http\Response + public function store(Request $request): \Illuminate\Http\JsonResponse { $user = $request->user(); $requestFile = $request->file('torrent'); @@ -299,11 +297,9 @@ public function store(Request $request): \Illuminate\Http\JsonResponse|\Illumina /** * Display the specified resource. * - * @param int $id * - * @return TorrentResource */ - public function show($id) + public function show(int $id): \App\Http\Resources\TorrentResource { $torrent = Torrent::findOrFail($id); @@ -473,10 +469,8 @@ private static function anonymizeMediainfo($mediainfo) * Parse Torrent Keywords. * * @param $text - * - * @return array */ - private static function parseKeywords($text) + private static function parseKeywords($text): array { $parts = \explode(', ', $text); $result = []; diff --git a/app/Http/Controllers/AchievementsController.php b/app/Http/Controllers/AchievementsController.php index ae0b64c8cd..e52794b69f 100644 --- a/app/Http/Controllers/AchievementsController.php +++ b/app/Http/Controllers/AchievementsController.php @@ -41,10 +41,8 @@ public function index(Request $request): \Illuminate\Contracts\View\Factory|\Ill /** * Show A Users Achievements. - * - * @param \App\Models\User $username */ - public function show($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); diff --git a/app/Http/Controllers/AlbumController.php b/app/Http/Controllers/AlbumController.php index 7eb8a7495f..d3f132cb11 100644 --- a/app/Http/Controllers/AlbumController.php +++ b/app/Http/Controllers/AlbumController.php @@ -28,7 +28,7 @@ class AlbumController extends Controller /** * Display All Albums. */ - public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function index(): \Illuminate\Contracts\View\View { $albums = Album::withCount('images')->get(); @@ -93,10 +93,8 @@ public function store(Request $request) /** * Show A Album. - * - * @param \App\Models\Album $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Album $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $album = Album::with('images')->find($id); $albums = Album::with('images')->get(); @@ -107,13 +105,11 @@ public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Delete A Album. * - * @param \App\Models\Album $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Album $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $album = Album::findOrFail($id); diff --git a/app/Http/Controllers/AnnounceController.php b/app/Http/Controllers/AnnounceController.php index 87be2d063c..16663d2dc5 100644 --- a/app/Http/Controllers/AnnounceController.php +++ b/app/Http/Controllers/AnnounceController.php @@ -61,13 +61,11 @@ class AnnounceController extends Controller /** * Announce Code. * - * @param \App\Models\User $passkey * * @throws \Exception - * * @return string */ - public function index(Request $request, $passkey) + public function index(Request $request, \App\Models\User $passkey) { try { /** @@ -512,7 +510,7 @@ protected function generateFailedAnnounceResponse(TrackerException $trackerExcep /** * @param $repDict */ - protected function sendFinalAnnounceResponse($repDict): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response + protected function sendFinalAnnounceResponse($repDict): \Illuminate\Http\Response { return \response(Bencode::bencode($repDict)) ->withHeaders(['Content-Type' => 'text/plain; charset=utf-8']) @@ -524,9 +522,8 @@ protected function sendFinalAnnounceResponse($repDict): \Illuminate\Contracts\Ro * @param $peers * @param $compact * @param $noPeerId - * @param int $filterFlag */ - private function givePeers($peers, $compact, $noPeerId, $filterFlag = FILTER_FLAG_IPV4): string|array + private function givePeers($peers, $compact, $noPeerId, int $filterFlag = FILTER_FLAG_IPV4): string|array { if ($compact) { $pcomp = ''; diff --git a/app/Http/Controllers/ArticleController.php b/app/Http/Controllers/ArticleController.php index 461134ceaa..479b2665b4 100644 --- a/app/Http/Controllers/ArticleController.php +++ b/app/Http/Controllers/ArticleController.php @@ -32,10 +32,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show A Article. - * - * @param \App\Models\Article $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Article $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $article = Article::with(['user', 'comments'])->findOrFail($id); diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index f7b972b069..a26c0408e5 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -26,7 +26,7 @@ public function __construct() $this->middleware('guest'); } - protected function validateEmail(Request $request) + protected function validateEmail(Request $request): void { if (\config('captcha.enabled') == false) { $request->validate(['email' => 'required|email']); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 09330f27c9..072aa912ef 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -23,13 +23,13 @@ class LoginController extends Controller use AuthenticatesUsers; // Upon Successful Login - protected $redirectTo = '/'; + protected string $redirectTo = '/'; // Max Attempts Until Lockout - public $maxAttempts = 3; + public int $maxAttempts = 3; // Minutes Lockout - public $decayMinutes = 60; + public int $decayMinutes = 60; /** * LoginController Constructor. @@ -39,7 +39,7 @@ public function __construct() $this->middleware('guest', ['except' => 'logout']); } - public function username() + public function username(): string { return 'username'; } @@ -50,7 +50,7 @@ public function username() * * @throws \Illuminate\Validation\ValidationException */ - protected function validateLogin(Request $request) + protected function validateLogin(Request $request): void { if (\config('captcha.enabled') == true) { $this->validate($request, [ diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index fc74aca8e0..2a278221a3 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -23,14 +23,14 @@ class ResetPasswordController extends Controller { use ResetsPasswords; - protected $redirectTo = '/'; + protected string $redirectTo = '/'; public function __construct() { $this->middleware('guest'); } - protected function resetPassword($user, $password) + protected function resetPassword($user, $password): void { $validatingGroup = \cache()->rememberForever('validating_group', fn () => Group::where('slug', '=', 'validating')->pluck('id')); $memberGroup = \cache()->rememberForever('member_group', fn () => Group::where('slug', '=', 'user')->pluck('id')); diff --git a/app/Http/Controllers/Auth/TwoStepController.php b/app/Http/Controllers/Auth/TwoStepController.php index 98a177fc6d..61bc9e0505 100644 --- a/app/Http/Controllers/Auth/TwoStepController.php +++ b/app/Http/Controllers/Auth/TwoStepController.php @@ -33,7 +33,7 @@ class TwoStepController extends Controller private $remainingAttempts; - private $user; + private ?\Illuminate\Contracts\Auth\Authenticatable $user = null; /** * Create a new controller instance. @@ -53,10 +53,8 @@ public function __construct() /** * Set the User2Step Variables. - * - * @return void */ - private function setUser2StepData() + private function setUser2StepData(): void { $user = \auth()->user(); $twoStepAuth = $this->getTwoStepAuthStatus($user->id); @@ -70,12 +68,8 @@ private function setUser2StepData() /** * Validation and Invalid code failed actions and return message. - * - * @param null $errors (optional) - * - * @return array */ - private function invalidCodeReturnData($errors = null) + private function invalidCodeReturnData($errors = null): array { $this->authCount = ++$this->twoStepAuth->authCount; $this->twoStepAuth->save(); @@ -98,7 +92,7 @@ private function invalidCodeReturnData($errors = null) * * @throws \Exception */ - public function showVerification(): \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function showVerification(): \Illuminate\Contracts\View\View { if (! \config('auth.TwoStepEnabled')) { \abort(404); @@ -200,10 +194,8 @@ public function verify(Request $request) /** * Resend the validation code triggered by user. - * - * @return \Illuminate\Http\JsonResponse */ - public function resend() + public function resend(): \Illuminate\Http\JsonResponse { if (! \config('auth.TwoStepEnabled')) { \abort(404); diff --git a/app/Http/Controllers/BonusController.php b/app/Http/Controllers/BonusController.php index 401eb8c7de..dcc89507d4 100644 --- a/app/Http/Controllers/BonusController.php +++ b/app/Http/Controllers/BonusController.php @@ -126,10 +126,8 @@ public function gift(Request $request): \Illuminate\Contracts\View\Factory|\Illu /** * Show Bonus Earnings System. - * - * @param string $username */ - public function bonus(Request $request, $username = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function bonus(Request $request, string $username = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $userbon = $request->user()->getSeedbonus(); @@ -196,11 +194,10 @@ public function bonus(Request $request, $username = ''): \Illuminate\Contracts\V /** * Exchange Points For A Item. * - * @param \App\Models\BonExchange $id * * @return \Illuminate\Http\RedirectResponse */ - public function exchange(Request $request, $id) + public function exchange(Request $request, \App\Models\BonExchange $id) { $user = $request->user(); $userbon = $user->seedbonus; @@ -228,11 +225,8 @@ public function exchange(Request $request, $id) /** * Do Item Exchange. - * - * @param \App\Models\User $userID - * @param \App\Models\BonExchange $itemID */ - public function doItemExchange($userID, $itemID): bool + public function doItemExchange(\App\Models\User $userID, \App\Models\BonExchange $itemID): bool { $current = Carbon::now(); $item = BonExchange::where('id', '=', $itemID)->get()->toArray()[0]; @@ -381,11 +375,10 @@ public function sendGift(Request $request) /** * Tip Points To A Uploader. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function tipUploader(Request $request, $id) + public function tipUploader(Request $request, \App\Models\Torrent $id) { $user = $request->user(); $torrent = Torrent::withAnyStatus()->findOrFail($id); @@ -488,10 +481,8 @@ public function tipPoster(Request $request) /** * @method getDyingCount - * - * @return int */ - public function getDyingCount(Request $request) + public function getDyingCount(Request $request): int { $user = $request->user(); @@ -507,10 +498,8 @@ public function getDyingCount(Request $request) /** * @method getLegendaryCount - * - * @return int */ - public function getLegendaryCount(Request $request) + public function getLegendaryCount(Request $request): int { $user = $request->user(); @@ -526,10 +515,8 @@ public function getLegendaryCount(Request $request) /** * @method getOldCount - * - * @return int */ - public function getOldCount(Request $request) + public function getOldCount(Request $request): int { $user = $request->user(); @@ -546,10 +533,8 @@ public function getOldCount(Request $request) /** * @method getHugeCount - * - * @return int */ - public function getHugeCount(Request $request) + public function getHugeCount(Request $request): int { $user = $request->user(); @@ -564,10 +549,8 @@ public function getHugeCount(Request $request) /** * @method getLargeCount - * - * @return int */ - public function getLargeCount(Request $request) + public function getLargeCount(Request $request): int { $user = $request->user(); @@ -583,10 +566,8 @@ public function getLargeCount(Request $request) /** * @method getRegularCount - * - * @return int */ - public function getRegularCount(Request $request) + public function getRegularCount(Request $request): int { $user = $request->user(); @@ -602,10 +583,8 @@ public function getRegularCount(Request $request) /** * @method getParticipaintSeedCount - * - * @return int */ - public function getParticipaintSeedCount(Request $request) + public function getParticipaintSeedCount(Request $request): int { $user = $request->user(); @@ -621,10 +600,8 @@ public function getParticipaintSeedCount(Request $request) /** * @method getParticipaintSeedCount - * - * @return int */ - public function getTeamPlayerSeedCount(Request $request) + public function getTeamPlayerSeedCount(Request $request): int { $user = $request->user(); @@ -640,10 +617,8 @@ public function getTeamPlayerSeedCount(Request $request) /** * @method getParticipaintSeedCount - * - * @return int */ - public function getCommitedSeedCount(Request $request) + public function getCommitedSeedCount(Request $request): int { $user = $request->user(); @@ -659,10 +634,8 @@ public function getCommitedSeedCount(Request $request) /** * @method getParticipaintSeedCount - * - * @return int */ - public function getMVPSeedCount(Request $request) + public function getMVPSeedCount(Request $request): int { $user = $request->user(); @@ -678,10 +651,8 @@ public function getMVPSeedCount(Request $request) /** * @method getParticipaintSeedCount - * - * @return int */ - public function getLegendarySeedCount(Request $request) + public function getLegendarySeedCount(Request $request): int { $user = $request->user(); diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index db169644e0..cccf7db520 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -160,11 +160,10 @@ public function collection(Request $request, $id) /** * Store A New Comment To A Article. * - * @param \App\Models\Article $id * * @return \Illuminate\Http\RedirectResponse */ - public function article(Request $request, $id) + public function article(Request $request, \App\Models\Article $id) { $article = Article::findOrFail($id); $user = $request->user(); @@ -262,11 +261,10 @@ public function article(Request $request, $id) /** * Store A New Comment To A Playlist. * - * @param \App\Models\Playlist $id * * @return \Illuminate\Http\RedirectResponse */ - public function playlist(Request $request, $id) + public function playlist(Request $request, \App\Models\Playlist $id) { $playlist = Playlist::findOrFail($id); $user = $request->user(); @@ -364,11 +362,10 @@ public function playlist(Request $request, $id) /** * Store A New Comment To A Torrent. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function torrent(Request $request, $id) + public function torrent(Request $request, \App\Models\Torrent $id) { $torrent = Torrent::findOrFail($id); $user = $request->user(); @@ -471,11 +468,10 @@ public function torrent(Request $request, $id) /** * Store A New Comment To A Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function request(Request $request, $id) + public function request(Request $request, \App\Models\TorrentRequest $id) { $tr = TorrentRequest::findOrFail($id); $user = $request->user(); @@ -578,11 +574,10 @@ public function request(Request $request, $id) /** * Store A New Comment To A Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function ticket(Request $request, $id) + public function ticket(Request $request, \App\Models\TorrentRequest $id) { $ticket = Ticket::findOrFail($id); $user = $request->user(); @@ -630,11 +625,10 @@ public function ticket(Request $request, $id) /** * Store A New Comment To A Torrent Via Quick Thanks. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function quickthanks(Request $request, $id) + public function quickthanks(Request $request, \App\Models\Torrent $id) { $torrent = Torrent::findOrFail($id); $user = $request->user(); @@ -753,10 +747,8 @@ public function editComment(Request $request, $commentId) * Delete A Comment. * * @param $commentId - * - * @return \Illuminate\Http\RedirectResponse */ - public function deleteComment(Request $request, $commentId) + public function deleteComment(Request $request, $commentId): \Illuminate\Http\RedirectResponse { $user = $request->user(); $comment = Comment::findOrFail($commentId); diff --git a/app/Http/Controllers/ContactController.php b/app/Http/Controllers/ContactController.php index 3f7e2b7500..068c88fcf0 100644 --- a/app/Http/Controllers/ContactController.php +++ b/app/Http/Controllers/ContactController.php @@ -34,10 +34,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Send A Contact Email To Owner/First User. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request) + public function store(Request $request): \Illuminate\Http\RedirectResponse { // Fetch owner account $user = User::where('username', \config('unit3d.owner-username'))->first(); diff --git a/app/Http/Controllers/FollowController.php b/app/Http/Controllers/FollowController.php index bf16b74286..ffaeadee10 100644 --- a/app/Http/Controllers/FollowController.php +++ b/app/Http/Controllers/FollowController.php @@ -27,11 +27,10 @@ class FollowController extends Controller /** * Follow A User. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, $username) + public function store(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -60,11 +59,10 @@ public function store(Request $request, $username) /** * Un Follow A User. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $username) + public function destroy(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); diff --git a/app/Http/Controllers/ForumCategoryController.php b/app/Http/Controllers/ForumCategoryController.php index 232ba6fa23..d9fe731537 100644 --- a/app/Http/Controllers/ForumCategoryController.php +++ b/app/Http/Controllers/ForumCategoryController.php @@ -24,10 +24,8 @@ class ForumCategoryController extends Controller { /** * Show The Forum Category. - * - * @param \App\Models\Forum $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Forum $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { // Find the topic $forum = Forum::findOrFail($id); diff --git a/app/Http/Controllers/ForumController.php b/app/Http/Controllers/ForumController.php index e053bcb76f..9a884a0bb5 100644 --- a/app/Http/Controllers/ForumController.php +++ b/app/Http/Controllers/ForumController.php @@ -310,10 +310,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show Forums And Topics Inside. - * - * @param \App\Models\Forum $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse + public function show(\App\Models\Forum $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse { // Find the topic $forum = Forum::findOrFail($id); diff --git a/app/Http/Controllers/GraveyardController.php b/app/Http/Controllers/GraveyardController.php index ac18a538d8..9e7bc35c35 100644 --- a/app/Http/Controllers/GraveyardController.php +++ b/app/Http/Controllers/GraveyardController.php @@ -33,11 +33,10 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Resurrect A Torrent. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, $id) + public function store(Request $request, \App\Models\Torrent $id) { $user = $request->user(); $torrent = Torrent::findOrFail($id); @@ -78,13 +77,11 @@ public function store(Request $request, $id) /** * Cancel A Ressurection. * - * @param int $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, int $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $resurrection = Graveyard::findOrFail($id); diff --git a/app/Http/Controllers/ImageController.php b/app/Http/Controllers/ImageController.php index 9c838fc45a..635023e04b 100644 --- a/app/Http/Controllers/ImageController.php +++ b/app/Http/Controllers/ImageController.php @@ -24,10 +24,8 @@ class ImageController extends Controller { /** * Show Image Create Form. - * - * @param \App\Models\Album $id */ - public function create($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function create(\App\Models\Album $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $album = Album::find($id); @@ -78,11 +76,9 @@ public function store(Request $request) /** * Download A Image. * - * @param \App\Models\Image $id * - * @return \Illuminate\Http\RedirectResponse */ - public function download($id) + public function download(\App\Models\Image $id): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse { $image = Image::findOrFail($id); $filename = $image->image; @@ -101,13 +97,11 @@ public function download($id) /** * Delete A Image. * - * @param \App\Models\Image $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Image $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $image = Image::findOrFail($id); diff --git a/app/Http/Controllers/InviteController.php b/app/Http/Controllers/InviteController.php index 034dc7fcd2..1d9efca05d 100644 --- a/app/Http/Controllers/InviteController.php +++ b/app/Http/Controllers/InviteController.php @@ -28,10 +28,8 @@ class InviteController extends Controller { /** * Invite Tree. - * - * @param \App\Models\User $username */ - public function index(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function index(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $owner = User::where('username', '=', $username)->firstOrFail(); @@ -134,11 +132,10 @@ public function store(Request $request) /** * Resend Invite. * - * @param \App\Models\Invite $id * * @return \Illuminate\Http\RedirectResponse */ - public function send(Request $request, $id) + public function send(Request $request, \App\Models\Invite $id) { $user = $request->user(); $invite = Invite::findOrFail($id); diff --git a/app/Http/Controllers/MediaHub/CollectionController.php b/app/Http/Controllers/MediaHub/CollectionController.php index dfd9ce9b1b..3e89a9fc4d 100644 --- a/app/Http/Controllers/MediaHub/CollectionController.php +++ b/app/Http/Controllers/MediaHub/CollectionController.php @@ -28,10 +28,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Display the specified resource. - * - * @param int $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $collection = Collection::with(['movie', 'comments'])->findOrFail($id); diff --git a/app/Http/Controllers/MissingController.php b/app/Http/Controllers/MissingController.php index 4773070965..813fd42f9a 100644 --- a/app/Http/Controllers/MissingController.php +++ b/app/Http/Controllers/MissingController.php @@ -18,7 +18,7 @@ class MissingController extends Controller /** * Display a listing of the resource. */ - final public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Contracts\Foundation\Application + final public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { return \view('missing.index'); } diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php index fe0249f626..76908061aa 100644 --- a/app/Http/Controllers/NotificationController.php +++ b/app/Http/Controllers/NotificationController.php @@ -36,10 +36,8 @@ public function index(Request $request): \Illuminate\Contracts\View\Factory|\Ill * * * @throws \Throwable - * - * @return array */ - public function faceted(Request $request) + public function faceted(Request $request): string { $user = $request->user(); @@ -132,11 +130,9 @@ public function faceted(Request $request) /** * Show A Notification And Mark As Read. * - * @param \App\Models\Notification $id * - * @return \Illuminate\Http\RedirectResponse */ - public function show(Request $request, $id) + public function show(Request $request, \App\Models\Notification $id): \Illuminate\Http\RedirectResponse { $notification = $request->user()->notifications()->findOrFail($id); $notification->markAsRead(); @@ -148,11 +144,10 @@ public function show(Request $request, $id) /** * Set A Notification To Read. * - * @param \App\Models\Notification $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Notification $id) { $notification = $request->user()->notifications()->where('id', '=', $id)->first(); @@ -177,10 +172,8 @@ public function update(Request $request, $id) * * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function updateAll(Request $request) + public function updateAll(Request $request): \Illuminate\Http\RedirectResponse { $carbon = new Carbon(); $request->user()->unreadNotifications()->update(['read_at' => $carbon]); @@ -192,11 +185,9 @@ public function updateAll(Request $request) /** * Delete A Notification. * - * @param \App\Models\Notification $id * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Notification $id): \Illuminate\Http\RedirectResponse { $request->user()->notifications()->findOrFail($id)->delete(); @@ -207,10 +198,8 @@ public function destroy(Request $request, $id) /** * Mass Delete All Notification's. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function destroyAll(Request $request) + public function destroyAll(Request $request): \Illuminate\Http\RedirectResponse { $request->user()->notifications()->delete(); diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index b7660f3c1a..136d89296a 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -34,10 +34,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show A Page. - * - * @param \App\Models\Page $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Page $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $page = Page::findOrFail($id); diff --git a/app/Http/Controllers/PlaylistController.php b/app/Http/Controllers/PlaylistController.php index 23140a6d3e..79ecda6b62 100644 --- a/app/Http/Controllers/PlaylistController.php +++ b/app/Http/Controllers/PlaylistController.php @@ -225,10 +225,8 @@ public function update(Request $request, $id) * @param \App\Playlist $id * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy($id): \Illuminate\Http\RedirectResponse { $user = \auth()->user(); $playlist = Playlist::with('torrents')->findOrFail($id); diff --git a/app/Http/Controllers/PlaylistTorrentController.php b/app/Http/Controllers/PlaylistTorrentController.php index bf783ab237..b128ca615c 100644 --- a/app/Http/Controllers/PlaylistTorrentController.php +++ b/app/Http/Controllers/PlaylistTorrentController.php @@ -58,13 +58,11 @@ public function store(Request $request) /** * Detach A Torrent From A Playlist. * - * @param int $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(int $id): \Illuminate\Http\RedirectResponse { $user = \auth()->user(); $playlistTorrent = PlaylistTorrent::findOrFail($id); diff --git a/app/Http/Controllers/PollController.php b/app/Http/Controllers/PollController.php index 2e68a24dd0..432a7a735d 100644 --- a/app/Http/Controllers/PollController.php +++ b/app/Http/Controllers/PollController.php @@ -44,10 +44,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show A Poll. - * - * @param \App\Models\Poll $id */ - public function show(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse + public function show(Request $request, \App\Models\Poll $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse { $poll = Poll::findOrFail($id); $user = $request->user(); @@ -103,10 +101,8 @@ public function vote(VoteOnPoll $voteOnPoll) /** * Show A Polls Results. - * - * @param \App\Models\Poll $id */ - public function result($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function result(\App\Models\Poll $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $poll = Poll::findOrFail($id); $map = [ diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php index 8a6647c3ae..46d18eac14 100644 --- a/app/Http/Controllers/PostController.php +++ b/app/Http/Controllers/PostController.php @@ -47,11 +47,10 @@ public function __construct(private TaggedUserRepository $taggedUserRepository, /** * Store A New Post To A Topic. * - * @param \App\Models\Topic $id * * @return \Illuminate\Http\RedirectResponse */ - public function reply(Request $request, $id) + public function reply(Request $request, \App\Models\Topic $id) { $user = $request->user(); $topic = Topic::findOrFail($id); @@ -169,11 +168,8 @@ public function reply(Request $request, $id) /** * Edit Post Form. - * - * @param \App\Models\Topic $id - * @param \App\Models\Post $postId */ - public function postEditForm($id, $postId): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function postEditForm(\App\Models\Topic $id, \App\Models\Post $postId): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $topic = Topic::findOrFail($id); $forum = $topic->forum; @@ -191,11 +187,9 @@ public function postEditForm($id, $postId): \Illuminate\Contracts\View\Factory|\ /** * Edit A Post In A Topic. * - * @param \App\Models\Post $postId * - * @return \Illuminate\Http\RedirectResponse */ - public function postEdit(Request $request, $postId) + public function postEdit(Request $request, \App\Models\Post $postId): \Illuminate\Http\RedirectResponse { $user = $request->user(); $post = Post::findOrFail($postId); @@ -212,13 +206,11 @@ public function postEdit(Request $request, $postId) /** * Delete A Post. * - * @param \App\Models\Post $postId * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function postDelete(Request $request, $postId) + public function postDelete(Request $request, \App\Models\Post $postId): \Illuminate\Http\RedirectResponse { $user = $request->user(); $post = Post::with('topic')->findOrFail($postId); diff --git a/app/Http/Controllers/PrivateMessageController.php b/app/Http/Controllers/PrivateMessageController.php index c80bdb0208..682898c160 100644 --- a/app/Http/Controllers/PrivateMessageController.php +++ b/app/Http/Controllers/PrivateMessageController.php @@ -72,10 +72,8 @@ public function getPrivateMessagesSent(Request $request): \Illuminate\Contracts\ /** * View A Message. - * - * @param \App\Models\PrivateMessage $id */ - public function getPrivateMessageById(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function getPrivateMessageById(Request $request, \App\Models\PrivateMessage $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $pm = PrivateMessage::findOrFail($id); @@ -95,11 +93,8 @@ public function getPrivateMessageById(Request $request, $id): \Illuminate\Contra /** * Create Message Form. - * - * @param string $receiverId - * @param string $username */ - public function makePrivateMessage(Request $request, $receiverId = '', $username = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function makePrivateMessage(Request $request, string $receiverId = '', string $username = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); @@ -166,11 +161,10 @@ public function sendPrivateMessage(Request $request) /** * Reply To A Message. * - * @param \App\Models\PrivateMessage $id * * @return \Illuminate\Http\RedirectResponse */ - public function replyPrivateMessage(Request $request, $id) + public function replyPrivateMessage(Request $request, \App\Models\PrivateMessage $id) { $user = $request->user(); @@ -207,13 +201,11 @@ public function replyPrivateMessage(Request $request, $id) /** * Delete A Message. * - * @param \App\Models\PrivateMessage $id * * @throws \Exception - * * @return \Illuminate\Http\RedirectResponse */ - public function deletePrivateMessage(Request $request, $id) + public function deletePrivateMessage(Request $request, \App\Models\PrivateMessage $id) { $user = $request->user(); $pm = PrivateMessage::where('id', '=', $id)->firstOrFail(); @@ -241,10 +233,8 @@ public function deletePrivateMessage(Request $request, $id) /** * Empty Private Message Inbox. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function emptyInbox(Request $request) + public function emptyInbox(Request $request): \Illuminate\Http\RedirectResponse { $user = $request->user(); PrivateMessage::where('receiver_id', '=', $user->id)->delete(); @@ -256,10 +246,8 @@ public function emptyInbox(Request $request) /** * Mark All Messages As Read. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function markAllAsRead(Request $request) + public function markAllAsRead(Request $request): \Illuminate\Http\RedirectResponse { $user = $request->user(); foreach (PrivateMessage::where('receiver_id', '=', $user->id)->get() as $pm) { diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 33c32634ba..d1f355e0e2 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -34,11 +34,10 @@ public function __construct(private Report $report) /** * Create A Request Report. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function request(Request $request, $id) + public function request(Request $request, \App\Models\TorrentRequest $id) { $torrentRequest = TorrentRequest::findOrFail($id); $reportedBy = $request->user(); @@ -71,11 +70,10 @@ public function request(Request $request, $id) /** * Create A Torrent Report. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function torrent(Request $request, $id) + public function torrent(Request $request, \App\Models\Torrent $id) { $torrent = Torrent::findOrFail($id); $reportedBy = $request->user(); @@ -108,11 +106,10 @@ public function torrent(Request $request, $id) /** * Create A User Report. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function user(Request $request, $username) + public function user(Request $request, \App\Models\User $username) { $reportedUser = User::where('username', '=', $username)->firstOrFail(); $reportedBy = $request->user(); diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php index ff403e7c66..29371b7a9d 100644 --- a/app/Http/Controllers/RequestController.php +++ b/app/Http/Controllers/RequestController.php @@ -62,10 +62,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Display The Torrent Request. - * - * @param \App\Models\TorrentRequest $id */ - public function request(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function request(Request $request, \App\Models\TorrentRequest $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrentRequest = TorrentRequest::findOrFail($id); $user = $request->user(); @@ -103,12 +101,8 @@ public function request(Request $request, $id): \Illuminate\Contracts\View\Facto /** * Torrent Request Add Form. - * - * @param string $title - * @param int $imdb - * @param int $tmdb */ - public function addRequestForm(Request $request, $title = '', $imdb = 0, $tmdb = 0): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function addRequestForm(Request $request, string $title = '', int $imdb = 0, int $tmdb = 0): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); @@ -217,10 +211,8 @@ public function addrequest(Request $request) /** * Torrent Request Edit Form. - * - * @param \App\Models\TorrentRequest $id */ - public function editRequestForm(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function editRequestForm(Request $request, \App\Models\TorrentRequest $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $torrentRequest = TorrentRequest::findOrFail($id); @@ -236,11 +228,10 @@ public function editRequestForm(Request $request, $id): \Illuminate\Contracts\Vi /** * Edit A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function editrequest(Request $request, $id) + public function editrequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); $torrentRequest = TorrentRequest::findOrFail($id); @@ -308,11 +299,10 @@ public function editrequest(Request $request, $id) /** * Add Bounty To A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function addBonus(Request $request, $id) + public function addBonus(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); @@ -373,11 +363,10 @@ public function addBonus(Request $request, $id) /** * Fill A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function fillRequest(Request $request, $id) + public function fillRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); @@ -419,11 +408,10 @@ public function fillRequest(Request $request, $id) /** * Approve A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function approveRequest(Request $request, $id) + public function approveRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); @@ -496,11 +484,10 @@ public function approveRequest(Request $request, $id) /** * Reject A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function rejectRequest(Request $request, $id) + public function rejectRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); $torrentRequest = TorrentRequest::findOrFail($id); @@ -532,13 +519,11 @@ public function rejectRequest(Request $request, $id) /** * Delete A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @throws \Exception - * * @return \Illuminate\Http\RedirectResponse */ - public function deleteRequest(Request $request, $id) + public function deleteRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); $torrentRequest = TorrentRequest::findOrFail($id); @@ -558,11 +543,10 @@ public function deleteRequest(Request $request, $id) /** * Claim A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @return \Illuminate\Http\RedirectResponse */ - public function claimRequest(Request $request, $id) + public function claimRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); $torrentRequest = TorrentRequest::with('user')->findOrFail($id); @@ -595,13 +579,11 @@ public function claimRequest(Request $request, $id) /** * Uncliam A Torrent Request. * - * @param \App\Models\TorrentRequest $id * * @throws \Exception - * * @return \Illuminate\Http\RedirectResponse */ - public function unclaimRequest(Request $request, $id) + public function unclaimRequest(Request $request, \App\Models\TorrentRequest $id) { $user = $request->user(); $torrentRequest = TorrentRequest::findOrFail($id); @@ -635,11 +617,9 @@ public function unclaimRequest(Request $request, $id) /** * Resets the filled and approved attributes on a given request. * - * @param \App\Models\TorrentRequest $id * - * @return \Illuminate\Http\RedirectResponse */ - public function resetRequest(Request $request, $id) + public function resetRequest(Request $request, \App\Models\TorrentRequest $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); \abort_unless($user->group->is_modo, 403); diff --git a/app/Http/Controllers/RssController.php b/app/Http/Controllers/RssController.php index 5485b49e61..82f098c6bb 100644 --- a/app/Http/Controllers/RssController.php +++ b/app/Http/Controllers/RssController.php @@ -31,8 +31,6 @@ class RssController extends Controller { /** * Display a listing of the RSS resource. - * - * @param null $hash */ public function index(Request $request, $hash = null): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { @@ -141,14 +139,11 @@ public function store(Request $request): \Illuminate\Http\RedirectResponse|\Illu /** * Display the specified RSS resource. * - * @param int $id - * @param string $rsskey * * @throws \Exception * - * @return \Illuminate\Http\Response */ - public function show($id, $rsskey) + public function show(int $id, string $rsskey): array|\Illuminate\Http\Response { $user = User::where('rsskey', '=', $rsskey)->firstOrFail(); @@ -324,10 +319,8 @@ public function show($id, $rsskey) /** * Show the form for editing the specified RSS resource. - * - * @param int $id */ - public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(Request $request, int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $rss = Rss::where('is_private', '=', 1)->findOrFail($id); @@ -345,10 +338,8 @@ public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory| /** * Update the specified RSS resource in storage. - * - * @param int $id */ - public function update(Request $request, $id): \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response + public function update(Request $request, int $id): \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response { $rss = Rss::where('is_private', '=', 1)->findOrFail($id); @@ -417,13 +408,11 @@ public function update(Request $request, $id): \Illuminate\Http\RedirectResponse /** * Remove the specified RSS resource from storage. * - * @param int $id * * @throws \Exception * - * @return \Illuminate\Http\Response */ - public function destroy($id) + public function destroy(int $id): \Illuminate\Http\Response { $rss = Rss::where('is_private', '=', 1)->findOrFail($id); $rss->delete(); diff --git a/app/Http/Controllers/SeedboxController.php b/app/Http/Controllers/SeedboxController.php index 60207c7a6e..b329ee2fd3 100644 --- a/app/Http/Controllers/SeedboxController.php +++ b/app/Http/Controllers/SeedboxController.php @@ -24,10 +24,8 @@ class SeedboxController extends Controller { /** * Get A Users Registered Seedboxes. - * - * @param \App\Models\User $username */ - public function index(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function index(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -72,13 +70,11 @@ protected function store(Request $request) /** * Delete A Seedbox. * - * @param \App\Models\Seedbox $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - protected function destroy(Request $request, $id) + protected function destroy(Request $request, \App\Models\Seedbox $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $seedbox = Seedbox::findOrFail($id); diff --git a/app/Http/Controllers/Staff/ApplicationController.php b/app/Http/Controllers/Staff/ApplicationController.php index 2065ed30c5..65b4b3d9e1 100644 --- a/app/Http/Controllers/Staff/ApplicationController.php +++ b/app/Http/Controllers/Staff/ApplicationController.php @@ -43,10 +43,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Get A Application. - * - * @param \App\Models\Application $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Application $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $application = Application::withAnyStatus()->with(['user', 'moderated', 'imageProofs', 'urlProofs'])->findOrFail($id); @@ -56,13 +54,11 @@ public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Approve A Application. * - * @param \App\Models\Application $id * * @throws \Exception - * * @return \Illuminate\Http\RedirectResponse */ - public function approve(Request $request, $id) + public function approve(Request $request, \App\Models\Application $id) { $application = Application::withAnyStatus()->findOrFail($id); @@ -110,11 +106,10 @@ public function approve(Request $request, $id) /** * Reject A Application. * - * @param \App\Models\Application $id * * @return \Illuminate\Http\RedirectResponse */ - public function reject(Request $request, $id) + public function reject(Request $request, \App\Models\Application $id) { $application = Application::withAnyStatus()->findOrFail($id); diff --git a/app/Http/Controllers/Staff/ArticleController.php b/app/Http/Controllers/Staff/ArticleController.php index a18da38d10..3f4b19fe30 100644 --- a/app/Http/Controllers/Staff/ArticleController.php +++ b/app/Http/Controllers/Staff/ArticleController.php @@ -87,10 +87,8 @@ public function store(Request $request) /** * Article Edit Form. - * - * @param \App\Models\Article $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\Article $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $article = Article::findOrFail($id); @@ -100,11 +98,10 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Edit A Article. * - * @param \App\Models\Article $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Article $id) { $article = Article::findOrFail($id); $article->title = $request->input('title'); @@ -142,13 +139,11 @@ public function update(Request $request, $id) /** * Delete A Article. * - * @param \App\Models\Article $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Article $id): \Illuminate\Http\RedirectResponse { $article = Article::with('comments')->findOrFail($id); foreach ($article->comments as $comment) { diff --git a/app/Http/Controllers/Staff/AuditController.php b/app/Http/Controllers/Staff/AuditController.php index 63623e0df2..a97fd6cd79 100644 --- a/app/Http/Controllers/Staff/AuditController.php +++ b/app/Http/Controllers/Staff/AuditController.php @@ -35,13 +35,11 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Delete A Audit. * - * @param \App\Models\Audit $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Audit $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $audit = Audit::findOrFail($id); diff --git a/app/Http/Controllers/Staff/BanController.php b/app/Http/Controllers/Staff/BanController.php index d3a2c815a7..e85ff908f1 100644 --- a/app/Http/Controllers/Staff/BanController.php +++ b/app/Http/Controllers/Staff/BanController.php @@ -41,13 +41,11 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Ban A User (current_group -> banned). * - * @param \App\Models\User $username * * @throws \Exception - * * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, $username) + public function store(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); $staff = $request->user(); @@ -89,11 +87,10 @@ public function store(Request $request, $username) /** * Unban A User (banned -> new_group). * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $username) + public function update(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); $staff = $request->user(); diff --git a/app/Http/Controllers/Staff/CategoryController.php b/app/Http/Controllers/Staff/CategoryController.php index 81cb62f032..eabaaf4fa4 100644 --- a/app/Http/Controllers/Staff/CategoryController.php +++ b/app/Http/Controllers/Staff/CategoryController.php @@ -96,10 +96,8 @@ public function store(Request $request) /** * Category Edit Form. - * - * @param \App\Models\Category $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\Category $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $category = Category::findOrFail($id); @@ -109,11 +107,10 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Update A Category. * - * @param \App\Models\Category $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Category $id) { $category = Category::findOrFail($id); $category->name = $request->input('name'); @@ -160,13 +157,11 @@ public function update(Request $request, $id) /** * Destroy A Category. * - * @param \App\Models\Category $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Category $id): \Illuminate\Http\RedirectResponse { $category = Category::findOrFail($id); $category->delete(); diff --git a/app/Http/Controllers/Staff/ChatBotController.php b/app/Http/Controllers/Staff/ChatBotController.php index ea9e2961dd..f5b9cac938 100644 --- a/app/Http/Controllers/Staff/ChatBotController.php +++ b/app/Http/Controllers/Staff/ChatBotController.php @@ -25,10 +25,8 @@ class ChatBotController extends Controller { /** * Display a listing of the Bots resource. - * - * @param null $hash */ - public function index($hash = null): \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function index($hash = null): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $bots = Bot::orderBy('position', 'ASC')->get(); @@ -39,10 +37,8 @@ public function index($hash = null): \Illuminate\Contracts\Foundation\Applicatio /** * Show the form for editing the specified Bot resource. - * - * @param int $id */ - public function edit(Request $request, $id): \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(Request $request, int $id): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $user = $request->user(); $bot = Bot::findOrFail($id); @@ -56,11 +52,10 @@ public function edit(Request $request, $id): \Illuminate\Contracts\Foundation\Ap /** * Update the specified Bot resource in storage. * - * @param int $id * * @return \Illuminate\Http\Response */ - public function update(Request $request, $id) + public function update(Request $request, int $id) { $user = $request->user(); $bot = Bot::findOrFail($id); @@ -127,13 +122,11 @@ public function update(Request $request, $id) /** * Remove the specified Bot resource from storage. * - * @param int $id * * @throws \Exception * - * @return \Illuminate\Http\Response */ - public function destroy($id) + public function destroy(int $id): \Illuminate\Http\Response { $bot = Bot::where('is_protected', '=', 0)->findOrFail($id); $bot->delete(); @@ -145,11 +138,9 @@ public function destroy($id) /** * Disable the specified Bot resource in storage. * - * @param int $id * - * @return \Illuminate\Http\Response */ - public function disable($id) + public function disable(int $id): \Illuminate\Http\Response { $bot = Bot::findOrFail($id); $bot->active = 0; @@ -162,11 +153,9 @@ public function disable($id) /** * Enable the specified Bot resource in storage. * - * @param int $id * - * @return \Illuminate\Http\Response */ - public function enable($id) + public function enable(int $id): \Illuminate\Http\Response { $bot = Bot::findOrFail($id); $bot->active = 1; diff --git a/app/Http/Controllers/Staff/ChatRoomController.php b/app/Http/Controllers/Staff/ChatRoomController.php index a9b5350618..bce3f3412d 100644 --- a/app/Http/Controllers/Staff/ChatRoomController.php +++ b/app/Http/Controllers/Staff/ChatRoomController.php @@ -72,11 +72,10 @@ public function store(Request $request) /** * Update A Chatroom. * - * @param \App\Models\Chatroom $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Chatroom $id) { $chatroom = Chatroom::findOrFail($id); $chatroom->name = $request->input('name'); @@ -99,13 +98,11 @@ public function update(Request $request, $id) /** * Delete A Chatroom. * - * @param \App\Models\Chatroom $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Chatroom $id): \Illuminate\Http\RedirectResponse { $chatroom = Chatroom::findOrFail($id); $users = User::where('chatroom_id', '=', $id)->get(); diff --git a/app/Http/Controllers/Staff/ChatStatusController.php b/app/Http/Controllers/Staff/ChatStatusController.php index 93ab46cbf6..f0266b0378 100644 --- a/app/Http/Controllers/Staff/ChatStatusController.php +++ b/app/Http/Controllers/Staff/ChatStatusController.php @@ -75,11 +75,10 @@ public function store(Request $request) /** * Update A Chat Status. * - * @param \App\Models\ChatStatus $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\ChatStatus $id) { $chatstatus = ChatStatus::findOrFail($id); $chatstatus->name = $request->input('name'); @@ -106,13 +105,11 @@ public function update(Request $request, $id) /** * Delete A Chat Status. * - * @param \App\Models\ChatStatus $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\ChatStatus $id): \Illuminate\Http\RedirectResponse { $chatstatus = ChatStatus::findOrFail($id); $chatstatus->delete(); diff --git a/app/Http/Controllers/Staff/FlushController.php b/app/Http/Controllers/Staff/FlushController.php index ddf3f9550a..09c71b4d63 100644 --- a/app/Http/Controllers/Staff/FlushController.php +++ b/app/Http/Controllers/Staff/FlushController.php @@ -37,10 +37,8 @@ public function __construct(private ChatRepository $chatRepository) * Flsuh All Old Peers From Database. * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function peers() + public function peers(): \Illuminate\Http\RedirectResponse { $carbon = new Carbon(); $peers = Peer::select(['id', 'info_hash', 'user_id', 'updated_at'])->where('updated_at', '<', $carbon->copy()->subHours(2)->toDateTimeString())->get(); @@ -63,10 +61,8 @@ public function peers() * Flush All Chat Messages. * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function chat() + public function chat(): \Illuminate\Http\RedirectResponse { foreach (Message::all() as $message) { \broadcast(new MessageDeleted($message)); diff --git a/app/Http/Controllers/Staff/ForumController.php b/app/Http/Controllers/Staff/ForumController.php index 699bdf4cd7..9fcfb40e53 100644 --- a/app/Http/Controllers/Staff/ForumController.php +++ b/app/Http/Controllers/Staff/ForumController.php @@ -55,10 +55,8 @@ public function create(Request $request): \Illuminate\Contracts\View\Factory|\Il /** * Store A New Forum. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request) + public function store(Request $request): \Illuminate\Http\RedirectResponse { $user = $request->user(); \abort_unless($user->group->is_admin, 403); @@ -103,10 +101,8 @@ public function store(Request $request) /** * Forum Edit Form. - * - * @param \App\Models\Forum $id */ - public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(Request $request, \App\Models\Forum $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); \abort_unless($user->group->is_admin, 403); @@ -125,11 +121,9 @@ public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory| /** * Edit A Forum. * - * @param \App\Models\Forum $id * - * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Forum $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); \abort_unless($user->group->is_admin, 403); @@ -175,13 +169,11 @@ public function update(Request $request, $id) /** * Delete A Forum. * - * @param \App\Models\Forum $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Forum $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); \abort_unless($user->group->is_admin, 403); diff --git a/app/Http/Controllers/Staff/GroupController.php b/app/Http/Controllers/Staff/GroupController.php index a8d866e0c4..b15a4c1969 100644 --- a/app/Http/Controllers/Staff/GroupController.php +++ b/app/Http/Controllers/Staff/GroupController.php @@ -116,10 +116,8 @@ public function store(Request $request) /** * Group Edit Form. - * - * @param \App\Models\Group $id */ - public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(Request $request, \App\Models\Group $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); \abort_unless($user->group->is_admin, 403); @@ -132,11 +130,10 @@ public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory| /** * Edit A Group. * - * @param \App\Models\Group $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Group $id) { $user = $request->user(); \abort_unless($user->group->is_admin, 403); diff --git a/app/Http/Controllers/Staff/InternalController.php b/app/Http/Controllers/Staff/InternalController.php index c401bd6ef8..d8282c8914 100644 --- a/app/Http/Controllers/Staff/InternalController.php +++ b/app/Http/Controllers/Staff/InternalController.php @@ -40,10 +40,8 @@ public function index(Request $request): \Illuminate\Contracts\View\Factory|\Ill * Edit A group. * * @param \App\Models\UsersVIP $id - * - * @return \Illuminate\Http\RedirectResponse */ - public function edit(Request $request, $id) + public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $user = $request->user(); \abort_unless($user->group->is_modo, 403); @@ -134,10 +132,8 @@ public function store(Request $request) * Delete A Internal Group. * * @param $commentId - * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $internal = Internal::findOrFail($id); diff --git a/app/Http/Controllers/Staff/MassActionController.php b/app/Http/Controllers/Staff/MassActionController.php index 18a7ec886b..5b6d8284fb 100644 --- a/app/Http/Controllers/Staff/MassActionController.php +++ b/app/Http/Controllers/Staff/MassActionController.php @@ -78,10 +78,8 @@ public function store(Request $request) * Mass Validate Unvalidated Users. * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function update() + public function update(): \Illuminate\Http\RedirectResponse { $validatingGroup = \cache()->rememberForever('validating_group', fn () => Group::where('slug', '=', 'validating')->pluck('id')); $memberGroup = \cache()->rememberForever('member_group', fn () => Group::where('slug', '=', 'user')->pluck('id')); diff --git a/app/Http/Controllers/Staff/MediaLanguageController.php b/app/Http/Controllers/Staff/MediaLanguageController.php index f320de41e3..fa58e704ce 100644 --- a/app/Http/Controllers/Staff/MediaLanguageController.php +++ b/app/Http/Controllers/Staff/MediaLanguageController.php @@ -67,10 +67,8 @@ public function store(Request $request) /** * Show the form for editing the specified resource. - * - * @param \App\Models\MediaLanguage $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\MediaLanguage $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $mediaLanguage = MediaLanguage::findOrFail($id); @@ -80,11 +78,10 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Update the specified resource in storage. * - * @param \App\Models\MediaLanguage $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\MediaLanguage $id) { $mediaLanguage = MediaLanguage::findOrFail($id); $mediaLanguage->name = $request->input('name'); @@ -109,13 +106,11 @@ public function update(Request $request, $id) /** * Remove the specified resource from storage. * - * @param \App\Models\MediaLanguage $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\MediaLanguage $id): \Illuminate\Http\RedirectResponse { $mediaLanguage = MediaLanguage::findOrFail($id); $mediaLanguage->delete(); diff --git a/app/Http/Controllers/Staff/ModerationController.php b/app/Http/Controllers/Staff/ModerationController.php index 0915de19e9..88ee13a6dc 100644 --- a/app/Http/Controllers/Staff/ModerationController.php +++ b/app/Http/Controllers/Staff/ModerationController.php @@ -54,11 +54,10 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Approve A Torrent. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function approve($id) + public function approve(\App\Models\Torrent $id) { $torrent = Torrent::withAnyStatus()->where('id', '=', $id)->first(); diff --git a/app/Http/Controllers/Staff/NoteController.php b/app/Http/Controllers/Staff/NoteController.php index 3cc43f49f3..c031c2dac9 100644 --- a/app/Http/Controllers/Staff/NoteController.php +++ b/app/Http/Controllers/Staff/NoteController.php @@ -36,11 +36,10 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Store A New User Note. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function store(Request $request, $username) + public function store(Request $request, \App\Models\User $username) { $staff = $request->user(); $user = User::where('username', '=', $username)->firstOrFail(); @@ -70,13 +69,11 @@ public function store(Request $request, $username) /** * Delete A User Note. * - * @param \App\Models\Note $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Note $id): \Illuminate\Http\RedirectResponse { $note = Note::findOrFail($id); $user = User::findOrFail($note->user_id); diff --git a/app/Http/Controllers/Staff/PageController.php b/app/Http/Controllers/Staff/PageController.php index 5c41f6ea91..5d9401fc11 100644 --- a/app/Http/Controllers/Staff/PageController.php +++ b/app/Http/Controllers/Staff/PageController.php @@ -73,10 +73,8 @@ public function store(Request $request) /** * Page Edit Form. - * - * @param \App\Models\Page $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\Page $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $page = Page::findOrFail($id); @@ -86,11 +84,10 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Edit A Page. * - * @param \App\Models\Page $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Page $id) { $page = Page::findOrFail($id); $page->name = $request->input('name'); @@ -117,13 +114,11 @@ public function update(Request $request, $id) /** * Delete A Page. * - * @param \App\Models\Page $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Page $id): \Illuminate\Http\RedirectResponse { Page::findOrFail($id)->delete(); diff --git a/app/Http/Controllers/Staff/PollController.php b/app/Http/Controllers/Staff/PollController.php index 8091e31943..9f714c59f0 100644 --- a/app/Http/Controllers/Staff/PollController.php +++ b/app/Http/Controllers/Staff/PollController.php @@ -43,10 +43,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show A Poll. - * - * @param \App\Models\Poll $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Poll $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $poll = Poll::where('id', '=', $id)->firstOrFail(); @@ -64,10 +62,8 @@ public function create(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi /** * Store A New Poll. * - * - * @return \Illuminate\Http\RedirectResponse */ - public function store(StorePoll $storePoll) + public function store(StorePoll $storePoll): \Illuminate\Http\RedirectResponse { $user = $storePoll->user(); @@ -88,10 +84,8 @@ public function store(StorePoll $storePoll) /** * Poll Edit Form. - * - * @param \App\Models\Poll $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\Poll $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $poll = Poll::findOrFail($id); @@ -104,10 +98,8 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V * @param $id * * @throws \Exception - * - * @return \Illuminate\Http\RedirectResponse */ - public function update(StorePoll $storePoll, $id) + public function update(StorePoll $storePoll, $id): \Illuminate\Http\RedirectResponse { $poll = Poll::findOrFail($id); @@ -158,13 +150,11 @@ public function update(StorePoll $storePoll, $id) /** * Delete A Poll. * - * @param \App\Models\Poll $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Poll $id): \Illuminate\Http\RedirectResponse { $poll = Poll::findOrFail($id); $poll->delete(); diff --git a/app/Http/Controllers/Staff/ReportController.php b/app/Http/Controllers/Staff/ReportController.php index 8b8893d234..569d884f21 100644 --- a/app/Http/Controllers/Staff/ReportController.php +++ b/app/Http/Controllers/Staff/ReportController.php @@ -35,10 +35,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show A Report. - * - * @param \App\Models\Report $id */ - public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\Report $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $report = Report::findOrFail($id); @@ -49,10 +47,8 @@ public function show($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Update A Report. - * - * @param \App\Models\Report $id */ - public function update(Request $request, $id): \Illuminate\Http\RedirectResponse + public function update(Request $request, \App\Models\Report $id): \Illuminate\Http\RedirectResponse { $user = \auth()->user(); diff --git a/app/Http/Controllers/Staff/ResolutionController.php b/app/Http/Controllers/Staff/ResolutionController.php index 3836c1fed8..09839230d1 100644 --- a/app/Http/Controllers/Staff/ResolutionController.php +++ b/app/Http/Controllers/Staff/ResolutionController.php @@ -117,10 +117,8 @@ public function update(Request $request, $id) * @param $id * * @throws \Exception - * - * @return Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy($id): \Illuminate\Http\RedirectResponse { $resolution = Resolution::findOrFail($id); $resolution->delete(); diff --git a/app/Http/Controllers/Staff/RssController.php b/app/Http/Controllers/Staff/RssController.php index 174d40134e..32d1eb8574 100644 --- a/app/Http/Controllers/Staff/RssController.php +++ b/app/Http/Controllers/Staff/RssController.php @@ -28,10 +28,8 @@ class RssController extends Controller { /** * Display a listing of the RSS resource. - * - * @param null $hash */ - public function index($hash = null): \Illuminate\Contracts\View\Factory|\Illuminate\Http\Response|\Illuminate\View\View + public function index($hash = null): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $publicRss = Rss::where('is_private', '=', 0)->orderBy('position', 'ASC')->get(); @@ -136,10 +134,8 @@ public function store(Request $request): \Illuminate\Http\RedirectResponse|\Illu /** * Show the form for editing the specified RSS resource. - * - * @param int $id */ - public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(Request $request, int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $rss = Rss::where('is_private', '=', 0)->findOrFail($id); @@ -156,10 +152,8 @@ public function edit(Request $request, $id): \Illuminate\Contracts\View\Factory| /** * Update the specified RSS resource in storage. - * - * @param int $id */ - public function update(Request $request, $id): \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response + public function update(Request $request, int $id): \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response { $rss = Rss::where('is_private', '=', 0)->findOrFail($id); @@ -234,13 +228,11 @@ public function update(Request $request, $id): \Illuminate\Http\RedirectResponse /** * Remove the specified RSS resource from storage. * - * @param int $id * * @throws \Exception * - * @return \Illuminate\Http\Response */ - public function destroy($id) + public function destroy(int $id): \Illuminate\Http\Response { $rss = Rss::where('is_private', '=', 0)->findOrFail($id); $rss->delete(); diff --git a/app/Http/Controllers/Staff/SeedboxController.php b/app/Http/Controllers/Staff/SeedboxController.php index 41b75384e1..bcf3dc932e 100644 --- a/app/Http/Controllers/Staff/SeedboxController.php +++ b/app/Http/Controllers/Staff/SeedboxController.php @@ -35,13 +35,11 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Delete A Registered Seedbox. * - * @param \App\Models\Seedbox $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Seedbox $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $seedbox = Seedbox::findOrFail($id); diff --git a/app/Http/Controllers/Staff/TypeController.php b/app/Http/Controllers/Staff/TypeController.php index 8efe2badd6..b6849e85df 100644 --- a/app/Http/Controllers/Staff/TypeController.php +++ b/app/Http/Controllers/Staff/TypeController.php @@ -73,10 +73,8 @@ public function store(Request $request) /** * Type Edit Form. - * - * @param \App\Models\Type $id */ - public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function edit(\App\Models\Type $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $type = Type::findOrFail($id); @@ -86,11 +84,10 @@ public function edit($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\V /** * Edit A Type. * - * @param \App\Models\Type $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Type $id) { $type = Type::findOrFail($id); $type->name = $request->input('name'); @@ -117,13 +114,11 @@ public function update(Request $request, $id) /** * Delete A Type. * - * @param \App\Models\Type $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy($id) + public function destroy(\App\Models\Type $id): \Illuminate\Http\RedirectResponse { $type = Type::findOrFail($id); $type->delete(); diff --git a/app/Http/Controllers/Staff/UserController.php b/app/Http/Controllers/Staff/UserController.php index 10de4ad1a6..b7b37e289c 100644 --- a/app/Http/Controllers/Staff/UserController.php +++ b/app/Http/Controllers/Staff/UserController.php @@ -57,10 +57,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * User Edit Form. - * - * @param \App\Models\User $username */ - public function settings($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function settings(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); $groups = Group::all(); @@ -78,11 +76,10 @@ public function settings($username): \Illuminate\Contracts\View\Factory|\Illumin /** * Edit A User. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function edit(Request $request, $username) + public function edit(Request $request, \App\Models\User $username) { $user = User::with('group')->where('username', '=', $username)->firstOrFail(); $staff = $request->user(); @@ -133,11 +130,9 @@ public function edit(Request $request, $username) /** * Edit A Users Permissions. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function permissions(Request $request, $username) + public function permissions(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); $user->can_upload = $request->input('can_upload'); @@ -155,11 +150,9 @@ public function permissions(Request $request, $username) /** * Edit A Users Password. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function password(Request $request, $username) + protected function password(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); $user->password = Hash::make($request->input('new_password')); @@ -172,11 +165,10 @@ protected function password(Request $request, $username) /** * Delete A User. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - protected function destroy($username) + protected function destroy(\App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -278,11 +270,9 @@ protected function destroy($username) /** * Manually warn a user. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function warnUser(Request $request, $username) + protected function warnUser(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); $carbon = new Carbon(); diff --git a/app/Http/Controllers/Staff/VersionController.php b/app/Http/Controllers/Staff/VersionController.php index 71944459d8..a98f494fca 100644 --- a/app/Http/Controllers/Staff/VersionController.php +++ b/app/Http/Controllers/Staff/VersionController.php @@ -36,10 +36,8 @@ public function __construct() * * @throws \GuzzleHttp\Exception\GuzzleException * @throws \JsonException - * - * @return string */ - public function checkVersion() + public function checkVersion(): \Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response { $client = new Client(); $response = \json_decode($client->get('//api.github.com/repos/HDInnovations/UNIT3D/releases')->getBody(), true, 512, JSON_THROW_ON_ERROR); diff --git a/app/Http/Controllers/StatsController.php b/app/Http/Controllers/StatsController.php index 3e6b454f58..79cbf91586 100644 --- a/app/Http/Controllers/StatsController.php +++ b/app/Http/Controllers/StatsController.php @@ -29,10 +29,7 @@ */ class StatsController extends Controller { - /** - * @var \Carbon\Carbon|mixed - */ - public $carbon; + public \Carbon\Carbon $carbon; /** * StatsController Constructor. @@ -336,10 +333,8 @@ public function groups(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi /** * Show Extra-Stats Groups. - * - * @param \App\Models\Group $id */ - public function group($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function group(\App\Models\Group $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { // Fetch Users In Group $group = Group::findOrFail($id); diff --git a/app/Http/Controllers/SubtitleController.php b/app/Http/Controllers/SubtitleController.php index cd4cea7f7a..bad5a580e6 100644 --- a/app/Http/Controllers/SubtitleController.php +++ b/app/Http/Controllers/SubtitleController.php @@ -52,10 +52,8 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie /** * Show the form for creating a new resource. - * - * @param \App\Models\Torrent $torrentId */ - public function create($torrentId): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function create(\App\Models\Torrent $torrentId): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrent = Torrent::withAnyStatus()->findOrFail($torrentId); $mediaLanguages = MediaLanguage::all()->sortBy('name'); @@ -145,11 +143,10 @@ public function store(Request $request) /** * Update the specified resource in storage. * - * @param \App\Models\Subtitle $id * * @return \Illuminate\Http\RedirectResponse */ - public function update(Request $request, $id) + public function update(Request $request, \App\Models\Subtitle $id) { $subtitle = Subtitle::findOrFail($id); @@ -177,13 +174,11 @@ public function update(Request $request, $id) /** * Remove the specified resource from storage. * - * @param \App\Models\Subtitle $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Subtitle $id): \Illuminate\Http\RedirectResponse { $subtitle = Subtitle::findOrFail($id); @@ -202,10 +197,8 @@ public function destroy(Request $request, $id) /** * Download the specified resource from storage. - * - * @param \App\Models\Subtitle $id */ - public function download(Request $request, $id): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\StreamedResponse + public function download(Request $request, \App\Models\Subtitle $id): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse|\Symfony\Component\HttpFoundation\StreamedResponse { $subtitle = Subtitle::findOrFail($id); $user = $request->user(); diff --git a/app/Http/Controllers/TicketAttachmentController.php b/app/Http/Controllers/TicketAttachmentController.php index f7f97404bd..b247659b8f 100644 --- a/app/Http/Controllers/TicketAttachmentController.php +++ b/app/Http/Controllers/TicketAttachmentController.php @@ -23,7 +23,7 @@ class TicketAttachmentController extends Controller * * @return mixed */ - final public function download(TicketAttachment $attachment) + final public function download(TicketAttachment $attachment): \Symfony\Component\HttpFoundation\BinaryFileResponse { return \response()->download(\getcwd().'/files/attachments/attachments/'.$attachment->file_name)->deleteFileAfterSend(false); } diff --git a/app/Http/Controllers/TicketController.php b/app/Http/Controllers/TicketController.php index 1a502d0528..71212b1d09 100644 --- a/app/Http/Controllers/TicketController.php +++ b/app/Http/Controllers/TicketController.php @@ -25,7 +25,7 @@ class TicketController extends Controller /** * Display a listing of the resource. */ - final public function index(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Contracts\Foundation\Application + final public function index(Request $request): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { return \view('ticket.index'); } @@ -33,7 +33,7 @@ final public function index(Request $request): \Illuminate\Contracts\View\Factor /** * Show the form for creating a new resource. */ - final public function create(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Contracts\Foundation\Application + final public function create(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $categories = TicketCategory::all()->sortBy('position'); $priorities = TicketPriority::all()->sortBy('position'); @@ -81,7 +81,7 @@ final public function store(Request $request): \Illuminate\Http\RedirectResponse /** * Display the specified resource. */ - final public function show(Request $request, int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Contracts\Foundation\Application + final public function show(Request $request, int $id): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $user = $request->user(); $ticket = Ticket::with(['comments'])->findOrFail($id); @@ -106,7 +106,7 @@ final public function show(Request $request, int $id): \Illuminate\Contracts\Vie /** * Show the form for editing the specified resource. */ - final public function edit(int $id): \Illuminate\Http\Response + final public function edit(int $id): void { // } diff --git a/app/Http/Controllers/TopicController.php b/app/Http/Controllers/TopicController.php index 144500eac6..60cc41b627 100644 --- a/app/Http/Controllers/TopicController.php +++ b/app/Http/Controllers/TopicController.php @@ -48,12 +48,8 @@ public function __construct(private TaggedUserRepository $taggedUserRepository, /** * Show The Topic. - * - * @param \App\Models\Topic $id - * @param string $page - * @param string $post */ - public function topic($id, $page = '', $post = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse + public function topic(\App\Models\Topic $id, string $page = '', string $post = ''): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse { // Find the topic $topic = Topic::findOrFail($id); @@ -97,10 +93,8 @@ public function topic($id, $page = '', $post = ''): \Illuminate\Contracts\View\F /** * Topic Add Form. - * - * @param \App\Models\Forum $id */ - public function addForm(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse + public function addForm(Request $request, \App\Models\Forum $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View|\Illuminate\Http\RedirectResponse { $forum = Forum::findOrFail($id); $category = Forum::findOrFail($id); @@ -121,11 +115,10 @@ public function addForm(Request $request, $id): \Illuminate\Contracts\View\Facto /** * Create A New Topic In The Forum. * - * @param \App\Models\Forum $id * * @return \Illuminate\Http\RedirectResponse */ - public function newTopic(Request $request, $id) + public function newTopic(Request $request, \App\Models\Forum $id) { $user = $request->user(); $forum = Forum::findOrFail($id); @@ -229,10 +222,8 @@ public function newTopic(Request $request, $id) /** * Topic Edit Form. - * - * @param \App\Models\Topic $id */ - public function editForm($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function editForm(\App\Models\Topic $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $topic = Topic::findOrFail($id); $categories = Forum::where('parent_id', '!=', 0)->get(); @@ -243,11 +234,9 @@ public function editForm($id): \Illuminate\Contracts\View\Factory|\Illuminate\Vi /** * Edit Topic In The Forum. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function editTopic(Request $request, $id) + public function editTopic(Request $request, \App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $topic = Topic::findOrFail($id); @@ -266,11 +255,9 @@ public function editTopic(Request $request, $id) /** * Close The Topic. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function closeTopic(Request $request, $id) + public function closeTopic(Request $request, \App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $topic = Topic::findOrFail($id); @@ -286,11 +273,9 @@ public function closeTopic(Request $request, $id) /** * Open The Topic. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function openTopic(Request $request, $id) + public function openTopic(Request $request, \App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $topic = Topic::findOrFail($id); @@ -306,13 +291,11 @@ public function openTopic(Request $request, $id) /** * Delete The Topic and The Posts. * - * @param \App\Models\Topic $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function deleteTopic(Request $request, $id) + public function deleteTopic(Request $request, \App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); $topic = Topic::findOrFail($id); @@ -329,11 +312,9 @@ public function deleteTopic(Request $request, $id) /** * Pin The Topic. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function pinTopic($id) + public function pinTopic(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->pinned = 1; @@ -346,11 +327,9 @@ public function pinTopic($id) /** * Unpin The Topic. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function unpinTopic($id) + public function unpinTopic(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->pinned = 0; diff --git a/app/Http/Controllers/TopicLabelController.php b/app/Http/Controllers/TopicLabelController.php index b4ed5e406e..2852056cde 100644 --- a/app/Http/Controllers/TopicLabelController.php +++ b/app/Http/Controllers/TopicLabelController.php @@ -23,11 +23,9 @@ class TopicLabelController extends Controller /** * Apply/Remove Approved Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function approve($id) + public function approve(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->approved = $topic->approved == 0 ? '1' : '0'; @@ -40,11 +38,9 @@ public function approve($id) /** * Apply/Remove Denied Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function deny($id) + public function deny(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->denied = $topic->denied == 0 ? '1' : '0'; @@ -57,11 +53,9 @@ public function deny($id) /** * Apply/Remove Solved Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function solve($id) + public function solve(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->solved = $topic->solved == 0 ? '1' : '0'; @@ -74,11 +68,9 @@ public function solve($id) /** * Apply/Remove Invalid Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function invalid($id) + public function invalid(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->invalid = $topic->invalid == 0 ? '1' : '0'; @@ -91,11 +83,9 @@ public function invalid($id) /** * Apply/Remove Bug Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function bug($id) + public function bug(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->bug = $topic->bug == 0 ? '1' : '0'; @@ -108,11 +98,9 @@ public function bug($id) /** * Apply/Remove Suggestion Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function suggest($id) + public function suggest(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->suggestion = $topic->suggestion == 0 ? '1' : '0'; @@ -125,11 +113,9 @@ public function suggest($id) /** * Apply/Remove Implemented Label. * - * @param \App\Models\Topic $id * - * @return \Illuminate\Http\RedirectResponse */ - public function implement($id) + public function implement(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse { $topic = Topic::findOrFail($id); $topic->implemented = $topic->implemented == 0 ? '1' : '0'; diff --git a/app/Http/Controllers/TorrentController.php b/app/Http/Controllers/TorrentController.php index 4af900bd5d..96591d2db4 100644 --- a/app/Http/Controllers/TorrentController.php +++ b/app/Http/Controllers/TorrentController.php @@ -140,10 +140,8 @@ private static function anonymizeMediainfo($mediainfo) * Parse Torrent Keywords. * * @param $text - * - * @return array */ - private static function parseKeywords($text) + private static function parseKeywords($text): array { $parts = \explode(', ', $text); $result = []; @@ -160,14 +158,12 @@ private static function parseKeywords($text) /** * Display The Torrent. * - * @param \Illuminate\Http\Request $request - * @param \App\Models\Torrent $id * * @throws \JsonException * @throws \MarcReichel\IGDBLaravel\Exceptions\MissingEndpointException * @throws \ReflectionException */ - public function torrent(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function torrent(Request $request, \App\Models\Torrent $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrent = Torrent::withAnyStatus()->with(['comments', 'category', 'type', 'resolution', 'subtitles', 'playlists'])->findOrFail($id); $uploader = $torrent->user; @@ -237,10 +233,8 @@ public function torrent(Request $request, $id): \Illuminate\Contracts\View\Facto /** * Torrent Edit Form. - * - * @param \App\Models\Torrent $id */ - public function editForm(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function editForm(Request $request, \App\Models\Torrent $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); $torrent = Torrent::withAnyStatus()->findOrFail($id); @@ -261,11 +255,10 @@ public function editForm(Request $request, $id): \Illuminate\Contracts\View\Fact /** * Edit A Torrent. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function edit(Request $request, $id) + public function edit(Request $request, \App\Models\Torrent $id) { $user = $request->user(); $torrent = Torrent::withAnyStatus()->findOrFail($id); @@ -447,10 +440,8 @@ public function deleteTorrent(Request $request) /** * Display Peers Of A Torrent. - * - * @param \App\Models\Torrent $id */ - public function peers($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function peers(\App\Models\Torrent $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrent = Torrent::withAnyStatus()->findOrFail($id); $peers = Peer::with(['user'])->where('torrent_id', '=', $id)->latest('seeder')->paginate(25); @@ -460,10 +451,8 @@ public function peers($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\ /** * Display History Of A Torrent. - * - * @param \App\Models\Torrent $id */ - public function history($id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function history(\App\Models\Torrent $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrent = Torrent::withAnyStatus()->findOrFail($id); $history = History::with(['user'])->where('info_hash', '=', $torrent->info_hash)->latest()->get(); @@ -473,13 +462,8 @@ public function history($id): \Illuminate\Contracts\View\Factory|\Illuminate\Vie /** * Torrent Upload Form. - * - * @param int $categoryId - * @param string $title - * @param int $imdb - * @param int $tmdb */ - public function uploadForm(Request $request, $categoryId = 0, $title = '', $imdb = 0, $tmdb = 0): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function uploadForm(Request $request, int $categoryId = 0, string $title = '', int $imdb = 0, int $tmdb = 0): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = $request->user(); @@ -500,10 +484,8 @@ public function uploadForm(Request $request, $categoryId = 0, $title = '', $imdb /** * Preview torrent description. * - * - * @return \Illuminate\Http\JsonResponse */ - public function preview(Request $request) + public function preview(Request $request): \Illuminate\Http\JsonResponse { // Preview The Upload $joyPixel = \app()->make(LaravelJoyPixels::class); @@ -739,10 +721,8 @@ public function upload(Request $request) /** * Download Check. - * - * @param \App\Models\Torrent $id */ - public function downloadCheck(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function downloadCheck(Request $request, \App\Models\Torrent $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $torrent = Torrent::withAnyStatus()->findOrFail($id); $user = $request->user(); @@ -752,13 +732,8 @@ public function downloadCheck(Request $request, $id): \Illuminate\Contracts\View /** * Download A Torrent. - * - * @param \App\Models\Torrent $id - * @param null $rsskey - * - * @return TorrentFile */ - public function download(Request $request, $id, $rsskey = null) + public function download(Request $request, \App\Models\Torrent $id, $rsskey = null): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse { $user = $request->user(); if (! $user && $rsskey) { @@ -819,11 +794,10 @@ public function download(Request $request, $id, $rsskey = null) /** * Reseed Request A Torrent. * - * @param \App\Models\Torrent $id * * @return \Illuminate\Http\RedirectResponse */ - public function reseedTorrent(Request $request, $id) + public function reseedTorrent(Request $request, \App\Models\Torrent $id) { $user = $request->user(); $torrent = Torrent::findOrFail($id); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index f0264f0d49..0aaf4da942 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -46,10 +46,8 @@ class UserController extends Controller { /** * Show A User. - * - * @param \App\Models\User $username */ - public function show($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::with(['privacy', 'history'])->withCount('torrents')->where('username', '=', $username)->firstOrFail(); @@ -115,10 +113,8 @@ public function show($username): \Illuminate\Contracts\View\Factory|\Illuminate\ /** * User Followers. - * - * @param \App\Models\User $username */ - public function followers($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function followers(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); $results = Follow::with('user')->where('target_id', '=', $user->id)->latest()->paginate(25); @@ -132,10 +128,8 @@ public function followers($username): \Illuminate\Contracts\View\Factory|\Illumi /** * User Topics. - * - * @param \App\Models\User $username */ - public function topics($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function topics(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); $results = Topic::where('topics.first_post_user_id', '=', $user->id)->latest()->paginate(25); @@ -149,10 +143,8 @@ public function topics($username): \Illuminate\Contracts\View\Factory|\Illuminat /** * User Posts. - * - * @param \App\Models\User $username */ - public function posts($username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function posts(\App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); $results = Post::selectRaw('posts.id as id,posts.*')->with(['topic', 'user'])->leftJoin('topics', 'posts.topic_id', '=', 'topics.id')->where('posts.user_id', '=', $user->id)->orderBy('posts.created_at', 'desc')->paginate(25); @@ -166,10 +158,8 @@ public function posts($username): \Illuminate\Contracts\View\Factory|\Illuminate /** * Edit Profile Form. - * - * @param \App\Models\User $username */ - public function editProfileForm(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function editProfileForm(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -181,11 +171,10 @@ public function editProfileForm(Request $request, $username): \Illuminate\Contra /** * Edit User Profile. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function editProfile(Request $request, $username) + public function editProfile(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -233,10 +222,8 @@ public function editProfile(Request $request, $username) /** * User Account Settings. - * - * @param \App\Models\User $username */ - public function settings(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function settings(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -248,11 +235,10 @@ public function settings(Request $request, $username): \Illuminate\Contracts\Vie /** * Change User Account Settings. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - public function changeSettings(Request $request, $username) + public function changeSettings(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -298,10 +284,8 @@ public function changeSettings(Request $request, $username) /** * User Security Settings. - * - * @param \App\Models\User $username */ - public function security(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function security(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -335,11 +319,10 @@ protected function changeTwoStep(Request $request) /** * User Password Change. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - protected function changePassword(Request $request, $username) + protected function changePassword(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -369,11 +352,10 @@ protected function changePassword(Request $request, $username) /** * User Email Change. * - * @param \App\Models\User $username * * @return \Illuminate\Http\RedirectResponse */ - protected function changeEmail(Request $request, $username) + protected function changeEmail(Request $request, \App\Models\User $username) { $user = User::where('username', '=', $username)->firstOrFail(); @@ -404,11 +386,9 @@ protected function changeEmail(Request $request, $username) /** * Change User Privacy Level. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function makePrivate(Request $request, $username) + public function makePrivate(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -424,11 +404,9 @@ public function makePrivate(Request $request, $username) /** * Change User Privacy Level. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function makePublic(Request $request, $username) + public function makePublic(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -444,11 +422,9 @@ public function makePublic(Request $request, $username) /** * Change User Notification Setting. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function disableNotifications(Request $request, $username) + public function disableNotifications(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -464,11 +440,9 @@ public function disableNotifications(Request $request, $username) /** * Change User Notification Setting. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function enableNotifications(Request $request, $username) + public function enableNotifications(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -484,11 +458,9 @@ public function enableNotifications(Request $request, $username) /** * Change User Hidden Value. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function makeHidden(Request $request, $username) + public function makeHidden(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -504,11 +476,9 @@ public function makeHidden(Request $request, $username) /** * Change User Hidden Value. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function makeVisible(Request $request, $username) + public function makeVisible(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -524,13 +494,11 @@ public function makeVisible(Request $request, $username) /** * Change User PID. * - * @param \App\Models\User $username * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function changePID(Request $request, $username) + public function changePID(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -548,11 +516,9 @@ public function changePID(Request $request, $username) /** * User Other Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeOther(Request $request, $username) + protected function changeOther(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -583,11 +549,9 @@ protected function changeOther(Request $request, $username) /** * User Request Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeRequest(Request $request, $username) + protected function changeRequest(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -618,11 +582,9 @@ protected function changeRequest(Request $request, $username) /** * User Achievement Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeAchievement(Request $request, $username) + protected function changeAchievement(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -653,11 +615,9 @@ protected function changeAchievement(Request $request, $username) /** * User Forum Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeForum(Request $request, $username) + protected function changeForum(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -689,11 +649,9 @@ protected function changeForum(Request $request, $username) /** * User Follower Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeFollower(Request $request, $username) + protected function changeFollower(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -724,11 +682,9 @@ protected function changeFollower(Request $request, $username) /** * User Torrent Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeTorrent(Request $request, $username) + protected function changeTorrent(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -764,11 +720,9 @@ protected function changeTorrent(Request $request, $username) /** * User Account Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeAccountNotification(Request $request, $username) + protected function changeAccountNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -800,11 +754,9 @@ protected function changeAccountNotification(Request $request, $username) /** * User Following Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeFollowingNotification(Request $request, $username) + protected function changeFollowingNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -835,11 +787,9 @@ protected function changeFollowingNotification(Request $request, $username) /** * User BON Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeBonNotification(Request $request, $username) + protected function changeBonNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -870,11 +820,9 @@ protected function changeBonNotification(Request $request, $username) /** * User Subscription Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeSubscriptionNotification(Request $request, $username) + protected function changeSubscriptionNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -906,11 +854,9 @@ protected function changeSubscriptionNotification(Request $request, $username) /** * User Request Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeRequestNotification(Request $request, $username) + protected function changeRequestNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -947,11 +893,9 @@ protected function changeRequestNotification(Request $request, $username) /** * User Torrent Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeTorrentNotification(Request $request, $username) + protected function changeTorrentNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -984,11 +928,9 @@ protected function changeTorrentNotification(Request $request, $username) /** * User Mention Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeMentionNotification(Request $request, $username) + protected function changeMentionNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1023,11 +965,9 @@ protected function changeMentionNotification(Request $request, $username) /** * User Forum Notification Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeForumNotification(Request $request, $username) + protected function changeForumNotification(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1058,11 +998,9 @@ protected function changeForumNotification(Request $request, $username) /** * User Profile Privacy Change. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - protected function changeProfile(Request $request, $username) + protected function changeProfile(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1106,11 +1044,9 @@ protected function changeProfile(Request $request, $username) /** * Change User RID. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function changeRID(Request $request, $username) + public function changeRID(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1126,11 +1062,9 @@ public function changeRID(Request $request, $username) /** * Change User API Token. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function changeApiToken(Request $request, $username) + public function changeApiToken(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1145,10 +1079,8 @@ public function changeApiToken(Request $request, $username) /** * User Privacy Settings. - * - * @param \App\Models\User $username */ - public function privacy(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function privacy(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1161,10 +1093,8 @@ public function privacy(Request $request, $username): \Illuminate\Contracts\View /** * User Notification Settings. - * - * @param \App\Models\User $username */ - public function notification(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function notification(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1178,13 +1108,11 @@ public function notification(Request $request, $username): \Illuminate\Contracts /** * Uses Input's To Put Together A Filtered View. * - * @param \App\Models\User $username * * @throws \Throwable * - * @return array */ - public function myFilter(Request $request, $username) + public function myFilter(Request $request, \App\Models\User $username): string|bool { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1703,10 +1631,8 @@ public function myFilter(Request $request, $username) /** * Get A Users Downloads (Fully Downloaded) Table. - * - * @param \App\Models\User $username */ - public function downloads(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function downloads(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); if (($request->user()->id == $user->id || $request->user()->group->is_modo)) { @@ -1770,10 +1696,8 @@ public function downloads(Request $request, $username): \Illuminate\Contracts\Vi /** * Get A Users Requested Table. - * - * @param \App\Models\User $username */ - public function requested(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function requested(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); if (($request->user()->id == $user->id || $request->user()->group->is_modo)) { @@ -1800,10 +1724,8 @@ public function requested(Request $request, $username): \Illuminate\Contracts\Vi /** * Get A Users Unsatisfieds Table. - * - * @param \App\Models\User $username */ - public function unsatisfieds(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function unsatisfieds(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1844,10 +1766,8 @@ public function unsatisfieds(Request $request, $username): \Illuminate\Contracts /** * Get A Users History Table. - * - * @param \App\Models\User $username */ - public function torrents(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function torrents(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1874,10 +1794,8 @@ public function torrents(Request $request, $username): \Illuminate\Contracts\Vie /** * Get A Users Graveyard Resurrections. - * - * @param \App\Models\User $username */ - public function resurrections(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function resurrections(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); \abort_unless($request->user()->group->is_modo || $request->user()->id == $user->id, 403); @@ -1893,10 +1811,8 @@ public function resurrections(Request $request, $username): \Illuminate\Contract /** * Get A User Uploads. - * - * @param \App\Models\User $username */ - public function uploads(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function uploads(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); if ($request->user()->id == $user->id || $request->user()->group->is_modo) { @@ -1932,10 +1848,8 @@ public function uploads(Request $request, $username): \Illuminate\Contracts\View /** * Get A Users Active Table. - * - * @param \App\Models\User $username */ - public function active(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function active(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1965,10 +1879,8 @@ public function active(Request $request, $username): \Illuminate\Contracts\View\ /** * Get A Users Seeds Table. - * - * @param \App\Models\User $username */ - public function seeds(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function seeds(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); @@ -1997,10 +1909,8 @@ public function seeds(Request $request, $username): \Illuminate\Contracts\View\F /** * Get A Users Bans. - * - * @param \App\Models\User $username */ - public function getBans(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function getBans(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { \abort_unless($request->user()->group->is_modo, 403); @@ -2015,10 +1925,8 @@ public function getBans(Request $request, $username): \Illuminate\Contracts\View /** * Download All History Torrents. - * - * @param \App\Models\User $username */ - public function downloadHistoryTorrents(Request $request, $username): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse + public function downloadHistoryTorrents(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse { // Extend The Maximum Execution Time \set_time_limit(1200); @@ -2104,10 +2012,8 @@ public function downloadHistoryTorrents(Request $request, $username): \Illuminat /** * Accept Site Rules. * - * - * @return void */ - public function acceptRules(Request $request) + public function acceptRules(Request $request): void { $user = $request->user(); $user->read_rules = 1; @@ -2116,10 +2022,8 @@ public function acceptRules(Request $request) /** * Flushes own Peers. - * - * @param \App\Models\User $username */ - public function flushOwnGhostPeers(Request $request, $username): \Illuminate\Http\RedirectResponse + public function flushOwnGhostPeers(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { // Authorized User $user = User::where('username', '=', $username)->firstOrFail(); @@ -2159,12 +2063,8 @@ public function flushOwnGhostPeers(Request $request, $username): \Illuminate\Htt /** * Get A Users Active Table by IP and Port. - * - * @param \App\Models\User $username - * @param \App\Models\Peer $ip - * @param \App\Models\Peer $port */ - public function activeByClient(Request $request, $username, $ip, $port): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function activeByClient(Request $request, \App\Models\User $username, \App\Models\Peer $ip, \App\Models\Peer $port): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::where('username', '=', $username)->firstOrFail(); diff --git a/app/Http/Controllers/WarningController.php b/app/Http/Controllers/WarningController.php index 17db122ea8..736f01be58 100644 --- a/app/Http/Controllers/WarningController.php +++ b/app/Http/Controllers/WarningController.php @@ -26,10 +26,8 @@ class WarningController extends Controller { /** * Show A Users Warnings. - * - * @param \App\Models\User $username */ - public function show(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function show(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { \abort_unless($request->user()->group->is_modo, 403); @@ -53,11 +51,9 @@ public function show(Request $request, $username): \Illuminate\Contracts\View\Fa /** * Deactivate A Warning. * - * @param \App\Models\Warning $id * - * @return \Illuminate\Http\RedirectResponse */ - public function deactivate(Request $request, $id) + public function deactivate(Request $request, \App\Models\Warning $id): \Illuminate\Http\RedirectResponse { \abort_unless($request->user()->group->is_modo, 403); $staff = $request->user(); @@ -81,11 +77,9 @@ public function deactivate(Request $request, $id) /** * Deactivate All Warnings. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function deactivateAllWarnings(Request $request, $username) + public function deactivateAllWarnings(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { \abort_unless($request->user()->group->is_modo, 403); $staff = $request->user(); @@ -112,13 +106,11 @@ public function deactivateAllWarnings(Request $request, $username) /** * Delete A Warning. * - * @param \App\Models\Warning $id * * @throws \Exception * - * @return \Illuminate\Http\RedirectResponse */ - public function deleteWarning(Request $request, $id) + public function deleteWarning(Request $request, \App\Models\Warning $id): \Illuminate\Http\RedirectResponse { \abort_unless($request->user()->group->is_modo, 403); @@ -144,11 +136,9 @@ public function deleteWarning(Request $request, $id) /** * Delete All Warnings. * - * @param \App\Models\User $username * - * @return \Illuminate\Http\RedirectResponse */ - public function deleteAllWarnings(Request $request, $username) + public function deleteAllWarnings(Request $request, \App\Models\User $username): \Illuminate\Http\RedirectResponse { \abort_unless($request->user()->group->is_modo, 403); @@ -176,11 +166,9 @@ public function deleteAllWarnings(Request $request, $username) /** * Restore A Soft Deleted Warning. * - * @param \App\Models\Warning $id * - * @return \Illuminate\Http\RedirectResponse */ - public function restoreWarning(Request $request, $id) + public function restoreWarning(Request $request, \App\Models\Warning $id): \Illuminate\Http\RedirectResponse { \abort_unless($request->user()->group->is_modo, 403); diff --git a/app/Http/Controllers/WishController.php b/app/Http/Controllers/WishController.php index 675e497971..34f35c237b 100644 --- a/app/Http/Controllers/WishController.php +++ b/app/Http/Controllers/WishController.php @@ -32,10 +32,8 @@ public function __construct(private WishInterface $wish) /** * Get A Users Wishlist. - * - * @param \App\Models\User $username */ - public function index(Request $request, $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View + public function index(Request $request, \App\Models\User $username): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { $user = User::with('wishes')->where('username', '=', $username)->firstOrFail(); @@ -101,11 +99,9 @@ public function store(Request $request) /** * Delete A Wish. * - * @param \App\Models\Wish $id * - * @return \Illuminate\Http\RedirectResponse */ - public function destroy(Request $request, $id) + public function destroy(Request $request, \App\Models\Wish $id): \Illuminate\Http\RedirectResponse { $user = $request->user(); diff --git a/app/Http/Livewire/AttachmentUpload.php b/app/Http/Livewire/AttachmentUpload.php index 8a1b1b0da6..41cba9d494 100644 --- a/app/Http/Livewire/AttachmentUpload.php +++ b/app/Http/Livewire/AttachmentUpload.php @@ -21,9 +21,9 @@ class AttachmentUpload extends Component { use WithFileUploads; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; - public $ticket; + public ?int $ticket = null; public $attachment; diff --git a/app/Http/Livewire/BackupPanel.php b/app/Http/Livewire/BackupPanel.php index e800947488..d44a514443 100644 --- a/app/Http/Livewire/BackupPanel.php +++ b/app/Http/Livewire/BackupPanel.php @@ -30,11 +30,11 @@ class BackupPanel extends Component { - public $backupStatuses = []; + public array $backupStatuses = []; public $activeDisk = null; - public $disks = []; + public array $disks = []; public $files = []; diff --git a/app/Http/Livewire/BookmarkButton.php b/app/Http/Livewire/BookmarkButton.php index e958c167d7..324a77ecb8 100644 --- a/app/Http/Livewire/BookmarkButton.php +++ b/app/Http/Livewire/BookmarkButton.php @@ -20,7 +20,7 @@ class BookmarkButton extends Component { public $torrent; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; final public function mount($torrent): void { diff --git a/app/Http/Livewire/DislikeButton.php b/app/Http/Livewire/DislikeButton.php index c6091db1b2..c31f0664f2 100644 --- a/app/Http/Livewire/DislikeButton.php +++ b/app/Http/Livewire/DislikeButton.php @@ -21,7 +21,7 @@ class DislikeButton extends Component { public $post; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; final public function mount($post): void { diff --git a/app/Http/Livewire/GraveyardSearch.php b/app/Http/Livewire/GraveyardSearch.php index e71e8cfd4b..c68944c2ea 100644 --- a/app/Http/Livewire/GraveyardSearch.php +++ b/app/Http/Livewire/GraveyardSearch.php @@ -22,21 +22,21 @@ class GraveyardSearch extends Component { use WithPagination; - public $name = ''; + public string $name = ''; - public $categories = []; + public array $categories = []; - public $types = []; + public array $types = []; - public $resolutions = []; + public array $resolutions = []; - public $tmdbId = ''; + public string $tmdbId = ''; - public $imdbId = ''; + public string $imdbId = ''; - public $tvdbId = ''; + public string $tvdbId = ''; - public $malId = ''; + public string $malId = ''; public $free; @@ -52,13 +52,13 @@ class GraveyardSearch extends Component public $internal; - public $perPage = 25; + public int $perPage = 25; - public $sortField = 'created_at'; + public string $sortField = 'created_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; - public $showFilters = false; + public bool $showFilters = false; protected $queryString = [ 'name' => ['except' => ''], diff --git a/app/Http/Livewire/LikeButton.php b/app/Http/Livewire/LikeButton.php index c0e882bad5..c0d5f4183b 100644 --- a/app/Http/Livewire/LikeButton.php +++ b/app/Http/Livewire/LikeButton.php @@ -21,7 +21,7 @@ class LikeButton extends Component { public $post; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; final public function mount($post): void { diff --git a/app/Http/Livewire/MissingMediaSearch.php b/app/Http/Livewire/MissingMediaSearch.php index 2d6565c36d..33b6c2dff4 100644 --- a/app/Http/Livewire/MissingMediaSearch.php +++ b/app/Http/Livewire/MissingMediaSearch.php @@ -10,12 +10,12 @@ class MissingMediaSearch extends Component { use WithPagination; - public $categories = []; - public $types = []; - public $resolutions = []; - public $perPage = 50; - public $sortField = 'created_at'; - public $sortDirection = 'desc'; + public array $categories = []; + public array $types = []; + public array $resolutions = []; + public int $perPage = 50; + public string $sortField = 'created_at'; + public string $sortDirection = 'desc'; protected $queryString = [ 'categories' => ['except' => []], diff --git a/app/Http/Livewire/QuickSearchDropdown.php b/app/Http/Livewire/QuickSearchDropdown.php index 3cf60e03dd..cfaa9d7c5d 100644 --- a/app/Http/Livewire/QuickSearchDropdown.php +++ b/app/Http/Livewire/QuickSearchDropdown.php @@ -9,13 +9,13 @@ class QuickSearchDropdown extends Component { - public $movie = ''; + public string $movie = ''; - public $series = ''; + public string $series = ''; - public $person = ''; + public string $person = ''; - public function render() + public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { $search_results = []; diff --git a/app/Http/Livewire/SimilarTorrent.php b/app/Http/Livewire/SimilarTorrent.php index f77eff41d6..d84441f66e 100644 --- a/app/Http/Livewire/SimilarTorrent.php +++ b/app/Http/Livewire/SimilarTorrent.php @@ -40,13 +40,13 @@ class SimilarTorrent extends Component public $checked = []; - public $selectPage = false; + public bool $selectPage = false; - public $selectAll = false; + public bool $selectAll = false; - public $sortField = 'bumped_at'; + public string $sortField = 'bumped_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; protected $listeners = ['destroy' => 'deleteRecords']; @@ -71,7 +71,7 @@ final public function isChecked($torrentId): bool return in_array($torrentId, $this->checked); } - final public function getTorrentsProperty(): \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Collection + final public function getTorrentsProperty(): \Illuminate\Support\Collection { $category = Category::findOrFail($this->categoryId); diff --git a/app/Http/Livewire/SmallBookmarkButton.php b/app/Http/Livewire/SmallBookmarkButton.php index df72aaa00a..b31abe3e2b 100644 --- a/app/Http/Livewire/SmallBookmarkButton.php +++ b/app/Http/Livewire/SmallBookmarkButton.php @@ -20,7 +20,7 @@ class SmallBookmarkButton extends Component { public $torrent; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; final public function mount($torrent): void { diff --git a/app/Http/Livewire/SubtitleSearch.php b/app/Http/Livewire/SubtitleSearch.php index e7a1497a98..7896d973ae 100644 --- a/app/Http/Livewire/SubtitleSearch.php +++ b/app/Http/Livewire/SubtitleSearch.php @@ -22,17 +22,17 @@ class SubtitleSearch extends Component { use WithPagination; - public $perPage = 25; + public int $perPage = 25; - public $search = ''; + public string $search = ''; - public $categories = []; + public array $categories = []; - public $language = ''; + public string $language = ''; - public $sortField = 'created_at'; + public string $sortField = 'created_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; final public function paginationView(): string { diff --git a/app/Http/Livewire/ThankButton.php b/app/Http/Livewire/ThankButton.php index 43aea04b66..d8cf704a00 100644 --- a/app/Http/Livewire/ThankButton.php +++ b/app/Http/Livewire/ThankButton.php @@ -21,7 +21,7 @@ class ThankButton extends Component { public $torrent; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; final public function mount($torrent): void { diff --git a/app/Http/Livewire/TicketSearch.php b/app/Http/Livewire/TicketSearch.php index 8b5216b2a0..71d75d7486 100644 --- a/app/Http/Livewire/TicketSearch.php +++ b/app/Http/Livewire/TicketSearch.php @@ -21,17 +21,17 @@ class TicketSearch extends Component { use WithPagination; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; - public $show = false; + public bool $show = false; - public $perPage = 25; + public int $perPage = 25; - public $search = ''; + public string $search = ''; - public $sortField = 'updated_at'; + public string $sortField = 'updated_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; protected $queryString = [ 'search' => ['except' => ''], diff --git a/app/Http/Livewire/TorrentCardSearch.php b/app/Http/Livewire/TorrentCardSearch.php index a25d7e2155..f8ce0af1e4 100644 --- a/app/Http/Livewire/TorrentCardSearch.php +++ b/app/Http/Livewire/TorrentCardSearch.php @@ -30,43 +30,43 @@ class TorrentCardSearch extends Component { use WithPagination; - public $name = ''; + public string $name = ''; - public $description = ''; + public string $description = ''; - public $mediainfo = ''; + public string $mediainfo = ''; - public $uploader = ''; + public string $uploader = ''; - public $keywords = []; + public array $keywords = []; - public $startYear = ''; + public string $startYear = ''; - public $endYear = ''; + public string $endYear = ''; - public $categories = []; + public array $categories = []; - public $types = []; + public array $types = []; - public $resolutions = []; + public array $resolutions = []; - public $genres = []; + public array $genres = []; - public $regions = []; + public array $regions = []; - public $distributors = []; + public array $distributors = []; - public $tmdbId = ''; + public string $tmdbId = ''; - public $imdbId = ''; + public string $imdbId = ''; - public $tvdbId = ''; + public string $tvdbId = ''; - public $malId = ''; + public string $malId = ''; - public $playlistId = ''; + public string $playlistId = ''; - public $collectionId = ''; + public string $collectionId = ''; public $free0; @@ -112,11 +112,11 @@ class TorrentCardSearch extends Component public $incomplete; - public $perPage = 24; + public int $perPage = 24; - public $sortField = 'bumped_at'; + public string $sortField = 'bumped_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; protected $queryString = [ 'name' => ['except' => ''], @@ -165,7 +165,7 @@ class TorrentCardSearch extends Component 'perPage' => ['except' => ''], ]; - protected $rules = [ + protected array $rules = [ 'genres.*' => 'exists:genres,id', ]; @@ -184,7 +184,7 @@ final public function updatingName(): void $this->resetPage(); } - final public function getTorrentsStatProperty() + final public function getTorrentsStatProperty(): ?object { return DB::table('torrents') ->selectRaw('count(*) as total') diff --git a/app/Http/Livewire/TorrentListSearch.php b/app/Http/Livewire/TorrentListSearch.php index 44b787df15..1d4a3f9876 100644 --- a/app/Http/Livewire/TorrentListSearch.php +++ b/app/Http/Livewire/TorrentListSearch.php @@ -30,43 +30,43 @@ class TorrentListSearch extends Component { use WithPagination; - public $name = ''; + public string $name = ''; - public $description = ''; + public string $description = ''; - public $mediainfo = ''; + public string $mediainfo = ''; - public $uploader = ''; + public string $uploader = ''; - public $keywords = []; + public array $keywords = []; - public $startYear = ''; + public string $startYear = ''; - public $endYear = ''; + public string $endYear = ''; - public $categories = []; + public array $categories = []; - public $types = []; + public array $types = []; - public $resolutions = []; + public array $resolutions = []; - public $genres = []; + public array $genres = []; - public $regions = []; + public array $regions = []; - public $distributors = []; + public array $distributors = []; - public $tmdbId = ''; + public string $tmdbId = ''; - public $imdbId = ''; + public string $imdbId = ''; - public $tvdbId = ''; + public string $tvdbId = ''; - public $malId = ''; + public string $malId = ''; - public $playlistId = ''; + public string $playlistId = ''; - public $collectionId = ''; + public string $collectionId = ''; public $free0; @@ -112,11 +112,11 @@ class TorrentListSearch extends Component public $incomplete; - public $perPage = 25; + public int $perPage = 25; - public $sortField = 'bumped_at'; + public string $sortField = 'bumped_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; protected $queryString = [ 'name' => ['except' => ''], @@ -165,7 +165,7 @@ class TorrentListSearch extends Component 'perPage' => ['except' => ''], ]; - protected $rules = [ + protected array $rules = [ 'genres.*' => 'exists:genres,id', ]; @@ -184,7 +184,7 @@ final public function updatingName(): void $this->resetPage(); } - final public function getTorrentsStatProperty() + final public function getTorrentsStatProperty(): ?object { return DB::table('torrents') ->selectRaw('count(*) as total') diff --git a/app/Http/Livewire/TorrentRequestSearch.php b/app/Http/Livewire/TorrentRequestSearch.php index d7bc306bf7..429c6cbf8b 100644 --- a/app/Http/Livewire/TorrentRequestSearch.php +++ b/app/Http/Livewire/TorrentRequestSearch.php @@ -25,25 +25,25 @@ class TorrentRequestSearch extends Component { use WithPagination; - public $name = ''; + public string $name = ''; - public $requestor = ''; + public string $requestor = ''; - public $categories = []; + public array $categories = []; - public $types = []; + public array $types = []; - public $resolutions = []; + public array $resolutions = []; - public $genres = []; + public array $genres = []; - public $tmdbId = ''; + public string $tmdbId = ''; - public $imdbId = ''; + public string $imdbId = ''; - public $tvdbId = ''; + public string $tvdbId = ''; - public $malId = ''; + public string $malId = ''; public $unfilled; @@ -61,13 +61,13 @@ class TorrentRequestSearch extends Component public $myFilled; - public $perPage = 25; + public int $perPage = 25; - public $sortField = 'created_at'; + public string $sortField = 'created_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; - public $showFilters = false; + public bool $showFilters = false; protected $queryString = [ 'name' => ['except' => ''], @@ -108,7 +108,7 @@ final public function toggleShowFilters(): void $this->showFilters = ! $this->showFilters; } - final public function getTorrentRequestStatProperty() + final public function getTorrentRequestStatProperty(): ?object { return DB::table('requests') ->selectRaw('count(*) as total') @@ -117,7 +117,7 @@ final public function getTorrentRequestStatProperty() ->first(); } - final public function getTorrentRequestBountyStatProperty() + final public function getTorrentRequestBountyStatProperty(): ?object { return DB::table('requests') ->selectRaw('coalesce(sum(bounty), 0) as total') diff --git a/app/Http/Livewire/UserSearch.php b/app/Http/Livewire/UserSearch.php index 5786c6118a..c183c136d7 100644 --- a/app/Http/Livewire/UserSearch.php +++ b/app/Http/Livewire/UserSearch.php @@ -21,13 +21,13 @@ class UserSearch extends Component { use WithPagination; - public $perPage = 25; + public int $perPage = 25; - public $search = ''; + public string $search = ''; - public $sortField = 'created_at'; + public string $sortField = 'created_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; final public function paginationView(): string { diff --git a/app/Http/Livewire/WatchlistSearch.php b/app/Http/Livewire/WatchlistSearch.php index 1f3a5b1ce6..6200e6475d 100644 --- a/app/Http/Livewire/WatchlistSearch.php +++ b/app/Http/Livewire/WatchlistSearch.php @@ -21,15 +21,15 @@ class WatchlistSearch extends Component { use WithPagination; - public $user; + public ?\Illuminate\Contracts\Auth\Authenticatable $user = null; - public $perPage = 25; + public int $perPage = 25; - public $search = ''; + public string $search = ''; - public $sortField = 'created_at'; + public string $sortField = 'created_at'; - public $sortDirection = 'desc'; + public string $sortDirection = 'desc'; final public function mount(): void { diff --git a/app/Http/Middleware/CheckForAdmin.php b/app/Http/Middleware/CheckForAdmin.php index 3a6226a6a2..57408a608e 100644 --- a/app/Http/Middleware/CheckForAdmin.php +++ b/app/Http/Middleware/CheckForAdmin.php @@ -20,11 +20,10 @@ class CheckForAdmin /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request * * @return mixed */ - public function handle($request, Closure $next) + public function handle(\Illuminate\Http\Request $request, Closure $next) { \abort_unless($request->user()->group->is_admin, 403); diff --git a/app/Http/Middleware/CheckForModo.php b/app/Http/Middleware/CheckForModo.php index 02762ed2fa..1c17a4751a 100644 --- a/app/Http/Middleware/CheckForModo.php +++ b/app/Http/Middleware/CheckForModo.php @@ -20,11 +20,10 @@ class CheckForModo /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request * * @return mixed */ - public function handle($request, Closure $next) + public function handle(\Illuminate\Http\Request $request, Closure $next) { \abort_unless($request->user()->group->is_modo, 403); diff --git a/app/Http/Middleware/CheckForOwner.php b/app/Http/Middleware/CheckForOwner.php index 5aaa4ab7ef..0fb6bd849a 100644 --- a/app/Http/Middleware/CheckForOwner.php +++ b/app/Http/Middleware/CheckForOwner.php @@ -20,11 +20,10 @@ class CheckForOwner /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request * * @return mixed */ - public function handle($request, Closure $next) + public function handle(\Illuminate\Http\Request $request, Closure $next) { \abort_unless($request->user()->group->is_owner, 403); diff --git a/app/Http/Middleware/CheckIfBanned.php b/app/Http/Middleware/CheckIfBanned.php index 854ddbeaf5..0a7f215922 100644 --- a/app/Http/Middleware/CheckIfBanned.php +++ b/app/Http/Middleware/CheckIfBanned.php @@ -21,14 +21,12 @@ class CheckIfBanned /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request - * @param string|null $guard * * @throws \Exception * * @return mixed */ - public function handle($request, Closure $next, $guard = null) + public function handle(\Illuminate\Http\Request $request, Closure $next, ?string $guard = null) { $user = $request->user(); $bannedGroup = \cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id')); diff --git a/app/Http/Middleware/Http2ServerPush.php b/app/Http/Middleware/Http2ServerPush.php index ec9e22777f..d99ef6fa36 100644 --- a/app/Http/Middleware/Http2ServerPush.php +++ b/app/Http/Middleware/Http2ServerPush.php @@ -23,10 +23,8 @@ class Http2ServerPush { /** * The DomCrawler instance. - * - * @var \Symfony\Component\DomCrawler\Crawler */ - protected $crawler; + protected ?\Symfony\Component\DomCrawler\Crawler $crawler = null; /** * @var string[] @@ -38,14 +36,8 @@ class Http2ServerPush /** * Handle an incoming request. - * - * @param null $limit - * @param null $sizeLimit - * @param null $excludeKeywords - * - * @return mixed */ - public function handle(Request $request, Closure $next, $limit = null, $sizeLimit = null, $excludeKeywords = null) + public function handle(Request $request, Closure $next, $limit = null, $sizeLimit = null, $excludeKeywords = null): mixed { $response = $next($request); @@ -67,14 +59,7 @@ public function getConfig($key, $default = false) return \config('http2serverpush.'.$key, $default); } - /** - * @param null $limit - * @param null $sizeLimit - * @param null $excludeKeywords - * - * @return $this - */ - protected function generateAndAttachLinkHeaders(Response $response, $limit = null, $sizeLimit = null, $excludeKeywords = null) + protected function generateAndAttachLinkHeaders(Response $response, $limit = null, $sizeLimit = null, $excludeKeywords = null): static { $excludeKeywords ?? $this->getConfig('exclude_keywords', []); $headers = $this->fetchLinkableNodes($response) @@ -127,11 +112,9 @@ protected function getCrawler(Response $response) /** * Get all nodes we are interested in pushing. * - * @param \Illuminate\Http\Response $response * - * @return \Illuminate\Support\Collection */ - protected function fetchLinkableNodes($response) + protected function fetchLinkableNodes(\Illuminate\Http\Response $response): \Illuminate\Support\Collection { $crawler = $this->getCrawler($response); @@ -141,11 +124,10 @@ protected function fetchLinkableNodes($response) /** * Build out header string based on asset extension. * - * @param string $url * * @return string */ - private function buildLinkHeaderString($url) + private function buildLinkHeaderString(string $url) { $type = \collect(self::LINK_TYPE_MAP)->first(fn ($type, $extension) => Str::contains(\strtoupper($url), $extension)); if (! \preg_match('#^https?://#i', $url)) { @@ -161,7 +143,7 @@ private function buildLinkHeaderString($url) * * @param $link */ - private function addLinkHeader(Response $response, $link) + private function addLinkHeader(Response $response, $link): void { if ($response->headers->get('Link')) { $link = $response->headers->get('Link').','.$link; diff --git a/app/Http/Middleware/SetLanguage.php b/app/Http/Middleware/SetLanguage.php index 7405ae4ca2..2034653970 100644 --- a/app/Http/Middleware/SetLanguage.php +++ b/app/Http/Middleware/SetLanguage.php @@ -22,10 +22,8 @@ class SetLanguage { /** * This function checks if language to set is an allowed lang of config. - * - * @param string $locale */ - private function setLocale($locale) + private function setLocale(string $locale): void { // Check if is allowed and set default locale if not if (! Language::allowed($locale)) { @@ -56,12 +54,12 @@ private function setLocale($locale) } } - public function setDefaultLocale() + public function setDefaultLocale(): void { $this->setLocale(\config('app.locale')); } - public function setUserLocale() + public function setUserLocale(): void { $user = \auth()->user(); @@ -72,7 +70,7 @@ public function setUserLocale() } } - public function setSystemLocale($request) + public function setSystemLocale($request): void { if ($request->session()->has('locale')) { $this->setLocale(\session('locale')); @@ -84,11 +82,10 @@ public function setSystemLocale($request) /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request * * @return mixed */ - public function handle($request, Closure $next) + public function handle(\Illuminate\Http\Request $request, Closure $next) { if ($request->has('lang')) { $this->setLocale($request->get('lang')); diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php index 24026f004f..1240209a72 100644 --- a/app/Http/Middleware/TrustHosts.php +++ b/app/Http/Middleware/TrustHosts.php @@ -19,10 +19,8 @@ class TrustHosts extends Middleware { /** * Get the host patterns that should be trusted. - * - * @return array */ - public function hosts() + public function hosts(): array { return [ $this->allSubdomainsOfApplicationUrl(), diff --git a/app/Http/Middleware/UpdateLastAction.php b/app/Http/Middleware/UpdateLastAction.php index 58f8b2baef..a52e178209 100644 --- a/app/Http/Middleware/UpdateLastAction.php +++ b/app/Http/Middleware/UpdateLastAction.php @@ -20,11 +20,10 @@ class UpdateLastAction /** * Handle an incoming request. * - * @param \Illuminate\Http\Request $request * * @return mixed */ - public function handle($request, Closure $next) + public function handle(\Illuminate\Http\Request $request, Closure $next) { if (! $user = $request->user()) { return $next($request); diff --git a/app/Http/Requests/StorePoll.php b/app/Http/Requests/StorePoll.php index abbb4745d0..ff4e820e7c 100644 --- a/app/Http/Requests/StorePoll.php +++ b/app/Http/Requests/StorePoll.php @@ -22,20 +22,16 @@ class StorePoll extends FormRequest { /** * Determine if the user is authorized to make this request. - * - * @return bool */ - public function authorize() + public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. - * - * @return array */ - public function rules() + public function rules(): array { return [ 'title' => 'required|min:10', @@ -46,10 +42,8 @@ public function rules() /** * Get the error messages for the defined validation rules. - * - * @return array */ - public function messages() + public function messages(): array { return [ 'options.*.filled' => 'You must fill in all options fields', diff --git a/app/Http/Requests/VoteOnPoll.php b/app/Http/Requests/VoteOnPoll.php index a87a44b846..f1e7f4f720 100644 --- a/app/Http/Requests/VoteOnPoll.php +++ b/app/Http/Requests/VoteOnPoll.php @@ -22,20 +22,16 @@ class VoteOnPoll extends FormRequest { /** * Determine if the user is authorized to make this request. - * - * @return bool */ - public function authorize() + public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. - * - * @return array */ - public function rules() + public function rules(): array { return [ 'option' => 'required|min:1', @@ -44,10 +40,8 @@ public function rules() /** * Get the error messages for the defined validation rules. - * - * @return array */ - public function messages() + public function messages(): array { return [ 'option.required' => 'You must select an answer', diff --git a/app/Http/Resources/BotResource.php b/app/Http/Resources/BotResource.php index 1cea731c2d..939d3f4ec2 100644 --- a/app/Http/Resources/BotResource.php +++ b/app/Http/Resources/BotResource.php @@ -21,10 +21,8 @@ class BotResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable { return parent::toArray($request); } diff --git a/app/Http/Resources/ChatMessageResource.php b/app/Http/Resources/ChatMessageResource.php index 68cfbb1806..bba7e23fe6 100644 --- a/app/Http/Resources/ChatMessageResource.php +++ b/app/Http/Resources/ChatMessageResource.php @@ -25,10 +25,8 @@ class ChatMessageResource extends JsonResource * @param \Illuminate\Http\Request $request * * @throws \Illuminate\Contracts\Container\BindingResolutionException - * - * @return array */ - public function toArray($request) + public function toArray($request): array { $emojiOne = \app()->make(LaravelJoyPixels::class); diff --git a/app/Http/Resources/ChatRoomResource.php b/app/Http/Resources/ChatRoomResource.php index 97ebff0551..67b8a21633 100644 --- a/app/Http/Resources/ChatRoomResource.php +++ b/app/Http/Resources/ChatRoomResource.php @@ -21,10 +21,8 @@ class ChatRoomResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, diff --git a/app/Http/Resources/ChatUserResource.php b/app/Http/Resources/ChatUserResource.php index 28e5893451..35f1334c27 100644 --- a/app/Http/Resources/ChatUserResource.php +++ b/app/Http/Resources/ChatUserResource.php @@ -21,10 +21,8 @@ class ChatUserResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, diff --git a/app/Http/Resources/TorrentResource.php b/app/Http/Resources/TorrentResource.php index eebabf1b73..117a3646da 100644 --- a/app/Http/Resources/TorrentResource.php +++ b/app/Http/Resources/TorrentResource.php @@ -23,10 +23,8 @@ class TorrentResource extends JsonResource * Transform the resource into an array. * * @param $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { $meta = null; @@ -75,10 +73,8 @@ public function toArray($request) * * @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Response $response - * - * @return void */ - public function withResponse($request, $response) + public function withResponse($request, $response): void { $response->setEncodingOptions(JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); } diff --git a/app/Http/Resources/TorrentsResource.php b/app/Http/Resources/TorrentsResource.php index 53138e182a..b12b54b0a1 100644 --- a/app/Http/Resources/TorrentsResource.php +++ b/app/Http/Resources/TorrentsResource.php @@ -21,10 +21,8 @@ class TorrentsResource extends ResourceCollection * Transform the resource collection into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'data' => TorrentResource::collection($this->collection), @@ -35,10 +33,8 @@ public function toArray($request) * Get additional data that should be returned with the resource array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function with($request) + public function with($request): array { return [ 'links' => [ @@ -52,10 +48,8 @@ public function with($request) * * @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Response $response - * - * @return void */ - public function withResponse($request, $response) + public function withResponse($request, $response): void { $response->setEncodingOptions(JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT); } diff --git a/app/Http/Resources/UserAudibleResource.php b/app/Http/Resources/UserAudibleResource.php index e4447a550c..9d8b65b9d9 100644 --- a/app/Http/Resources/UserAudibleResource.php +++ b/app/Http/Resources/UserAudibleResource.php @@ -21,10 +21,8 @@ class UserAudibleResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, diff --git a/app/Http/Resources/UserEchoResource.php b/app/Http/Resources/UserEchoResource.php index 7160b94c6f..fc454a496e 100644 --- a/app/Http/Resources/UserEchoResource.php +++ b/app/Http/Resources/UserEchoResource.php @@ -21,10 +21,8 @@ class UserEchoResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array { return [ 'id' => $this->id, diff --git a/app/Http/Resources/UserResource.php b/app/Http/Resources/UserResource.php index 8a896c4bdf..b6beef4109 100644 --- a/app/Http/Resources/UserResource.php +++ b/app/Http/Resources/UserResource.php @@ -21,10 +21,8 @@ class UserResource extends JsonResource * Transform the resource into an array. * * @param \Illuminate\Http\Request $request - * - * @return array */ - public function toArray($request) + public function toArray($request): array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable { return parent::toArray($request); } diff --git a/app/Jobs/ProcessBackup.php b/app/Jobs/ProcessBackup.php index c3c96ead8b..a87cb903f2 100644 --- a/app/Jobs/ProcessBackup.php +++ b/app/Jobs/ProcessBackup.php @@ -25,13 +25,13 @@ class ProcessBackup implements ShouldQueue use InteractsWithQueue; use Queueable; - public $timeout = 0; + public int $timeout = 0; public function __construct(protected $option = '') { } - public function handle() + public function handle(): void { $backupJob = BackupJobFactory::createFromArray(config('backup')); diff --git a/app/Jobs/ProcessBasicAnnounceRequest.php b/app/Jobs/ProcessBasicAnnounceRequest.php index 17292ea778..1b95054fe1 100644 --- a/app/Jobs/ProcessBasicAnnounceRequest.php +++ b/app/Jobs/ProcessBasicAnnounceRequest.php @@ -46,10 +46,8 @@ public function __construct(protected $queries, protected User $user, protected * Execute the job. * * @throws \App\Exceptions\TrackerException - * - * @return void */ - public function handle() + public function handle(): void { // Get The Current Peer $peer = Peer::where('torrent_id', '=', $this->torrent->id) diff --git a/app/Jobs/ProcessCollectionJob.php b/app/Jobs/ProcessCollectionJob.php index b14fb4236e..ff1da97137 100644 --- a/app/Jobs/ProcessCollectionJob.php +++ b/app/Jobs/ProcessCollectionJob.php @@ -38,10 +38,8 @@ public function __construct(public $collection) /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { foreach ($this->collection['parts'] as $parts) { $metadata = new TMDBScraper(); diff --git a/app/Jobs/ProcessCompanyJob.php b/app/Jobs/ProcessCompanyJob.php index 2726bad51b..baa6d246d5 100644 --- a/app/Jobs/ProcessCompanyJob.php +++ b/app/Jobs/ProcessCompanyJob.php @@ -38,10 +38,8 @@ public function __construct(public $company) /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { foreach ($this->company['movie'] as $movie) { $metadata = new TMDBScraper(); diff --git a/app/Jobs/ProcessCompletedAnnounceRequest.php b/app/Jobs/ProcessCompletedAnnounceRequest.php index 3993099f32..0da3a6c136 100644 --- a/app/Jobs/ProcessCompletedAnnounceRequest.php +++ b/app/Jobs/ProcessCompletedAnnounceRequest.php @@ -46,10 +46,8 @@ public function __construct(protected $queries, protected User $user, protected * Execute the job. * * @throws \Exception - * - * @return void */ - public function handle() + public function handle(): void { // Get The Current Peer $peer = Peer::where('torrent_id', '=', $this->torrent->id) diff --git a/app/Jobs/ProcessMassPM.php b/app/Jobs/ProcessMassPM.php index 26b0d1113a..5b62ed0cbb 100644 --- a/app/Jobs/ProcessMassPM.php +++ b/app/Jobs/ProcessMassPM.php @@ -51,10 +51,8 @@ public function __construct(protected $senderId, protected $receiverId, protecte /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { $privateMessage = new PrivateMessage(); $privateMessage->sender_id = $this->senderId; diff --git a/app/Jobs/ProcessMovieJob.php b/app/Jobs/ProcessMovieJob.php index 4ae0254bb6..aa139a47f8 100644 --- a/app/Jobs/ProcessMovieJob.php +++ b/app/Jobs/ProcessMovieJob.php @@ -45,7 +45,7 @@ public function __construct(public $movie) { } - public function handle() + public function handle(): void { $tmdb = new TMDB(); diff --git a/app/Jobs/ProcessStartedAnnounceRequest.php b/app/Jobs/ProcessStartedAnnounceRequest.php index ed3a1bae21..829f0cc5cf 100644 --- a/app/Jobs/ProcessStartedAnnounceRequest.php +++ b/app/Jobs/ProcessStartedAnnounceRequest.php @@ -42,20 +42,16 @@ public function __construct(protected $queries, protected User $user, protected /** * Get the middleware the job should pass through. - * - * @return array */ - public function middleware() + public function middleware(): array { return [new WithoutOverlapping($this->user->id.'.'.$this->queries['info_hash'])]; } /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { // Get The Current Peer $peer = Peer::where('torrent_id', '=', $this->torrent->id) diff --git a/app/Jobs/ProcessStoppedAnnounceRequest.php b/app/Jobs/ProcessStoppedAnnounceRequest.php index fa8d19f111..7d010a20ec 100644 --- a/app/Jobs/ProcessStoppedAnnounceRequest.php +++ b/app/Jobs/ProcessStoppedAnnounceRequest.php @@ -46,10 +46,8 @@ public function __construct(protected $queries, protected User $user, protected * Execute the job. * * @throws \Exception - * - * @return void */ - public function handle() + public function handle(): void { // Get The Current Peer $peer = Peer::where('torrent_id', '=', $this->torrent->id) diff --git a/app/Jobs/ProcessTvJob.php b/app/Jobs/ProcessTvJob.php index f588162320..37c76a456a 100644 --- a/app/Jobs/ProcessTvJob.php +++ b/app/Jobs/ProcessTvJob.php @@ -50,7 +50,7 @@ public function __construct(public $tv, public $id) { } - public function handle() + public function handle(): void { $tmdb = new TMDB(); diff --git a/app/Jobs/SendActivationMail.php b/app/Jobs/SendActivationMail.php index a300c0875f..19bffe31a5 100644 --- a/app/Jobs/SendActivationMail.php +++ b/app/Jobs/SendActivationMail.php @@ -31,10 +31,8 @@ class SendActivationMail implements ShouldQueue /** * The number of times the job may be attempted. - * - * @var int */ - public $tries = 3; + public int $tries = 3; /** * SendActivationMail Constructor. @@ -47,10 +45,8 @@ public function __construct(public User $user, public $code) /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { if ($this->attempts() > 2) { $this->delay(\min(30 * $this->attempts(), 300)); diff --git a/app/Jobs/SendDeleteUserMail.php b/app/Jobs/SendDeleteUserMail.php index dd410b87bd..6acca36e60 100644 --- a/app/Jobs/SendDeleteUserMail.php +++ b/app/Jobs/SendDeleteUserMail.php @@ -31,10 +31,8 @@ class SendDeleteUserMail implements ShouldQueue /** * The number of times the job may be attempted. - * - * @var int */ - public $tries = 3; + public int $tries = 3; /** * SendDeleteUserMail Constructor. @@ -45,10 +43,8 @@ public function __construct(public User $user) /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { if ($this->attempts() > 2) { $this->delay(\min(30 * $this->attempts(), 300)); diff --git a/app/Jobs/SendDisableUserMail.php b/app/Jobs/SendDisableUserMail.php index a7ccd598e2..78c20f08a8 100644 --- a/app/Jobs/SendDisableUserMail.php +++ b/app/Jobs/SendDisableUserMail.php @@ -31,10 +31,8 @@ class SendDisableUserMail implements ShouldQueue /** * The number of times the job may be attempted. - * - * @var int */ - public $tries = 3; + public int $tries = 3; /** * SendDisableUserMail Constructor. @@ -45,10 +43,8 @@ public function __construct(public User $user) /** * Execute the job. - * - * @return void */ - public function handle() + public function handle(): void { if ($this->attempts() > 2) { $this->delay(\min(30 * $this->attempts(), 300)); diff --git a/app/Listeners/AchievementUnlocked.php b/app/Listeners/AchievementUnlocked.php index c129649bb7..443faea699 100644 --- a/app/Listeners/AchievementUnlocked.php +++ b/app/Listeners/AchievementUnlocked.php @@ -30,10 +30,8 @@ public function __construct(private ChatRepository $chatRepository) /** * Handle the event. * - * - * @return void */ - public function handle(Unlocked $unlocked) + public function handle(Unlocked $unlocked): void { // There's an AchievementProgress instance located on $event->progress $user = User::where('id', '=', $unlocked->progress->achiever_id)->first(); diff --git a/app/Listeners/FailedLoginListener.php b/app/Listeners/FailedLoginListener.php index f870b598ca..f922d34cbd 100644 --- a/app/Listeners/FailedLoginListener.php +++ b/app/Listeners/FailedLoginListener.php @@ -25,10 +25,8 @@ class FailedLoginListener * @param auth.failed $event * * @throws \Exception - * - * @return void */ - public function handle($event) + public function handle($event): void { $bannedGroup = \cache()->rememberForever('banned_group', fn () => Group::where('slug', '=', 'banned')->pluck('id')); diff --git a/app/Listeners/LoginListener.php b/app/Listeners/LoginListener.php index 408de73ec9..6287c9a202 100644 --- a/app/Listeners/LoginListener.php +++ b/app/Listeners/LoginListener.php @@ -21,10 +21,8 @@ class LoginListener * Handle the event. * * @param auth.login $event - * - * @return void */ - public function handle($event) + public function handle($event): void { // Update Login Timestamp $event->user->last_login = Carbon::now(); diff --git a/app/Listeners/NotifyStaffCommentWasCreated.php b/app/Listeners/NotifyStaffCommentWasCreated.php index 0df357cb16..1ac4eb580a 100644 --- a/app/Listeners/NotifyStaffCommentWasCreated.php +++ b/app/Listeners/NotifyStaffCommentWasCreated.php @@ -33,10 +33,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(CommentCreated $event) + public function handle(CommentCreated $event): void { $staff = User::where(['is_modo' => 1])->limit(1)->get(); Notification::send($staff, new StaffCommentCreated($event->comment)); diff --git a/app/Listeners/NotifyStaffTicketWasAssigned.php b/app/Listeners/NotifyStaffTicketWasAssigned.php index 4e16dfb7c5..a1d0072441 100644 --- a/app/Listeners/NotifyStaffTicketWasAssigned.php +++ b/app/Listeners/NotifyStaffTicketWasAssigned.php @@ -33,10 +33,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketAssigned $event) + public function handle(TicketAssigned $event): void { $staff = User::where(['is_modo' => 1])->limit(1)->get(); Notification::send($staff, new StaffTicketAssigned($event->ticket)); diff --git a/app/Listeners/NotifyStaffTicketWasClosed.php b/app/Listeners/NotifyStaffTicketWasClosed.php index 9f651d067e..728464a257 100644 --- a/app/Listeners/NotifyStaffTicketWasClosed.php +++ b/app/Listeners/NotifyStaffTicketWasClosed.php @@ -33,10 +33,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketClosed $event) + public function handle(TicketClosed $event): void { $staff = User::where(['is_modo' => 1])->limit(1)->get(); Notification::send($staff, new StaffTicketClosed($event->ticket)); diff --git a/app/Listeners/NotifyStaffTicketWasCreated.php b/app/Listeners/NotifyStaffTicketWasCreated.php index c51622cc97..693e1ee416 100644 --- a/app/Listeners/NotifyStaffTicketWasCreated.php +++ b/app/Listeners/NotifyStaffTicketWasCreated.php @@ -30,10 +30,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketCreated $event) + public function handle(TicketCreated $event): void { // } diff --git a/app/Listeners/NotifyUserCommentWasCreated.php b/app/Listeners/NotifyUserCommentWasCreated.php index cf07d3ca58..7aa74d7373 100644 --- a/app/Listeners/NotifyUserCommentWasCreated.php +++ b/app/Listeners/NotifyUserCommentWasCreated.php @@ -30,10 +30,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(CommentCreated $event) + public function handle(CommentCreated $event): void { // } diff --git a/app/Listeners/NotifyUserTicketIsStale.php b/app/Listeners/NotifyUserTicketIsStale.php index 6ab3960213..dd9824aa1c 100644 --- a/app/Listeners/NotifyUserTicketIsStale.php +++ b/app/Listeners/NotifyUserTicketIsStale.php @@ -31,10 +31,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketWentStale $event) + public function handle(TicketWentStale $event): void { $event->ticket->user->notify(new UserTicketStale($event->ticket)); $event->ticket->update(['reminded_at' => \time()]); diff --git a/app/Listeners/NotifyUserTicketWasAssigned.php b/app/Listeners/NotifyUserTicketWasAssigned.php index 905ba74421..85d13f3969 100644 --- a/app/Listeners/NotifyUserTicketWasAssigned.php +++ b/app/Listeners/NotifyUserTicketWasAssigned.php @@ -30,10 +30,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketAssigned $event) + public function handle(TicketAssigned $event): void { // } diff --git a/app/Listeners/NotifyUserTicketWasClosed.php b/app/Listeners/NotifyUserTicketWasClosed.php index e286426b99..fde3f83f85 100644 --- a/app/Listeners/NotifyUserTicketWasClosed.php +++ b/app/Listeners/NotifyUserTicketWasClosed.php @@ -30,10 +30,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketClosed $event) + public function handle(TicketClosed $event): void { // } diff --git a/app/Listeners/NotifyUserTicketWasCreated.php b/app/Listeners/NotifyUserTicketWasCreated.php index 316968b187..bdb5c535fc 100644 --- a/app/Listeners/NotifyUserTicketWasCreated.php +++ b/app/Listeners/NotifyUserTicketWasCreated.php @@ -30,10 +30,8 @@ public function __construct() /** * Handle the event. * - * - * @return void */ - public function handle(TicketCreated $event) + public function handle(TicketCreated $event): void { // } diff --git a/app/Mail/ActivateUser.php b/app/Mail/ActivateUser.php index b79b641250..b22baf8b3a 100644 --- a/app/Mail/ActivateUser.php +++ b/app/Mail/ActivateUser.php @@ -32,7 +32,7 @@ public function __construct(public User $user, public $code) { } - public function build() + public function build(): static { return $this->markdown('emails.activate') ->subject('Activation Required '.\config('other.title')); diff --git a/app/Mail/BanUser.php b/app/Mail/BanUser.php index f80991b028..fe13216c9c 100644 --- a/app/Mail/BanUser.php +++ b/app/Mail/BanUser.php @@ -34,10 +34,8 @@ public function __construct(public $email, public $ban) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.ban') ->subject('You Have Been Banned - '.\config('other.title')); diff --git a/app/Mail/Contact.php b/app/Mail/Contact.php index 2c71614841..a6f07a66de 100644 --- a/app/Mail/Contact.php +++ b/app/Mail/Contact.php @@ -31,10 +31,8 @@ public function __construct(public array $input) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.contact') ->from($this->input['email'], \config('other.title')) diff --git a/app/Mail/DeleteUser.php b/app/Mail/DeleteUser.php index 43c323abac..7c9089696b 100644 --- a/app/Mail/DeleteUser.php +++ b/app/Mail/DeleteUser.php @@ -33,10 +33,8 @@ public function __construct(public $email) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.pruned') ->subject('Your Account Has Been Pruned - '.\config('other.title')); diff --git a/app/Mail/DenyApplication.php b/app/Mail/DenyApplication.php index c171871a19..833465c7db 100644 --- a/app/Mail/DenyApplication.php +++ b/app/Mail/DenyApplication.php @@ -33,10 +33,8 @@ public function __construct(public $deniedMessage) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.deny_application')->subject('Your Application Has Been Denied!'); } diff --git a/app/Mail/DisableUser.php b/app/Mail/DisableUser.php index 24feaf6dcc..1f36a9d29e 100644 --- a/app/Mail/DisableUser.php +++ b/app/Mail/DisableUser.php @@ -33,10 +33,8 @@ public function __construct(public $email) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.disabled') ->subject('Your Account Has Been Disabled - '.\config('other.title')); diff --git a/app/Mail/InviteUser.php b/app/Mail/InviteUser.php index 4901b818be..e64d436b95 100644 --- a/app/Mail/InviteUser.php +++ b/app/Mail/InviteUser.php @@ -32,10 +32,8 @@ public function __construct(public Invite $invite) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.invite') ->subject('Invite Received '.\config('other.title')); diff --git a/app/Mail/TestEmail.php b/app/Mail/TestEmail.php index f39517867c..36424930e1 100644 --- a/app/Mail/TestEmail.php +++ b/app/Mail/TestEmail.php @@ -34,10 +34,8 @@ public function __construct() /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.test_email'); } diff --git a/app/Mail/UnbanUser.php b/app/Mail/UnbanUser.php index dc083276da..33258450be 100644 --- a/app/Mail/UnbanUser.php +++ b/app/Mail/UnbanUser.php @@ -34,10 +34,8 @@ public function __construct(public $email, public $ban) /** * Build the message. - * - * @return $this */ - public function build() + public function build(): static { return $this->markdown('emails.unban') ->subject('You Have Been Unbanned - '.\config('other.title')); diff --git a/app/Models/Album.php b/app/Models/Album.php index f0b6ad3345..f18530f0e4 100644 --- a/app/Models/Album.php +++ b/app/Models/Album.php @@ -52,10 +52,8 @@ class Album extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -65,10 +63,8 @@ public function user() /** * Has Many Images. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function images() + public function images(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Image::class); } diff --git a/app/Models/Application.php b/app/Models/Application.php index 0bf35751a4..8c22cebfe8 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -61,40 +61,32 @@ class Application extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Application Has Been Moderated By. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function moderated() + public function moderated(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'moderated_by'); } /** * A Application Has Many Image Proofs. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function imageProofs() + public function imageProofs(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ApplicationImageProof::class); } /** * A Application Has Many URL Proofs. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function urlProofs() + public function urlProofs(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(ApplicationUrlProof::class); } diff --git a/app/Models/ApplicationImageProof.php b/app/Models/ApplicationImageProof.php index 035f40819e..7d12fed8a2 100644 --- a/app/Models/ApplicationImageProof.php +++ b/app/Models/ApplicationImageProof.php @@ -52,10 +52,8 @@ class ApplicationImageProof extends Model /** * Belongs To A Application. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function application() + public function application(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Application::class); } diff --git a/app/Models/ApplicationUrlProof.php b/app/Models/ApplicationUrlProof.php index 3ef40bf6df..ca1eae0d0e 100644 --- a/app/Models/ApplicationUrlProof.php +++ b/app/Models/ApplicationUrlProof.php @@ -52,10 +52,8 @@ class ApplicationUrlProof extends Model /** * Belongs To A Application. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function application() + public function application(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Application::class); } diff --git a/app/Models/Article.php b/app/Models/Article.php index 31eb82c743..c9e88dd48c 100644 --- a/app/Models/Article.php +++ b/app/Models/Article.php @@ -55,10 +55,8 @@ class Article extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -68,10 +66,8 @@ public function user() /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class); } @@ -79,13 +75,10 @@ public function comments() /** * Article Trimming. * - * @param int $length - * @param bool $ellipses - * @param bool $stripHtml * * @return string Formatted And Trimmed Content */ - public function getBrief($length = 20, $ellipses = true, $stripHtml = false) + public function getBrief(int $length = 20, bool $ellipses = true, bool $stripHtml = false): string { $input = $this->content; //strip tags, if desired @@ -113,11 +106,9 @@ public function getBrief($length = 20, $ellipses = true, $stripHtml = false) /** * Set The Articles Content After Its Been Purified. * - * @param string $value * - * @return void */ - public function setContentAttribute($value) + public function setContentAttribute(string $value): void { $this->attributes['content'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -127,7 +118,7 @@ public function setContentAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getContentHtml() + public function getContentHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); diff --git a/app/Models/Audit.php b/app/Models/Audit.php index 1687ec3f24..116f0134f6 100644 --- a/app/Models/Audit.php +++ b/app/Models/Audit.php @@ -57,10 +57,8 @@ class Audit extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Models/Ban.php b/app/Models/Ban.php index 4838561fd6..d5c3b64ca4 100644 --- a/app/Models/Ban.php +++ b/app/Models/Ban.php @@ -51,10 +51,8 @@ class Ban extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function banneduser() + public function banneduser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'owned_by')->withDefault([ 'username' => 'System', @@ -64,10 +62,8 @@ public function banneduser() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staffuser() + public function staffuser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'created_by')->withDefault([ 'username' => 'System', diff --git a/app/Models/BonExchange.php b/app/Models/BonExchange.php index 1a911fd513..49208119b7 100644 --- a/app/Models/BonExchange.php +++ b/app/Models/BonExchange.php @@ -75,10 +75,8 @@ class BonExchange extends Model /** * @method getDownloadOptions - * - * @return array */ - public function getDownloadOptions() + public function getDownloadOptions(): array { return self::where('download', '=', true) ->orderBy('value', 'asc') @@ -87,10 +85,8 @@ public function getDownloadOptions() /** * @method getUploadOptions - * - * @return array */ - public function getUploadOptions() + public function getUploadOptions(): array { return self::where('upload', '=', true) ->orderBy('value', 'asc') @@ -99,10 +95,8 @@ public function getUploadOptions() /** * @method getPersonalFreeleechOption - * - * @return array */ - public function getPersonalFreeleechOption() + public function getPersonalFreeleechOption(): array { return self::where('personal_freeleech', '=', true) ->orderBy('value', 'asc') @@ -111,10 +105,8 @@ public function getPersonalFreeleechOption() /** * @method getInviteOption - * - * @return array */ - public function getInviteOption() + public function getInviteOption(): array { return self::where('invite', '=', true) ->orderBy('value', 'asc') @@ -125,10 +117,8 @@ public function getInviteOption() * @method getItemCost * * @param $id - * - * @return int */ - public function getItemCost($id) + public function getItemCost($id): int { return self::where('id', '=', $id) ->get() diff --git a/app/Models/BonTransactions.php b/app/Models/BonTransactions.php index 694bc2cc39..20f4efea4e 100644 --- a/app/Models/BonTransactions.php +++ b/app/Models/BonTransactions.php @@ -70,13 +70,9 @@ class BonTransactions extends Model /** * Belongs To A Sender. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - // Bad name to not conflict with sender (not sender_id) - - public function senderObj() + public function senderObj(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'sender', 'id')->withDefault([ 'username' => 'System', @@ -86,13 +82,9 @@ public function senderObj() /** * Belongs To A Receiver. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - // Bad name to not conflict with sender (not sender_id) - - public function receiverObj() + public function receiverObj(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'receiver', 'id')->withDefault([ 'username' => 'System', @@ -102,10 +94,8 @@ public function receiverObj() /** * Belongs To BonExchange. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function exchange() + public function exchange(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(BonExchange::class, 'itemID', 'id')->withDefault([ 'value' => 0, diff --git a/app/Models/Bookmark.php b/app/Models/Bookmark.php index dabd9e80cd..1c7b1e8ce1 100644 --- a/app/Models/Bookmark.php +++ b/app/Models/Bookmark.php @@ -45,10 +45,8 @@ class Bookmark extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -58,10 +56,8 @@ public function user() /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } diff --git a/app/Models/BotTransaction.php b/app/Models/BotTransaction.php index 0393281a11..259207b51e 100644 --- a/app/Models/BotTransaction.php +++ b/app/Models/BotTransaction.php @@ -62,13 +62,9 @@ class BotTransaction extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - // Bad name to not conflict with sender (not sender_id) - - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -78,13 +74,9 @@ public function user() /** * Belongs To A Bot. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - // Bad name to not conflict with sender (not sender_id) - - public function bot() + public function bot(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Bot::class)->withDefault([ 'username' => 'System', @@ -94,10 +86,8 @@ public function bot() /** * Get the Bot transaction type answer as string. - * - * @return int */ - public function forHumans() + public function forHumans(): string { if ($this->type == 'bon') { return 'BON'; diff --git a/app/Models/Cast.php b/app/Models/Cast.php index ba0bac2e4a..2246435a23 100644 --- a/app/Models/Cast.php +++ b/app/Models/Cast.php @@ -23,34 +23,22 @@ class Cast extends Model public $table = 'cast'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class, 'cast_tv', 'tv_id', 'cast_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function season() + public function season(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Season::class, 'cast_season', 'season_id', 'cast_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function episode() + public function episode(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Episode::class, 'cast_episode', 'episode_id', 'cast_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class, 'cast_movie', 'movie_id', 'cast_id'); } diff --git a/app/Models/Category.php b/app/Models/Category.php index 8e2bd41976..d2093a0798 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -68,20 +68,16 @@ class Category extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } diff --git a/app/Models/ChatStatus.php b/app/Models/ChatStatus.php index ef25b4a117..362ccb2868 100644 --- a/app/Models/ChatStatus.php +++ b/app/Models/ChatStatus.php @@ -47,10 +47,8 @@ class ChatStatus extends Model /** * A Status Has Many Users. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function users() + public function users(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(User::class, 'chat_status_id', 'id'); } diff --git a/app/Models/Chatroom.php b/app/Models/Chatroom.php index ecedff7f04..3f5c997d9f 100644 --- a/app/Models/Chatroom.php +++ b/app/Models/Chatroom.php @@ -58,20 +58,16 @@ class Chatroom extends Model /** * A User Has Many Messages. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function messages() + public function messages(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Message::class); } /** * A Chat Room Has Many Users. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function users() + public function users(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(User::class); } diff --git a/app/Models/Collection.php b/app/Models/Collection.php index 68774a14d1..48b024961c 100644 --- a/app/Models/Collection.php +++ b/app/Models/Collection.php @@ -25,18 +25,13 @@ class Collection extends Model /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class, 'collection_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class); } diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 23db6b6e0d..10e58534f1 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -62,10 +62,8 @@ class Comment extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -75,50 +73,40 @@ public function user() /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A Article. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function article() + public function article(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Article::class); } /** * Belongs To A Request. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function request() + public function request(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(TorrentRequest::class, 'requests_id', 'id'); } /** * Belongs To A Playlist. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function playlist() + public function playlist(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Playlist::class); } /** * Belongs To A Ticket. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function ticket() + public function ticket(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Ticket::class); } @@ -126,11 +114,9 @@ public function ticket() /** * Set The Comments Content After Its Been Purified. * - * @param string $value * - * @return void */ - public function setContentAttribute($value) + public function setContentAttribute(string $value): void { $this->attributes['content'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -140,7 +126,7 @@ public function setContentAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getContentHtml() + public function getContentHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); @@ -151,7 +137,7 @@ public function getContentHtml() /** * Nootify Staff There Is Stale Tickets. */ - public static function checkForStale(Ticket $ticket) + public static function checkForStale(Ticket $ticket): void { if (empty($ticket->reminded_at) || \strtotime($ticket->reminded_at) < \strtotime('+ 3 days')) { $last_comment = $ticket->comments()->orderBy('id', 'desc')->first(); diff --git a/app/Models/Company.php b/app/Models/Company.php index 634e80b9b7..3f6824e90c 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -23,18 +23,12 @@ class Company extends Model public $table = 'companies'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class); } diff --git a/app/Models/Crew.php b/app/Models/Crew.php index 1df4f42486..5bad1955c7 100644 --- a/app/Models/Crew.php +++ b/app/Models/Crew.php @@ -23,34 +23,22 @@ class Crew extends Model public $table = 'person'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class, 'crew_tv', 'tv_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function season() + public function season(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Season::class, 'crew_season', 'season_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function episode() + public function episode(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Episode::class, 'crew_episode', 'episode_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class, 'crew_movie', 'movie_id', 'person_id'); } diff --git a/app/Models/Distributor.php b/app/Models/Distributor.php index f3928021ac..d4ca871c9e 100644 --- a/app/Models/Distributor.php +++ b/app/Models/Distributor.php @@ -31,20 +31,16 @@ class Distributor extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } diff --git a/app/Models/Episode.php b/app/Models/Episode.php index 12b25c5745..ce8a42d35a 100644 --- a/app/Models/Episode.php +++ b/app/Models/Episode.php @@ -19,51 +19,36 @@ class Episode extends Model { protected $guarded = []; - protected $orderBy = 'order'; + protected string $orderBy = 'order'; - protected $orderDirection = 'ASC'; + protected string $orderDirection = 'ASC'; public $table = 'episodes'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo - */ - public function season() + public function season(): \Illuminate\Database\Query\Builder { return $this->belongsTo(Season::class) ->orderBy('season_id') ->orderBy('episode_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function person() + public function person(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Person::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function cast() + public function cast(): \Illuminate\Database\Query\Builder { return $this->belongsToMany(Cast::class) ->orderBy('order'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function crew() + public function crew(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Crew::class, 'crew_episode', 'person_id', 'episode_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function guest_star() + public function guest_star(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(GuestStar::class, 'episode_guest_star', 'person_id', 'episode_id'); } diff --git a/app/Models/FeaturedTorrent.php b/app/Models/FeaturedTorrent.php index 1f015b840d..326add0c3e 100644 --- a/app/Models/FeaturedTorrent.php +++ b/app/Models/FeaturedTorrent.php @@ -45,20 +45,16 @@ class FeaturedTorrent extends Model /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } diff --git a/app/Models/Follow.php b/app/Models/Follow.php index ddf3c33416..b82600773b 100644 --- a/app/Models/Follow.php +++ b/app/Models/Follow.php @@ -49,10 +49,8 @@ class Follow extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -62,10 +60,8 @@ public function user() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function target() + public function target(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Models/Forum.php b/app/Models/Forum.php index 09b3c7f95c..df840bb8b7 100644 --- a/app/Models/Forum.php +++ b/app/Models/Forum.php @@ -76,10 +76,8 @@ class Forum extends Model /** * Has Many Topic. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function topics() + public function topics(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Topic::class); } @@ -101,20 +99,16 @@ public function sub_topics() /** * Has Many Sub Forums. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function forums() + public function forums(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(self::class, 'parent_id', 'id'); } /** * Has Many Subscribed Topics. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function subscription_topics() + public function subscription_topics(): \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Relations\HasMany { if (\auth()->user() !== null) { $id = $this->id; @@ -130,20 +124,16 @@ public function subscription_topics() /** * Has Many Subscriptions. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function subscriptions() + public function subscriptions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Subscription::class, 'forum_id', 'id'); } /** * Has Many Permissions. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function permissions() + public function permissions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Permission::class); } @@ -153,10 +143,8 @@ public function permissions() * * @param $poster * @param $topic - * - * @return string */ - public function notifySubscribers($poster, $topic) + public function notifySubscribers($poster, $topic): void { $subscribers = User::selectRaw('distinct(users.id),max(users.username) as username,max(users.group_id) as group_id')->with('group')->where('users.id', '!=', $topic->first_post_user_id) ->join('subscriptions', 'subscriptions.user_id', '=', 'users.id') @@ -177,10 +165,8 @@ public function notifySubscribers($poster, $topic) * * @param $poster * @param $topic - * - * @return string */ - public function notifyStaffers($poster, $topic) + public function notifyStaffers($poster, $topic): void { $staffers = User::leftJoin('groups', 'users.group_id', '=', 'groups.id') ->select('users.id') @@ -195,10 +181,8 @@ public function notifyStaffers($poster, $topic) /** * Returns A Table With The Forums In The Category. - * - * @return string */ - public function getForumsInCategory() + public function getForumsInCategory(): string { return self::where('parent_id', '=', $this->id)->get(); } @@ -207,20 +191,16 @@ public function getForumsInCategory() * Returns A Table With The Forums In The Category. * * @param $forumId - * - * @return string */ - public function getForumsInCategoryById($forumId) + public function getForumsInCategoryById($forumId): string { return self::where('parent_id', '=', $forumId)->get(); } /** * Returns The Category Nn Which The Forum Is Located. - * - * @return string */ - public function getCategory() + public function getCategory(): string { return self::find($this->parent_id); } @@ -229,10 +209,8 @@ public function getCategory() * Count The Number Of Posts In The Forum. * * @param $forumId - * - * @return string */ - public function getPostCount($forumId) + public function getPostCount($forumId): float|int { $topics = self::find($forumId)->topics; $count = 0; @@ -247,10 +225,8 @@ public function getPostCount($forumId) * Count The Number Of Topics In The Forum. * * @param $forumId - * - * @return string */ - public function getTopicCount($forumId) + public function getTopicCount($forumId): string { $forum = self::find($forumId); @@ -259,10 +235,8 @@ public function getTopicCount($forumId) /** * Returns The Permission Field. - * - * @return string */ - public function getPermission() + public function getPermission(): string { $group = \auth()->check() ? \auth()->user()->group : Group::where('slug', 'guest')->first(); diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 29663b71a2..28b67f5ccd 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -23,18 +23,12 @@ class Genre extends Model public $table = 'genres'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class); } diff --git a/app/Models/Graveyard.php b/app/Models/Graveyard.php index 30d2b74d1b..a62a28805d 100644 --- a/app/Models/Graveyard.php +++ b/app/Models/Graveyard.php @@ -56,20 +56,16 @@ class Graveyard extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } diff --git a/app/Models/Group.php b/app/Models/Group.php index 5e51893a12..cd0fbb9779 100644 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -89,20 +89,16 @@ class Group extends Model /** * Has Many Users. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function users() + public function users(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(User::class); } /** * Has Many Permissions. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function permissions() + public function permissions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Permission::class); } @@ -126,10 +122,8 @@ public function getPermissionsByForum($forum) * * @param $object * @param $groupId - * - * @return int */ - public function isAllowed($object, $groupId) + public function isAllowed($object, $groupId): bool { if (\is_array($object) && \is_array($object['default_groups']) && \array_key_exists($groupId, $object['default_groups'])) { return $object['default_groups'][$groupId] == 1; diff --git a/app/Models/GuestStar.php b/app/Models/GuestStar.php index 24332a8c70..77b528208b 100644 --- a/app/Models/GuestStar.php +++ b/app/Models/GuestStar.php @@ -23,10 +23,7 @@ class GuestStar extends Model public $table = 'person'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function episode() + public function episode(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Episode::class, 'episode_guest_star', 'episode_id', 'person_id'); } diff --git a/app/Models/History.php b/app/Models/History.php index 8d27405a67..3bccd2cc9f 100644 --- a/app/Models/History.php +++ b/app/Models/History.php @@ -74,10 +74,8 @@ class History extends Model /** * The Columns That Are Sortable. - * - * @var array */ - public $sortable = [ + public array $sortable = [ 'id', 'agent', 'active', @@ -119,10 +117,8 @@ class History extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -132,10 +128,8 @@ public function user() /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class, 'info_hash', 'info_hash'); } diff --git a/app/Models/Image.php b/app/Models/Image.php index 59ac26a591..fa364aecc4 100644 --- a/app/Models/Image.php +++ b/app/Models/Image.php @@ -53,7 +53,7 @@ class Image extends Model /** * Belongs to User. */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Models/Internal.php b/app/Models/Internal.php index 24a5099d95..67363374c1 100644 --- a/app/Models/Internal.php +++ b/app/Models/Internal.php @@ -55,10 +55,8 @@ class Internal extends Model /** * Has Many Users. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function users() + public function users(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(User::class); } diff --git a/app/Models/Invite.php b/app/Models/Invite.php index bdea01fdfb..c4dc9f4997 100644 --- a/app/Models/Invite.php +++ b/app/Models/Invite.php @@ -55,10 +55,8 @@ class Invite extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function sender() + public function sender(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id')->withDefault([ 'username' => 'System', @@ -68,10 +66,8 @@ public function sender() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function receiver() + public function receiver(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'accepted_by')->withDefault([ 'username' => 'System', diff --git a/app/Models/Keyword.php b/app/Models/Keyword.php index 2b386211c5..cd980b7852 100644 --- a/app/Models/Keyword.php +++ b/app/Models/Keyword.php @@ -26,10 +26,8 @@ class Keyword extends Model /** * Belongs To Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Torrent::class); } diff --git a/app/Models/Language.php b/app/Models/Language.php index 45e3e05ef9..c360cd7fb4 100644 --- a/app/Models/Language.php +++ b/app/Models/Language.php @@ -22,11 +22,10 @@ class Language /** * Get single flags view. * - * @param string $code * * @return mixed */ - public static function flag($code = 'default') + public static function flag(string $code = 'default'): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { if ($code === 'default') { $code = \app()->getLocale(); @@ -41,11 +40,10 @@ public static function flag($code = 'default') /** * Get country code based on locale. * - * @param string $locale * * @return mixed */ - public static function country($locale = 'default') + public static function country(string $locale = 'default'): string { if ($locale === 'default') { $locale = \app()->getLocale(); @@ -63,7 +61,7 @@ public static function country($locale = 'default') * * @return mixed */ - public static function flags() + public static function flags(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View { return \view('vendor.language.flags'); } @@ -71,8 +69,6 @@ public static function flags() /** * Return true if $code is an allowed lang. * Get all allowed languages. - * - * @param null $locale */ public static function allowed($locale = null): bool|array { @@ -89,12 +85,8 @@ public static function allowed($locale = null): bool|array /** * Add names to an array of language codes as [$code => $language]. - * - * @param array $codes - * - * @return array */ - public static function names($codes) + public static function names(array $codes): array { // Get mode $mode = \config('language.mode'); @@ -123,11 +115,9 @@ public static function names($codes) /** * Add names to an array of language codes as [$language => $code]. * - * @param array $langs * - * @return array */ - public static function codes($langs) + public static function codes(array $langs): array { // Get mode $mode = \config('language.mode'); @@ -156,11 +146,9 @@ public static function codes($langs) /** * Returns the url to set up language and return back. * - * @param string $code * - * @return string */ - public static function back($code) + public static function back(string $code): string { return \route('back', ['locale' => $code]); } @@ -168,11 +156,9 @@ public static function back($code) /** * Returns the url to set up language and return to url('/'). * - * @param string $code * - * @return string */ - public static function home($code) + public static function home(string $code): string { return \route('home', ['locale' => $code]); } @@ -180,11 +166,9 @@ public static function home($code) /** * Returns the language code. * - * @param string $name * - * @return string */ - public static function getCode($name = 'default') + public static function getCode(string $name = 'default'): string { if ($name === 'default') { $name = self::getName(); @@ -196,11 +180,9 @@ public static function getCode($name = 'default') /** * Returns the language long code. * - * @param string $short * - * @return string */ - public static function getLongCode($short = 'default') + public static function getLongCode(string $short = 'default'): string { if ($short === 'default') { $short = \app()->getLocale(); @@ -223,11 +205,9 @@ public static function getLongCode($short = 'default') /** * Returns the language short code. * - * @param string $long * - * @return string */ - public static function getShortCode($long = 'default') + public static function getShortCode(string $long = 'default'): string { if ($long === 'default') { $long = \app()->getLocale(); @@ -252,11 +232,9 @@ public static function getShortCode($long = 'default') /** * Returns the language name. * - * @param string $code * - * @return string */ - public static function getName($code = 'default') + public static function getName(string $code = 'default'): string { if ($code === 'default') { $code = \app()->getLocale(); diff --git a/app/Models/Like.php b/app/Models/Like.php index 9237a42da5..b415def485 100644 --- a/app/Models/Like.php +++ b/app/Models/Like.php @@ -49,10 +49,8 @@ class Like extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -62,10 +60,8 @@ public function user() /** * Belongs To A Post. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function post() + public function post(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Post::class); } diff --git a/app/Models/Message.php b/app/Models/Message.php index b16fe9ee8c..5fe5ebc808 100644 --- a/app/Models/Message.php +++ b/app/Models/Message.php @@ -66,40 +66,32 @@ class Message extends Model /** * Belongs To A Bot. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function bot() + public function bot(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Bot::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * A message belongs to a receiver. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function receiver() + public function receiver(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'receiver_id'); } /** * Belongs To A Chat Room. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function chatroom() + public function chatroom(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Chatroom::class); } @@ -107,11 +99,9 @@ public function chatroom() /** * Set The Chat Message After Its Been Purified. * - * @param string $value * - * @return void */ - public function setMessageAttribute($value) + public function setMessageAttribute(string $value): void { $this->attributes['message'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -123,7 +113,7 @@ public function setMessageAttribute($value) * * @return string Parsed BBCODE To HTML */ - public static function getMessageHtml($message) + public static function getMessageHtml($message): string { return (new Bbcode())->parse($message, true); } diff --git a/app/Models/Movie.php b/app/Models/Movie.php index 0d45fd79b2..dfdc347a98 100644 --- a/app/Models/Movie.php +++ b/app/Models/Movie.php @@ -21,66 +21,42 @@ class Movie extends Model public $table = 'movie'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function genres() + public function genres(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Genre::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function cast() + public function cast(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Cast::class, 'cast_movie', 'cast_id', 'movie_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function crew() + public function crew(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Crew::class, 'crew_movie', 'person_id', 'movie_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function companies() + public function companies(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Company::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function countries() + public function countries(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Company::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function collection() + public function collection(): \Illuminate\Database\Query\Builder { return $this->belongsToMany(Collection::class)->take(1); } - /** - * @return \Illuminate\Database\Eloquent\Relations\HasMany - */ - public function recommendations() + public function recommendations(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Recommendation::class, 'movie_id', 'id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\HasMany - */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(Torrent::class, 'tmdb', 'id')->whereHas('category', function ($q) { $q->where('movie_meta', '=', true); diff --git a/app/Models/Network.php b/app/Models/Network.php index 86d3a3f568..b16eafbed3 100644 --- a/app/Models/Network.php +++ b/app/Models/Network.php @@ -23,18 +23,12 @@ class Network extends Model public $table = 'networks'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class); } diff --git a/app/Models/Note.php b/app/Models/Note.php index 185fbef3d9..f78603caed 100644 --- a/app/Models/Note.php +++ b/app/Models/Note.php @@ -54,10 +54,8 @@ class Note extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function noteduser() + public function noteduser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id')->withDefault([ 'username' => 'System', @@ -67,10 +65,8 @@ public function noteduser() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staffuser() + public function staffuser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'staff_id')->withDefault([ 'username' => 'System', diff --git a/app/Models/Option.php b/app/Models/Option.php index c99a676fdb..6c1d88b41a 100644 --- a/app/Models/Option.php +++ b/app/Models/Option.php @@ -54,10 +54,8 @@ class Option extends Model /** * Belongs To A Poll. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function poll() + public function poll(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Poll::class); } diff --git a/app/Models/Page.php b/app/Models/Page.php index 15f40e7ca7..be5be719d4 100644 --- a/app/Models/Page.php +++ b/app/Models/Page.php @@ -48,11 +48,9 @@ class Page extends Model /** * Set The Pages Content After Its Been Purified. * - * @param string $value * - * @return void */ - public function setContentAttribute($value) + public function setContentAttribute(string $value): void { $this->attributes['content'] = $value; } @@ -62,7 +60,7 @@ public function setContentAttribute($value) * * @return string Convert BBCODE and Parse Markdown To HTML */ - public function getContentHtml() + public function getContentHtml(): ?string { $content = (new BBCodeConverter($this->content))->toMarkdown(); diff --git a/app/Models/Peer.php b/app/Models/Peer.php index f474286c9a..21003f79e2 100644 --- a/app/Models/Peer.php +++ b/app/Models/Peer.php @@ -68,10 +68,8 @@ class Peer extends Model /** * The Columns That Are Sortable. - * - * @var array */ - public $sortable = [ + public array $sortable = [ 'id', 'agent', 'uploaded', @@ -83,10 +81,8 @@ class Peer extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -96,20 +92,16 @@ public function user() /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A Seed. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function seed() + public function seed(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class, 'torrents.id', 'torrent_id'); } diff --git a/app/Models/Permission.php b/app/Models/Permission.php index f3c88800bb..b983ab9618 100644 --- a/app/Models/Permission.php +++ b/app/Models/Permission.php @@ -56,20 +56,16 @@ class Permission extends Model /** * Belongs To A Group. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function group() + public function group(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Group::class); } /** * Belongs To A Forum. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function forum() + public function forum(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Forum::class); } diff --git a/app/Models/Person.php b/app/Models/Person.php index 60b6f7abf3..a70ec8a6b4 100644 --- a/app/Models/Person.php +++ b/app/Models/Person.php @@ -23,34 +23,22 @@ class Person extends Model public $table = 'person'; - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Tv::class, 'person_tv', 'tv_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function season() + public function season(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Season::class, 'person_season', 'season_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function episode() + public function episode(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Episode::class, 'episode_person', 'episode_id', 'person_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function movie() + public function movie(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Movie::class, 'person_movie', 'movie_id', 'person_id'); } diff --git a/app/Models/Playlist.php b/app/Models/Playlist.php index 2ad249b736..0b4e64b9c8 100644 --- a/app/Models/Playlist.php +++ b/app/Models/Playlist.php @@ -60,10 +60,8 @@ class Playlist extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -73,20 +71,16 @@ public function user() /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(PlaylistTorrent::class); } /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class, 'playlist_id'); } diff --git a/app/Models/PlaylistTorrent.php b/app/Models/PlaylistTorrent.php index d6e876810b..2ad59b65fc 100644 --- a/app/Models/PlaylistTorrent.php +++ b/app/Models/PlaylistTorrent.php @@ -52,20 +52,16 @@ class PlaylistTorrent extends Model /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A Playlist. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function playlist() + public function playlist(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Playlist::class); } diff --git a/app/Models/Poll.php b/app/Models/Poll.php index c5b2e6861e..2bafa743a7 100644 --- a/app/Models/Poll.php +++ b/app/Models/Poll.php @@ -64,10 +64,8 @@ class Poll extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -77,20 +75,16 @@ public function user() /** * A Poll Has Many Options. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function options() + public function options(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Option::class); } /** * A Poll Has Many Voters. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function voters() + public function voters(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Voter::class); } @@ -99,10 +93,8 @@ public function voters() * Set The Poll's Title. * * @param $title - * - * @return string */ - public function setTitleAttribute($title) + public function setTitleAttribute($title): string { return $this->attributes['title'] = $title; } @@ -111,10 +103,8 @@ public function setTitleAttribute($title) * Create A Poll Title Slug. * * @param $title - * - * @return string */ - public function makeSlugFromTitle($title) + public function makeSlugFromTitle($title): string { $slug = \strlen($title) > 20 ? \substr(Str::slug($title), 0, 20) : Str::slug($title); $count = $this->where('slug', 'LIKE', '%'.$slug.'%')->count(); @@ -124,10 +114,8 @@ public function makeSlugFromTitle($title) /** * Get Total Votes On A Poll Option. - * - * @return string */ - public function totalVotes() + public function totalVotes(): int { $result = 0; foreach ($this->options as $option) { @@ -137,7 +125,7 @@ public function totalVotes() return $result; } - protected static function boot() + protected static function boot(): void { parent::boot(); self::creating(function ($poll) { diff --git a/app/Models/Post.php b/app/Models/Post.php index ec6f22769d..84ede1a3e4 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -54,20 +54,16 @@ class Post extends Model /** * Belongs To A Topic. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function topic() + public function topic(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Topic::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -77,30 +73,24 @@ public function user() /** * A Post Has Many Likes. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function likes() + public function likes(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(Like::class)->where('like', '=', 1); } /** * A Post Has Many Dislikes. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function dislikes() + public function dislikes(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(Like::class)->where('dislike', '=', 1); } /** * A Post Has Many Tips. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function tips() + public function tips(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(BonTransactions::class); } @@ -108,11 +98,9 @@ public function tips() /** * Set The Posts Content After Its Been Purified. * - * @param string $value * - * @return void */ - public function setContentAttribute($value) + public function setContentAttribute(string $value): void { $this->attributes['content'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -122,7 +110,7 @@ public function setContentAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getContentHtml() + public function getContentHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); @@ -133,13 +121,10 @@ public function getContentHtml() /** * Post Trimming. * - * @param int $length - * @param bool $ellipses - * @param bool $stripHtml * * @return string Formatted And Trimmed Content */ - public function getBrief($length = 100, $ellipses = true, $stripHtml = false) + public function getBrief(int $length = 100, bool $ellipses = true, bool $stripHtml = false): string { $input = $this->content; //strip tags, if desired @@ -166,20 +151,16 @@ public function getBrief($length = 100, $ellipses = true, $stripHtml = false) /** * Get A Post From A ID. - * - * @return string */ - public function getPostNumber() + public function getPostNumber(): string { return $this->topic->postNumberFromId($this->id); } /** * Get A Posts Page Number. - * - * @return string */ - public function getPageNumber() + public function getPageNumber(): float { $result = ($this->getPostNumber() - 1) / 25 + 1; diff --git a/app/Models/PrivateMessage.php b/app/Models/PrivateMessage.php index 4a78abf609..8f5c90fcdc 100644 --- a/app/Models/PrivateMessage.php +++ b/app/Models/PrivateMessage.php @@ -56,10 +56,8 @@ class PrivateMessage extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function sender() + public function sender(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'sender_id')->withDefault([ 'username' => 'System', @@ -69,10 +67,8 @@ public function sender() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function receiver() + public function receiver(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'receiver_id')->withDefault([ 'username' => 'System', @@ -83,11 +79,9 @@ public function receiver() /** * Set The PM Message After Its Been Purified. * - * @param string $value * - * @return void */ - public function setMessageAttribute($value) + public function setMessageAttribute(string $value): void { $this->attributes['message'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -97,7 +91,7 @@ public function setMessageAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getMessageHtml() + public function getMessageHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); diff --git a/app/Models/Region.php b/app/Models/Region.php index 8d23c40894..d4d1b67626 100644 --- a/app/Models/Region.php +++ b/app/Models/Region.php @@ -31,20 +31,16 @@ class Region extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } diff --git a/app/Models/Report.php b/app/Models/Report.php index 9295cf469e..18005c43d1 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -73,30 +73,24 @@ class Report extends Model /** * Belongs To A Request. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function request() + public function request(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(TorrentRequest::class, 'request_id'); } /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class, 'torrent_id'); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function reporter() + public function reporter(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'reporter_id')->withDefault([ 'username' => 'System', @@ -106,10 +100,8 @@ public function reporter() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function reported() + public function reported(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'reported_user')->withDefault([ 'username' => 'System', @@ -119,10 +111,8 @@ public function reported() /** * Belongs To A Staff Member. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staff() + public function staff(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'staff_id')->withDefault([ 'username' => 'System', diff --git a/app/Models/Resolution.php b/app/Models/Resolution.php index 7535d70e23..1d4774dd3d 100644 --- a/app/Models/Resolution.php +++ b/app/Models/Resolution.php @@ -53,20 +53,16 @@ class Resolution extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } diff --git a/app/Models/Rss.php b/app/Models/Rss.php index 4bc562d462..e2d02a5570 100644 --- a/app/Models/Rss.php +++ b/app/Models/Rss.php @@ -89,10 +89,8 @@ class Rss extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -102,10 +100,8 @@ public function user() /** * Belongs To A Staff Member. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staff() + public function staff(): \Illuminate\Database\Eloquent\Relations\BelongsTo { // Not needed yet. Just added for future extendability. return $this->belongsTo(User::class, 'staff_id'); @@ -113,10 +109,8 @@ public function staff() /** * Get the RSS feeds JSON Torrent as object. - * - * @return string */ - public function getObjectTorrentAttribute() + public function getObjectTorrentAttribute(): \stdClass|bool { // Went with attribute to avoid () calls in views. Uniform ->object_torrent vs ->json_torrent. if ($this->json_torrent) { @@ -130,10 +124,8 @@ public function getObjectTorrentAttribute() /** * Get the RSS feeds expected fields for form validation. - * - * @return array */ - public function getExpectedFieldsAttribute() + public function getExpectedFieldsAttribute(): array { // Just Torrents for now... extendable to check on feed type in future. return ['search' => null, 'description' => null, 'uploader' => null, 'imdb' => null, diff --git a/app/Models/Season.php b/app/Models/Season.php index ee24915fb5..42ff87721e 100644 --- a/app/Models/Season.php +++ b/app/Models/Season.php @@ -25,53 +25,36 @@ class Season extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(Torrent::class, 'tmdb', 'tv_id')->whereHas('category', function ($q) { $q->where('tv_meta', '=', true); }); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo - */ - public function tv() + public function tv(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Tv::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\HasMany - */ - public function episodes() + public function episodes(): \Illuminate\Database\Query\Builder { return $this->hasMany(Episode::class) ->orderBy('episode_number'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function person() + public function person(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Person::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function cast() + public function cast(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Cast::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function crew() + public function crew(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Crew::class); } diff --git a/app/Models/Seedbox.php b/app/Models/Seedbox.php index b7564d54ab..a65ab38d50 100644 --- a/app/Models/Seedbox.php +++ b/app/Models/Seedbox.php @@ -55,19 +55,15 @@ class Seedbox extends Model /** * The Attributes That Are Encrypted. - * - * @var array */ - protected $encryptable = [ + protected array $encryptable = [ 'ip', ]; /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index 57c5531e41..158b8e0017 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -48,10 +48,8 @@ class Subscription extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -61,20 +59,16 @@ public function user() /** * Belongs To A Topic. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function topic() + public function topic(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Topic::class); } /** * Belongs To A Forum. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function forum() + public function forum(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Forum::class); } diff --git a/app/Models/Subtitle.php b/app/Models/Subtitle.php index ddcb8f3493..0b52fa13ea 100644 --- a/app/Models/Subtitle.php +++ b/app/Models/Subtitle.php @@ -69,10 +69,8 @@ class Subtitle extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -82,33 +80,24 @@ public function user() /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A Media Language. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function language() + public function language(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(MediaLanguage::class); } /** * Returns The Size In Human Format. - * - * @param null $bytes - * @param int $precision - * - * @return string */ - public function getSize($bytes = null, $precision = 2) + public function getSize(): string { $bytes = $this->file_size; diff --git a/app/Models/Thank.php b/app/Models/Thank.php index 3a01cf5118..573d12db58 100644 --- a/app/Models/Thank.php +++ b/app/Models/Thank.php @@ -45,20 +45,16 @@ class Thank extends Model /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } diff --git a/app/Models/Ticket.php b/app/Models/Ticket.php index 184335d292..3630eb85ec 100644 --- a/app/Models/Ticket.php +++ b/app/Models/Ticket.php @@ -37,7 +37,7 @@ public function scopeStale($query) ->orWhereNull('reminded_at'); } - public static function checkForStaleTickets() + public static function checkForStaleTickets(): void { $open_tickets = self::status('open') ->whereNotNull('staff_id') @@ -50,10 +50,8 @@ public static function checkForStaleTickets() /** * Belongs To A User (Created). - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -63,50 +61,40 @@ public function user() /** * Belongs To A Staff User (Assigned). - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staff() + public function staff(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'staff_id'); } /** * Belongs To A Ticket Priority. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function priority() + public function priority(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(TicketPriority::class); } /** * Belongs To A Ticket Category. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function category() + public function category(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(TicketCategory::class); } /** * Has Many Ticket Attachments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function attachments() + public function attachments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TicketAttachment::class); } /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class); } diff --git a/app/Models/TicketAttachment.php b/app/Models/TicketAttachment.php index 1cb521690e..64d16b25cf 100644 --- a/app/Models/TicketAttachment.php +++ b/app/Models/TicketAttachment.php @@ -13,27 +13,23 @@ class TicketAttachment extends Model 'full_disk_path', ]; - public function getFullDiskPathAttribute() + public function getFullDiskPathAttribute(): string { return $this->disk_path.''.$this->file_name; } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Ticket. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function ticket() + public function ticket(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Ticket::class); } diff --git a/app/Models/Topic.php b/app/Models/Topic.php index 5aa49dcd9b..51576c3172 100644 --- a/app/Models/Topic.php +++ b/app/Models/Topic.php @@ -88,40 +88,32 @@ class Topic extends Model /** * Belongs To A Forum. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function forum() + public function forum(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Forum::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'first_post_user_id', 'id'); } /** * Has Many Posts. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function posts() + public function posts(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Post::class); } /** * Has Many Subscriptions. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function subscriptions() + public function subscriptions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Subscription::class); } @@ -132,10 +124,8 @@ public function subscriptions() * @param $poster * @param $topic * @param $post - * - * @return string */ - public function notifySubscribers($poster, $topic, $post) + public function notifySubscribers($poster, $topic, $post): void { $subscribers = User::selectRaw('distinct(users.id),max(users.username) as username,max(users.group_id) as group_id')->with('group')->where('users.id', '!=', $poster->id) ->join('subscriptions', 'subscriptions.user_id', '=', 'users.id') @@ -157,10 +147,8 @@ public function notifySubscribers($poster, $topic, $post) * @param $poster * @param $topic * @param $post - * - * @return string */ - public function notifyStaffers($poster, $topic, $post) + public function notifyStaffers($poster, $topic, $post): void { $staffers = User::leftJoin('groups', 'users.group_id', '=', 'groups.id') ->select('users.id') @@ -193,10 +181,8 @@ public function viewable() * @param $poster * @param $topic * @param $post - * - * @return bool */ - public function notifyStarter($poster, $topic, $post) + public function notifyStarter($poster, $topic, $post): bool { $user = User::find($topic->first_post_user_id); if ($user->acceptsNotification(\auth()->user(), $user, 'forum', 'show_forum_topic')) { @@ -210,10 +196,8 @@ public function notifyStarter($poster, $topic, $post) * Get Post Number From ID. * * @param $searchId - * - * @return string */ - public function postNumberFromId($searchId) + public function postNumberFromId($searchId): int { $count = 0; foreach ($this->posts as $post) { diff --git a/app/Models/Torrent.php b/app/Models/Torrent.php index dbcf77e414..91abd21caa 100644 --- a/app/Models/Torrent.php +++ b/app/Models/Torrent.php @@ -143,10 +143,8 @@ class Torrent extends Model /** * The Columns That Are Sortable. - * - * @var array */ - public $sortable = [ + public array $sortable = [ 'id', 'name', 'size', @@ -158,10 +156,8 @@ class Torrent extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -171,10 +167,8 @@ public function user() /** * Belongs To A Uploader. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function uploader() + public function uploader(): \Illuminate\Database\Eloquent\Relations\BelongsTo { // Not needed yet but may use this soon. @@ -186,80 +180,64 @@ public function uploader() /** * Belongs To A Category. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function category() + public function category(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Category::class); } /** * Belongs To A Type. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function type() + public function type(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Type::class); } /** * Belongs To A Resolution. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function resolution() + public function resolution(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Resolution::class); } /** * Belongs To A Distributor. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function distributor() + public function distributor(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Distributor::class); } /** * Belongs To A Region. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function region() + public function region(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Region::class); } /** * Belongs To A Playlist. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function playlists() + public function playlists(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(PlaylistTorrent::class); } /** * Has Many Genres. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ - public function genres() + public function genres(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Genre::class, 'genre_torrent', 'torrent_id', 'genre_id', 'id', 'id'); } /** * Torrent Has Been Moderated By. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function moderated() + public function moderated(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'moderated_by')->withDefault([ 'username' => 'System', @@ -269,110 +247,88 @@ public function moderated() /** * Has Many Keywords. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function keywords() + public function keywords(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Keyword::class); } /** * Has Many History. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function history() + public function history(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(History::class, 'info_hash', 'info_hash'); } /** * Has Many Tips. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function tips() + public function tips(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(BonTransactions::class, 'torrent_id', 'id')->where('name', '=', 'tip'); } /** * Has Many Thank. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function thanks() + public function thanks(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Thank::class); } /** * Has Many HitRuns. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function hitrun() + public function hitrun(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Warning::class, 'torrent'); } /** * Has Many Featured. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function featured() + public function featured(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(FeaturedTorrent::class); } /** * Has Many Files. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function files() + public function files(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentFile::class); } /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class); } /** * Has Many Peers. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function peers() + public function peers(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Peer::class); } /** * Has Many Subtitles. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function subtitles() + public function subtitles(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Subtitle::class); } /** * Relationship To A Single Request. - * - * @return \Illuminate\Database\Eloquent\Relations\HasOne */ - public function request() + public function request(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(TorrentRequest::class, 'filled_hash', 'info_hash'); } @@ -380,11 +336,9 @@ public function request() /** * Set The Torrents Description After Its Been Purified. * - * @param string $value * - * @return void */ - public function setDescriptionAttribute($value) + public function setDescriptionAttribute(string $value): void { $this->attributes['description'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -394,7 +348,7 @@ public function setDescriptionAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getDescriptionHtml() + public function getDescriptionHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); @@ -405,34 +359,25 @@ public function getDescriptionHtml() /** * Set The Torrents MediaInfo After Its Been Purified. * - * @param string $value * - * @return void */ - public function setMediaInfoAttribute($value) + public function setMediaInfoAttribute(string $value): void { $this->attributes['mediainfo'] = $value; } /** * Formats The Output Of The Media Info Dump. - * - * @return array */ - public function getMediaInfo() + public function getMediaInfo(): array { return (new MediaInfo())->parse($this->mediaInfo); } /** * Returns The Size In Human Format. - * - * @param null $bytes - * @param int $precision - * - * @return string */ - public function getSize($bytes = null, $precision = 2) + public function getSize(): string { $bytes = $this->size; @@ -442,7 +387,7 @@ public function getSize($bytes = null, $precision = 2) /** * Bookmarks. */ - public function bookmarked() + public function bookmarked(): bool { return (bool) Bookmark::where('user_id', '=', \auth()->user()->id) ->where('torrent_id', '=', $this->id) @@ -454,10 +399,8 @@ public function bookmarked() * * @param $type * @param $payload - * - * @return bool */ - public function notifyUploader($type, $payload) + public function notifyUploader($type, $payload): bool { if ($type == 'thank') { $user = User::with('notification')->findOrFail($this->user_id); @@ -482,12 +425,8 @@ public function notifyUploader($type, $payload) /** * Torrent Is Freeleech. - * - * @param null $user - * - * @return bool */ - public function isFreeleech($user = null) + public function isFreeleech($user = null): bool { $pfree = $user ? $user->group->is_freeleech || PersonalFreeleech::where('user_id', '=', $user->id)->first() : false; diff --git a/app/Models/TorrentFile.php b/app/Models/TorrentFile.php index 07e80c2277..d76555fbcc 100644 --- a/app/Models/TorrentFile.php +++ b/app/Models/TorrentFile.php @@ -55,23 +55,16 @@ class TorrentFile extends Model /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class); } /** * Return Size In Human Format. - * - * @param null $bytes - * @param int $precision - * - * @return string */ - public function getSize($bytes = null, $precision = 2) + public function getSize(): string { $bytes = $this->size; diff --git a/app/Models/TorrentRequest.php b/app/Models/TorrentRequest.php index 014777bd8d..919b07d59f 100644 --- a/app/Models/TorrentRequest.php +++ b/app/Models/TorrentRequest.php @@ -112,10 +112,8 @@ class TorrentRequest extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -125,10 +123,8 @@ public function user() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function approveUser() + public function approveUser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'approved_by')->withDefault([ 'username' => 'System', @@ -138,10 +134,8 @@ public function approveUser() /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function FillUser() + public function FillUser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'filled_by')->withDefault([ 'username' => 'System', @@ -151,60 +145,48 @@ public function FillUser() /** * Belongs To A Category. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function category() + public function category(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Category::class); } /** * Belongs To A Type. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function type() + public function type(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Type::class); } /** * Belongs To A Resolution. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function resolution() + public function resolution(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Resolution::class); } /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrent() + public function torrent(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class, 'filled_hash', 'info_hash'); } /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class, 'requests_id', 'id'); } /** * Has Many BON Bounties. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requestBounty() + public function requestBounty(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequestBounty::class, 'requests_id', 'id'); } @@ -212,11 +194,9 @@ public function requestBounty() /** * Set The Requests Description After Its Been Purified. * - * @param string $value * - * @return void */ - public function setDescriptionAttribute($value) + public function setDescriptionAttribute(string $value): void { $this->attributes['description'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -226,7 +206,7 @@ public function setDescriptionAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getDescriptionHtml() + public function getDescriptionHtml(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); @@ -239,10 +219,8 @@ public function getDescriptionHtml() * * @param $type * @param $payload - * - * @return bool */ - public function notifyRequester($type, $payload) + public function notifyRequester($type, $payload): bool { $user = User::with('notification')->findOrFail($this->user_id); if ($user->acceptsNotification(\auth()->user(), $user, 'request', 'show_request_comment')) { diff --git a/app/Models/TorrentRequestBounty.php b/app/Models/TorrentRequestBounty.php index c881b4c188..91f24029b9 100644 --- a/app/Models/TorrentRequestBounty.php +++ b/app/Models/TorrentRequestBounty.php @@ -56,10 +56,8 @@ class TorrentRequestBounty extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', @@ -69,10 +67,8 @@ public function user() /** * Belongs To A Torrent Request. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function request() + public function request(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(TorrentRequest::class); } diff --git a/app/Models/Tv.php b/app/Models/Tv.php index e9d413cc92..b02d2a1e3c 100644 --- a/app/Models/Tv.php +++ b/app/Models/Tv.php @@ -25,85 +25,56 @@ class Tv extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Builder { return $this->hasMany(Torrent::class, 'tmdb', 'id')->whereHas('category', function ($q) { $q->where('tv_meta', '=', true); }); } - /** - * @return \Illuminate\Database\Eloquent\Relations\HasMany - */ - public function seasons() + public function seasons(): \Illuminate\Database\Query\Builder { return $this->hasMany(Season::class) ->orderBy('season_number'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function persons() + public function persons(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Person::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function cast() + public function cast(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Cast::class, 'cast_tv', 'cast_id', 'tv_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function crew() + public function crew(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Crew::class, 'crew_tv', 'person_id', 'tv_id'); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function genres() + public function genres(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Genre::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function creators() + public function creators(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Person::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function networks() + public function networks(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Network::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany - */ - public function companies() + public function companies(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Company::class); } - /** - * @return \Illuminate\Database\Eloquent\Relations\HasMany - */ - public function recommendations() + public function recommendations(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Recommendation::class, 'tv_id', 'id'); } diff --git a/app/Models/TwoStepAuth.php b/app/Models/TwoStepAuth.php index d2f9c81a00..82e6526d65 100644 --- a/app/Models/TwoStepAuth.php +++ b/app/Models/TwoStepAuth.php @@ -114,10 +114,8 @@ class TwoStepAuth extends Model * Get a validator for an incoming Request. * * @param array $merge (rules to optionally merge) - * - * @return array */ - public static function rules($merge = []) + public static function rules(array $merge = []): array { return \array_merge( [ diff --git a/app/Models/Type.php b/app/Models/Type.php index 1e96db8e53..c793c7d089 100644 --- a/app/Models/Type.php +++ b/app/Models/Type.php @@ -52,20 +52,16 @@ class Type extends Model /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } diff --git a/app/Models/User.php b/app/Models/User.php index d6d1062fc6..ea12d3e8bf 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -60,10 +60,8 @@ class User extends Authenticatable /** * Belongs To A Group. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function group() + public function group(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Group::class)->withDefault([ 'color' => \config('user.group.defaults.color'), @@ -86,510 +84,408 @@ public function group() /** * Belongs To A Internal Group. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function internal() + public function internal(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Internal::class, 'internal_id', 'id', 'name'); } /** * Belongs To A Chatroom. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function chatroom() + public function chatroom(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Chatroom::class); } /** * Belongs To A Chat Status. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function chatStatus() + public function chatStatus(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(ChatStatus::class, 'chat_status_id', 'id'); } /** * Belongs To Many Bookmarks. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ - public function bookmarks() + public function bookmarks(): \Illuminate\Database\Eloquent\Relations\BelongsToMany { return $this->belongsToMany(Torrent::class, 'bookmarks', 'user_id', 'torrent_id')->withTimestamps(); } /** * @param $torrentId - * - * @return bool */ - public function isBookmarked($torrentId) + public function isBookmarked($torrentId): bool { return $this->bookmarks()->where('torrent_id', '=', $torrentId)->first() !== null; } /** * Has Many Messages. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function messages() + public function messages(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Message::class); } /** * Has One Privacy Object. - * - * @return \Illuminate\Database\Eloquent\Relations\HasOne */ - public function privacy() + public function privacy(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(UserPrivacy::class); } /** * Has One Chat Object. - * - * @return \Illuminate\Database\Eloquent\Relations\HasOne */ - public function chat() + public function chat(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(UserChat::class); } /** * Has One Notifications Object. - * - * @return \Illuminate\Database\Eloquent\Relations\HasOne */ - public function notification() + public function notification(): \Illuminate\Database\Eloquent\Relations\HasOne { return $this->hasOne(UserNotification::class); } /** * Has Many RSS Feeds. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function rss() + public function rss(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Rss::class); } /** * Has Many Echo Settings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function echoes() + public function echoes(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(UserEcho::class); } /** * Has Many Audible Settings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function audibles() + public function audibles(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(UserAudible::class); } /** * Has Many Thanks Given. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function thanksGiven() + public function thanksGiven(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Thank::class, 'user_id', 'id'); } /** * Has Many Wish's. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function wishes() + public function wishes(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Wish::class); } /** * Has Many Thanks Received. - * - * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough */ - public function thanksReceived() + public function thanksReceived(): \Illuminate\Database\Eloquent\Relations\HasManyThrough { return $this->hasManyThrough(Thank::class, Torrent::class); } /** * Has Many Polls. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function polls() + public function polls(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Poll::class); } /** * Has Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function torrents() + public function torrents(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class); } /** * Has Many Playlist. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function playlists() + public function playlists(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Playlist::class); } /** * Has Many Sent PM's. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function pm_sender() + public function pm_sender(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(PrivateMessage::class, 'sender_id'); } /** * Has Many Received PM's. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function pm_receiver() + public function pm_receiver(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(PrivateMessage::class, 'receiver_id'); } /** * Has Many Peers. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function peers() + public function peers(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Peer::class); } /** * Has Many Followers. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function follows() + public function follows(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Follow::class); } /** * Has Many Articles. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function articles() + public function articles(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Article::class); } /** * Has Many Topics. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function topics() + public function topics(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Topic::class, 'first_post_user_id', 'id'); } /** * Has Many Posts. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function posts() + public function posts(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Post::class); } /** * Has Many Comments. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function comments() + public function comments(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Comment::class); } /** * Has Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requests() + public function requests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class); } /** * Has Approved Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function ApprovedRequests() + public function ApprovedRequests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class, 'approved_by'); } /** * Has Filled Many Torrent Requests. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function FilledRequests() + public function FilledRequests(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequest::class, 'filled_by'); } /** * Has Many Torrent Request BON Bounties. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function requestBounty() + public function requestBounty(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(TorrentRequestBounty::class); } /** * Has Moderated Many Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function moderated() + public function moderated(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Torrent::class, 'moderated_by'); } /** * Has Many Notes. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function notes() + public function notes(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Note::class, 'user_id'); } /** * Has Many Reports. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function reports() + public function reports(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Report::class, 'reporter_id'); } /** * Has Solved Many Reports. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function solvedReports() + public function solvedReports(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Report::class, 'staff_id'); } /** * Has Many Torrent History. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function history() + public function history(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(History::class, 'user_id'); } /** * Has Many Bans. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function userban() + public function userban(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Ban::class, 'owned_by'); } /** * Has Given Many Bans. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function staffban() + public function staffban(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Ban::class, 'created_by'); } /** * Has Given Many Warnings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function staffwarning() + public function staffwarning(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Warning::class, 'warned_by'); } /** * Has Deleted Many Warnings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function staffdeletedwarning() + public function staffdeletedwarning(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Warning::class, 'deleted_by'); } /** * Has Many Warnings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function userwarning() + public function userwarning(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Warning::class, 'user_id'); } /** * Has Given Many Invites. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function sentInvite() + public function sentInvite(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Invite::class, 'user_id'); } /** * Has Received Many Invites. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function receivedInvite() + public function receivedInvite(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Invite::class, 'accepted_by'); } /** * Has Many Featured Torrents. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function featuredTorrent() + public function featuredTorrent(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(FeaturedTorrent::class); } /** * Has Many Post Likes. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function likes() + public function likes(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Like::class); } /** * Has Given Many BON Tips. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function bonGiven() + public function bonGiven(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(BonTransactions::class, 'sender'); } /** * Has Received Many BON Tips. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function bonReceived() + public function bonReceived(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(BonTransactions::class, 'receiver'); } /** * Has Many Subscriptions. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function subscriptions() + public function subscriptions(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Subscription::class); } /** * Has many free leech tokens. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function freeleechTokens() + public function freeleechTokens(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(FreeleechToken::class); } /** * Has many warnings. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function warnings() + public function warnings(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Warning::class); } /** * Has Many Tickets. - * - * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function tickets() + public function tickets(): \Illuminate\Database\Eloquent\Relations\HasMany { return $this->hasMany(Ticket::class, 'user_id'); } /** * Get the Users username as slug. - * - * @return string */ - public function getSlugAttribute() + public function getSlugAttribute(): string { return Str::slug($this->username); } @@ -597,12 +493,9 @@ public function getSlugAttribute() /** * Get the Users accepts notification as bool. * - * @param string $group - * @param bool $type * - * @return int */ - public function acceptsNotification(self $sender, self $target, $group = 'follower', $type = false) + public function acceptsNotification(self $sender, self $target, string $group = 'follower', bool $type = false): bool { $targetGroup = 'json_'.$group.'_groups'; if ($sender->id === $target->id) { @@ -635,12 +528,9 @@ public function acceptsNotification(self $sender, self $target, $group = 'follow /** * Get the Users allowed answer as bool. * - * @param string $group - * @param bool $type * - * @return int */ - public function isVisible(self $target, $group = 'profile', $type = false) + public function isVisible(self $target, string $group = 'profile', bool $type = false): bool { $targetGroup = 'json_'.$group.'_groups'; $sender = \auth()->user(); @@ -674,12 +564,9 @@ public function isVisible(self $target, $group = 'profile', $type = false) /** * Get the Users allowed answer as bool. * - * @param string $group - * @param bool $type * - * @return int */ - public function isAllowed(self $target, $group = 'profile', $type = false) + public function isAllowed(self $target, string $group = 'profile', bool $type = false): bool { $targetGroup = 'json_'.$group.'_groups'; $sender = \auth()->user(); @@ -714,10 +601,8 @@ public function isAllowed(self $target, $group = 'profile', $type = false) * Does Subscription Exist. * * @param $topicId - * - * @return string */ - public function isSubscribed(string $type, $topicId) + public function isSubscribed(string $type, $topicId): bool { if ($type === 'topic') { return (bool) $this->subscriptions()->where('topic_id', '=', $topicId)->first(['id']); @@ -730,23 +615,16 @@ public function isSubscribed(string $type, $topicId) * Get All Followers Of A User. * * @param $targetId - * - * @return string */ - public function isFollowing($targetId) + public function isFollowing($targetId): bool { return (bool) $this->follows()->where('target_id', '=', $targetId)->first(['id']); } /** * Return Upload In Human Format. - * - * @param null $bytes - * @param int $precision - * - * @return string */ - public function getUploaded($bytes = null, $precision = 2) + public function getUploaded(): string { $bytes = $this->uploaded; @@ -759,13 +637,8 @@ public function getUploaded($bytes = null, $precision = 2) /** * Return Download In Human Format. - * - * @param null $bytes - * @param int $precision - * - * @return string */ - public function getDownloaded($bytes = null, $precision = 2) + public function getDownloaded(): string { $bytes = $this->downloaded; @@ -779,7 +652,7 @@ public function getDownloaded($bytes = null, $precision = 2) /** * Return The Ratio. */ - public function getRatio() + public function getRatio(): float { if ($this->downloaded === 0) { return INF; @@ -788,12 +661,7 @@ public function getRatio() return \round($this->uploaded / $this->downloaded, 2); } - // Return the ratio pretty formated as a string. - - /** - * @return string - */ - public function getRatioString() + public function getRatioString(): string { $ratio = $this->getRatio(); if (\is_infinite($ratio)) { @@ -804,13 +672,10 @@ public function getRatioString() } // Return the ratio after $size bytes would be downloaded. - /** * @param $size - * - * @return float */ - public function ratioAfterSize($size) + public function ratioAfterSize($size): float { if ($this->downloaded + $size == 0) { return INF; @@ -821,14 +686,11 @@ public function ratioAfterSize($size) // Return the ratio after $size bytes would be downloaded, pretty formatted // as a string. - /** * @param $size - * @param bool $freeleech * - * @return string */ - public function ratioAfterSizeString($size, $freeleech = false) + public function ratioAfterSizeString($size, bool $freeleech = false): string { if ($freeleech) { return $this->getRatioString().' ('.\trans('torrent.freeleech').')'; @@ -864,11 +726,9 @@ public function untilRatio($ratio) /** * Set The Users Signature After Its Been Purified. * - * @param string $value * - * @return void */ - public function setSignatureAttribute($value) + public function setSignatureAttribute(string $value): void { $this->attributes['signature'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -878,7 +738,7 @@ public function setSignatureAttribute($value) * * @return string html */ - public function getSignature() + public function getSignature(): string { $bbcode = new Bbcode(); $linkify = new Linkify(); @@ -889,11 +749,9 @@ public function getSignature() /** * Set The Users About Me After Its Been Purified. * - * @param string $value * - * @return void */ - public function setAboutAttribute($value) + public function setAboutAttribute(string $value): void { $this->attributes['about'] = \htmlspecialchars((new AntiXSS())->xss_clean($value), ENT_NOQUOTES); } @@ -903,7 +761,7 @@ public function setAboutAttribute($value) * * @return string Parsed BBCODE To HTML */ - public function getAboutHtml() + public function getAboutHtml(): string { if (empty($this->about)) { return 'N/A'; @@ -919,10 +777,8 @@ public function getAboutHtml() * @method getSeedbonus * * Formats the seebonus of the User - * - * @return string */ - public function getSeedbonus() + public function getSeedbonus(): string { return \number_format($this->seedbonus, 0, '.', ','); } @@ -931,10 +787,8 @@ public function getSeedbonus() * @method getSeeding * * Gets the amount of torrents a user seeds - * - * @return int */ - public function getSeeding() + public function getSeeding(): int { return Peer::where('user_id', '=', $this->id) ->where('seeder', '=', '1') @@ -946,10 +800,8 @@ public function getSeeding() * @method getLast30Uploads * * Gets the amount of torrents a user seeds - * - * @return int */ - public function getLast30Uploads() + public function getLast30Uploads(): int { $current = Carbon::now(); @@ -963,10 +815,8 @@ public function getLast30Uploads() * @method getUploads * * Gets the amount of torrents a user seeds - * - * @return int */ - public function getUploads() + public function getUploads(): int { return Torrent::withAnyStatus() ->where('user_id', '=', $this->id) @@ -977,10 +827,8 @@ public function getUploads() * @method getLeeching * * Gets the amount of torrents a user seeds - * - * @return int */ - public function getLeeching() + public function getLeeching(): int { return Peer::where('user_id', '=', $this->id) ->where('left', '>', '0') @@ -992,10 +840,8 @@ public function getLeeching() * @method getWarning * * Gets count on users active warnings - * - * @return int */ - public function getWarning() + public function getWarning(): int { return Warning::where('user_id', '=', $this->id) ->whereNotNull('torrent') @@ -1007,10 +853,8 @@ public function getWarning() * @method getTotalSeedTime * * Gets the users total seedtime - * - * @return int */ - public function getTotalSeedTime() + public function getTotalSeedTime(): int { return History::where('user_id', '=', $this->id) ->sum('seedtime'); @@ -1020,10 +864,8 @@ public function getTotalSeedTime() * @method getTotalSeedSize * * Gets the users total seedsoze - * - * @return int */ - public function getTotalSeedSize() + public function getTotalSeedSize(): int { $peers = Peer::where('user_id', '=', $this->id)->where('seeder', '=', 1)->pluck('torrent_id'); @@ -1034,10 +876,8 @@ public function getTotalSeedSize() * @method getCompletedSeeds * * Gets the users satisfied torrent count. - * - * @return int */ - public function getCompletedSeeds() + public function getCompletedSeeds(): int { return History::where('user_id', '=', $this->id)->where('seedtime', '>=', \config('hitrun.seedtime'))->count(); } @@ -1046,10 +886,8 @@ public function getCompletedSeeds() * @method getSpecialSeedingSize * * Gets the seeding size of torrents with at least 15 days seedtime in the past 30 days. - * - * @return int */ - public function getSpecialSeedingSize() + public function getSpecialSeedingSize(): int { $current = Carbon::now(); $seeding = History::where('user_id', '=', $this->id)->where('completed_at', '<=', $current->copy()->subDays(30)->toDateTimeString())->where('active', '=', 1)->where('seeder', '=', 1)->where('seedtime', '>=', 1296000)->pluck('info_hash'); diff --git a/app/Models/UserActivation.php b/app/Models/UserActivation.php index f8cf175ce9..cb723e547d 100644 --- a/app/Models/UserActivation.php +++ b/app/Models/UserActivation.php @@ -44,10 +44,8 @@ class UserActivation extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id', 'id')->withDefault([ 'username' => 'System', diff --git a/app/Models/UserAudible.php b/app/Models/UserAudible.php index ea5f3bf839..5dfdfe5286 100644 --- a/app/Models/UserAudible.php +++ b/app/Models/UserAudible.php @@ -58,40 +58,32 @@ class UserAudible extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Chatroom. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function room() + public function room(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Chatroom::class); } /** * Belongs To A Target. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function target() + public function target(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Bot. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function bot() + public function bot(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Bot::class); } diff --git a/app/Models/UserEcho.php b/app/Models/UserEcho.php index 603cf54889..f2a7839fab 100644 --- a/app/Models/UserEcho.php +++ b/app/Models/UserEcho.php @@ -63,40 +63,32 @@ class UserEcho extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Chatroom. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function room() + public function room(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Chatroom::class); } /** * Belongs To A Target. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function target() + public function target(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class); } /** * Belongs To A Bot. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function bot() + public function bot(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Bot::class); } diff --git a/app/Models/UserNotification.php b/app/Models/UserNotification.php index 462189ab41..2befcc4e77 100644 --- a/app/Models/UserNotification.php +++ b/app/Models/UserNotification.php @@ -121,10 +121,8 @@ class UserNotification extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id', 'id')->withDefault([ 'username' => 'System', @@ -134,20 +132,16 @@ public function user() /** * Get the Expected groups for form validation. - * - * @return array */ - public function getExpectedGroupsAttribute() + public function getExpectedGroupsAttribute(): array { return ['default_groups' => ['1' => 0]]; } /** * Get the Expected fields for form validation. - * - * @return array */ - public function getExpectedFieldsAttribute() + public function getExpectedFieldsAttribute(): array { return []; } @@ -155,11 +149,9 @@ public function getExpectedFieldsAttribute() /** * Set the base vars on object creation without touching boot. * - * @param string $type * - * @return void */ - public function setDefaultValues($type = 'default') + public function setDefaultValues(string $type = 'default'): void { foreach ($this->casts as $k => $v) { if ($v == 'array') { diff --git a/app/Models/UserPrivacy.php b/app/Models/UserPrivacy.php index 40c4a43200..2ba67aac2d 100644 --- a/app/Models/UserPrivacy.php +++ b/app/Models/UserPrivacy.php @@ -151,10 +151,8 @@ class UserPrivacy extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id', 'id')->withDefault([ 'username' => 'System', @@ -164,20 +162,16 @@ public function user() /** * Get the Expected groups for form validation. - * - * @return array */ - public function getExpectedGroupsAttribute() + public function getExpectedGroupsAttribute(): array { return ['default_groups' => ['1' => 0]]; } /** * Get the Expected fields for form validation. - * - * @return array */ - public function getExpectedFieldsAttribute() + public function getExpectedFieldsAttribute(): array { return []; } @@ -185,11 +179,9 @@ public function getExpectedFieldsAttribute() /** * Set the base vars on object creation without touching boot. * - * @param string $type * - * @return void */ - public function setDefaultValues($type = 'default') + public function setDefaultValues(string $type = 'default'): void { foreach ($this->casts as $k => $v) { if ($v == 'array') { diff --git a/app/Models/Voter.php b/app/Models/Voter.php index 392e8db2ac..cb9fedf1e1 100644 --- a/app/Models/Voter.php +++ b/app/Models/Voter.php @@ -45,20 +45,16 @@ class Voter extends Model /** * Belongs To A Poll. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function poll() + public function poll(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Poll::class); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Models/Warning.php b/app/Models/Warning.php index de2bf2daef..bf42ed9c56 100644 --- a/app/Models/Warning.php +++ b/app/Models/Warning.php @@ -64,20 +64,16 @@ class Warning extends Model /** * Belongs To A Torrent. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function torrenttitle() + public function torrenttitle(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(Torrent::class, 'torrent'); } /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function warneduser() + public function warneduser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id')->withDefault([ 'username' => 'System', @@ -87,10 +83,8 @@ public function warneduser() /** * Belongs To A USer. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function staffuser() + public function staffuser(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'warned_by')->withDefault([ 'username' => 'System', @@ -100,10 +94,8 @@ public function staffuser() /** * Belongs To A USer. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function deletedBy() + public function deletedBy(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'deleted_by')->withDefault([ 'username' => 'System', diff --git a/app/Models/Watchlist.php b/app/Models/Watchlist.php index c83b8f5a04..357bb30d98 100644 --- a/app/Models/Watchlist.php +++ b/app/Models/Watchlist.php @@ -11,10 +11,8 @@ class Watchlist extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class, 'user_id', 'id')->withDefault([ 'username' => 'System', @@ -24,10 +22,8 @@ public function user() /** * Belongs To A Uploader. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function author() + public function author(): \Illuminate\Database\Eloquent\Relations\BelongsTo { // Not needed yet but may use this soon. diff --git a/app/Models/Wish.php b/app/Models/Wish.php index 6335a5e34f..b436440499 100644 --- a/app/Models/Wish.php +++ b/app/Models/Wish.php @@ -57,10 +57,8 @@ class Wish extends Model /** * Belongs To A User. - * - * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function user() + public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'username' => 'System', diff --git a/app/Notifications/FailedLogin.php b/app/Notifications/FailedLogin.php index 74ef34024b..2dd4bcf46e 100644 --- a/app/Notifications/FailedLogin.php +++ b/app/Notifications/FailedLogin.php @@ -36,10 +36,8 @@ public function __construct(public $ip) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the database representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return ['ip' => $this->ip, 'time' => Carbon::now()]; } @@ -60,10 +56,8 @@ public function toArray($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage())->error()->subject(\trans('email.fail-login-subject'))->greeting(\trans('email.fail-login-greeting'))->line(\trans('email.fail-login-line1'))->line(\trans('email.fail-login-line2', ['ip' => $this->ip, 'host' => \gethostbyaddr($this->ip), 'time' => Carbon::now()])); } diff --git a/app/Notifications/NewBon.php b/app/Notifications/NewBon.php index da7e0a5647..d9414a5d0d 100644 --- a/app/Notifications/NewBon.php +++ b/app/Notifications/NewBon.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public B * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Gifted You '.$this->bonTransactions->cost.' BON', diff --git a/app/Notifications/NewComment.php b/app/Notifications/NewComment.php index 6a2579f8e3..76f88a1de6 100644 --- a/app/Notifications/NewComment.php +++ b/app/Notifications/NewComment.php @@ -32,10 +32,8 @@ public function __construct(public string $type, public Comment $comment) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -44,10 +42,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { if ($this->type == 'torrent') { if ($this->comment->anon == 0) { diff --git a/app/Notifications/NewCommentTag.php b/app/Notifications/NewCommentTag.php index 3a4f118c96..1f6d465cbc 100644 --- a/app/Notifications/NewCommentTag.php +++ b/app/Notifications/NewCommentTag.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $tagger, public C * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { if ($this->type == 'torrent') { return [ diff --git a/app/Notifications/NewFollow.php b/app/Notifications/NewFollow.php index d433fa1b24..1aa1c41572 100644 --- a/app/Notifications/NewFollow.php +++ b/app/Notifications/NewFollow.php @@ -34,10 +34,8 @@ public function __construct(public string $type, public User $sender, public Use * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -46,10 +44,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender->username.' Has Followed You!', diff --git a/app/Notifications/NewPost.php b/app/Notifications/NewPost.php index a3e2fac4f9..71d0f44321 100644 --- a/app/Notifications/NewPost.php +++ b/app/Notifications/NewPost.php @@ -34,10 +34,8 @@ public function __construct(public string $type, public User $user, public Post * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -46,10 +44,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { if ($this->type == 'subscription') { return [ diff --git a/app/Notifications/NewPostTag.php b/app/Notifications/NewPostTag.php index ff24a39314..b2f661e2ca 100644 --- a/app/Notifications/NewPostTag.php +++ b/app/Notifications/NewPostTag.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $tagger, public P * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->tagger.' Has Tagged You In A Post', diff --git a/app/Notifications/NewPostTip.php b/app/Notifications/NewPostTip.php index 5dc9db7a3b..e772f5ddaa 100644 --- a/app/Notifications/NewPostTip.php +++ b/app/Notifications/NewPostTip.php @@ -35,10 +35,8 @@ public function __construct(public string $type, public string $tipper, public $ * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -47,10 +45,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->tipper.' Has Tipped You '.$this->amount.' BON For A Forum Post', diff --git a/app/Notifications/NewRequestBounty.php b/app/Notifications/NewRequestBounty.php index 236347d626..fbeece2987 100644 --- a/app/Notifications/NewRequestBounty.php +++ b/app/Notifications/NewRequestBounty.php @@ -35,10 +35,8 @@ public function __construct(public string $type, public string $sender, public $ * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -47,10 +45,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Added A Bounty Of '.$this->amount.' To A Requested Torrent', diff --git a/app/Notifications/NewRequestClaim.php b/app/Notifications/NewRequestClaim.php index 70aebf94a6..af46962f56 100644 --- a/app/Notifications/NewRequestClaim.php +++ b/app/Notifications/NewRequestClaim.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public T * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Claimed One Of Your Requested Torrents', diff --git a/app/Notifications/NewRequestFill.php b/app/Notifications/NewRequestFill.php index 899b16b79c..7f82cc6bac 100644 --- a/app/Notifications/NewRequestFill.php +++ b/app/Notifications/NewRequestFill.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public T * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Filled One Of Your Torrent Requests', diff --git a/app/Notifications/NewRequestFillApprove.php b/app/Notifications/NewRequestFillApprove.php index c3d40eabf2..af313f9165 100644 --- a/app/Notifications/NewRequestFillApprove.php +++ b/app/Notifications/NewRequestFillApprove.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public T * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { if ($this->torrentRequest->anon == 0) { return [ diff --git a/app/Notifications/NewRequestFillReject.php b/app/Notifications/NewRequestFillReject.php index 6fcef13832..e04bbc0a54 100644 --- a/app/Notifications/NewRequestFillReject.php +++ b/app/Notifications/NewRequestFillReject.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public T * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Rejected Your Fill Of A Requested Torrent', diff --git a/app/Notifications/NewRequestUnclaim.php b/app/Notifications/NewRequestUnclaim.php index a4b7dc44cc..6f989d3cce 100644 --- a/app/Notifications/NewRequestUnclaim.php +++ b/app/Notifications/NewRequestUnclaim.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public string $sender, public T * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender.' Has Unclaimed One Of Your Requested Torrents', diff --git a/app/Notifications/NewReseedRequest.php b/app/Notifications/NewReseedRequest.php index 6ebf762ab8..7b41b1b7a7 100644 --- a/app/Notifications/NewReseedRequest.php +++ b/app/Notifications/NewReseedRequest.php @@ -33,10 +33,8 @@ public function __construct(public Torrent $torrent) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { $appurl = \config('app.url'); diff --git a/app/Notifications/NewThank.php b/app/Notifications/NewThank.php index 52e1df1e8a..fb7c123dee 100644 --- a/app/Notifications/NewThank.php +++ b/app/Notifications/NewThank.php @@ -32,10 +32,8 @@ public function __construct(public string $type, public Thank $thank) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -44,10 +42,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->thank->user->username.' Has Thanked You For An Uploaded Torrent', diff --git a/app/Notifications/NewTopic.php b/app/Notifications/NewTopic.php index 3681e9aac9..2561cb16a3 100644 --- a/app/Notifications/NewTopic.php +++ b/app/Notifications/NewTopic.php @@ -34,10 +34,8 @@ public function __construct(public string $type, public User $user, public Topic * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -46,10 +44,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { if ($this->type == 'staff') { return [ diff --git a/app/Notifications/NewUnfollow.php b/app/Notifications/NewUnfollow.php index 335fd44d46..31167fbd8e 100644 --- a/app/Notifications/NewUnfollow.php +++ b/app/Notifications/NewUnfollow.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public User $sender, public Use * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->sender->username.' Has Unfollowed You!', diff --git a/app/Notifications/NewUpload.php b/app/Notifications/NewUpload.php index 49171350e9..1ee1943690 100644 --- a/app/Notifications/NewUpload.php +++ b/app/Notifications/NewUpload.php @@ -33,10 +33,8 @@ public function __construct(public string $type, public Torrent $torrent) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -45,10 +43,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->torrent->user->username.' Has Uploaded A New Torrent', diff --git a/app/Notifications/NewUploadTip.php b/app/Notifications/NewUploadTip.php index 20c17d8a98..fbd759e864 100644 --- a/app/Notifications/NewUploadTip.php +++ b/app/Notifications/NewUploadTip.php @@ -35,10 +35,8 @@ public function __construct(public string $type, public string $tipper, public $ * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['database']; } @@ -47,10 +45,8 @@ public function via($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ 'title' => $this->tipper.' Has Tipped You '.$this->amount.' BON For An Uploaded Torrent', diff --git a/app/Notifications/StaffCommentCreated.php b/app/Notifications/StaffCommentCreated.php index 46bc90615d..d7b177bb51 100644 --- a/app/Notifications/StaffCommentCreated.php +++ b/app/Notifications/StaffCommentCreated.php @@ -36,10 +36,8 @@ public function __construct(private Comment $comment) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('A comment was added (Staff)') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/StaffTicketAssigned.php b/app/Notifications/StaffTicketAssigned.php index 925f3e8da3..43b280aa11 100644 --- a/app/Notifications/StaffTicketAssigned.php +++ b/app/Notifications/StaffTicketAssigned.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('A ticket was assigned (Ticket # '.$this->ticket->id.')') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/StaffTicketClosed.php b/app/Notifications/StaffTicketClosed.php index 1cf47676ce..7949ec07fc 100644 --- a/app/Notifications/StaffTicketClosed.php +++ b/app/Notifications/StaffTicketClosed.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('A ticket was closed (Staff)') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/StaffTicketCreated.php b/app/Notifications/StaffTicketCreated.php index 1f74a16cc4..7f490021f2 100644 --- a/app/Notifications/StaffTicketCreated.php +++ b/app/Notifications/StaffTicketCreated.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('A ticket was created (Ticket # '.$this->ticket->id.')') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/TwoStepAuthCode.php b/app/Notifications/TwoStepAuthCode.php index 147a415912..3c844bd0d4 100644 --- a/app/Notifications/TwoStepAuthCode.php +++ b/app/Notifications/TwoStepAuthCode.php @@ -36,10 +36,8 @@ public function __construct(protected $user, protected $code) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->from(\config('auth.verificationEmailFrom'), \config('auth.verificationEmailFromName')) diff --git a/app/Notifications/UserCommentCreated.php b/app/Notifications/UserCommentCreated.php index ad3e793207..cec9b3012e 100644 --- a/app/Notifications/UserCommentCreated.php +++ b/app/Notifications/UserCommentCreated.php @@ -36,10 +36,8 @@ public function __construct(private Comment $comment) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('A comment was added (User)') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/UserTicketAssigned.php b/app/Notifications/UserTicketAssigned.php index 731b9e0111..1c79d8d1fd 100644 --- a/app/Notifications/UserTicketAssigned.php +++ b/app/Notifications/UserTicketAssigned.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('Your ticket was assigned (Ticket # '.$this->ticket->id.')') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/UserTicketClosed.php b/app/Notifications/UserTicketClosed.php index 0780d324c5..73bf390483 100644 --- a/app/Notifications/UserTicketClosed.php +++ b/app/Notifications/UserTicketClosed.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('Your ticket was closed (User)') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/UserTicketCreated.php b/app/Notifications/UserTicketCreated.php index be0d52a24e..2909502c6f 100644 --- a/app/Notifications/UserTicketCreated.php +++ b/app/Notifications/UserTicketCreated.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject('Your ticket was created (Ticket # '.$this->ticket->id.')') @@ -63,10 +59,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/UserTicketStale.php b/app/Notifications/UserTicketStale.php index b0f86d1791..d96601db4b 100644 --- a/app/Notifications/UserTicketStale.php +++ b/app/Notifications/UserTicketStale.php @@ -36,10 +36,8 @@ public function __construct(private Ticket $ticket) * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->cc($this->ticket->staff->email) @@ -64,10 +60,8 @@ public function toMail($notifiable) * Get the array representation of the notification. * * @param mixed $notifiable - * - * @return array */ - public function toArray($notifiable) + public function toArray($notifiable): array { return [ // diff --git a/app/Notifications/UsernameReminder.php b/app/Notifications/UsernameReminder.php index 157c560811..4fa0e98b48 100644 --- a/app/Notifications/UsernameReminder.php +++ b/app/Notifications/UsernameReminder.php @@ -36,10 +36,8 @@ public function __construct() * Get the notification's delivery channels. * * @param mixed $notifiable - * - * @return array */ - public function via($notifiable) + public function via($notifiable): array { return ['mail']; } @@ -48,10 +46,8 @@ public function via($notifiable) * Get the mail representation of the notification. * * @param mixed $notifiable - * - * @return \Illuminate\Notifications\Messages\MailMessage */ - public function toMail($notifiable) + public function toMail($notifiable): \Illuminate\Notifications\Messages\MailMessage { return (new MailMessage()) ->subject(\trans('common.your').' '.\config('app.name').' '.\trans('common.username')) diff --git a/app/Observers/TorrentObserver.php b/app/Observers/TorrentObserver.php index 52f8830b32..1714747c60 100644 --- a/app/Observers/TorrentObserver.php +++ b/app/Observers/TorrentObserver.php @@ -20,10 +20,8 @@ class TorrentObserver /** * Handle the Torrent "created" event. * - * - * @return void */ - public function created(Torrent $torrent) + public function created(Torrent $torrent): void { //\cache()->put(\sprintf('torrent:%s', $torrent->info_hash), $torrent); } @@ -31,10 +29,8 @@ public function created(Torrent $torrent) /** * Handle the Torrent "updated" event. * - * - * @return void */ - public function updated(Torrent $torrent) + public function updated(Torrent $torrent): void { //\cache()->put(\sprintf('torrent:%s', $torrent->info_hash), $torrent); } @@ -42,10 +38,8 @@ public function updated(Torrent $torrent) /** * Handle the Torrent "retrieved" event. * - * - * @return void */ - public function retrieved(Torrent $torrent) + public function retrieved(Torrent $torrent): void { //\cache()->add(\sprintf('torrent:%s', $torrent->info_hash), $torrent); } @@ -53,10 +47,8 @@ public function retrieved(Torrent $torrent) /** * Handle the Torrent "deleted" event. * - * - * @return void */ - public function deleted(Torrent $torrent) + public function deleted(Torrent $torrent): void { //\cache()->forget(\sprintf('torrent:%s', $torrent->info_hash)); } @@ -64,10 +56,8 @@ public function deleted(Torrent $torrent) /** * Handle the Torrent "restored" event. * - * - * @return void */ - public function restored(Torrent $torrent) + public function restored(Torrent $torrent): void { //\cache()->put(\sprintf('torrent:%s', $torrent->info_hash), $torrent); } diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 54be4756cf..dc57b90b42 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -20,10 +20,8 @@ class UserObserver /** * Handle the User "created" event. * - * - * @return void */ - public function created(User $user) + public function created(User $user): void { //\cache()->put(\sprintf('user:%s', $user->passkey), $user); } @@ -33,10 +31,8 @@ public function created(User $user) * * * @throws \Exception - * - * @return void */ - public function saved(User $user) + public function saved(User $user): void { //\cache()->put(\sprintf('user:%s', $user->passkey), $user); \cache()->forget('cachedUser.'.$user->id); @@ -45,10 +41,8 @@ public function saved(User $user) /** * Handle the User "retrieved" event. * - * - * @return void */ - public function retrieved(User $user) + public function retrieved(User $user): void { //\cache()->add(\sprintf('user:%s', $user->passkey), $user); } @@ -56,10 +50,8 @@ public function retrieved(User $user) /** * Handle the User "deleted" event. * - * - * @return void */ - public function deleted(User $user) + public function deleted(User $user): void { //\cache()->forget(\sprintf('user:%s', $user->passkey)); } @@ -67,10 +59,8 @@ public function deleted(User $user) /** * Handle the User "restored" event. * - * - * @return void */ - public function restored(User $user) + public function restored(User $user): void { //\cache()->put(\sprintf('user:%s', $user->passkey), $user); } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8fd5a69378..fdbe22e345 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -33,10 +33,8 @@ class AppServiceProvider extends ServiceProvider * This service provider is a great spot to register your various container * bindings with the application. As you can see, we are registering our * "Registrar" implementation here. You can add your own bindings too! - * - * @return void */ - public function register() + public function register(): void { // Wish $this->app->bind(WishInterface::class, WishRepository::class); @@ -49,10 +47,8 @@ public function register() /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { // User Observer For Cache User::observe(UserObserver::class); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 3bd18bada2..2e5e08a532 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -29,10 +29,8 @@ class AuthServiceProvider extends ServiceProvider /** * Register any authentication / authorization services. - * - * @return void */ - public function boot() + public function boot(): void { $this->registerPolicies(); Auth::provider('cache-user', function () { diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 99cc87e135..eed278b8a1 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -20,10 +20,8 @@ class BroadcastServiceProvider extends ServiceProvider { /** * Bootstrap any application services. - * - * @return void */ - public function boot() + public function boot(): void { Broadcast::routes(); diff --git a/app/Providers/EmailBlacklistServiceProvider.php b/app/Providers/EmailBlacklistServiceProvider.php index aff686237e..ce4863eb81 100644 --- a/app/Providers/EmailBlacklistServiceProvider.php +++ b/app/Providers/EmailBlacklistServiceProvider.php @@ -20,20 +20,16 @@ class EmailBlacklistServiceProvider extends ServiceProvider { /** * Register services. - * - * @return void */ - public function register() + public function register(): void { // } /** * Bootstrap services. - * - * @return void */ - public function boot() + public function boot(): void { // Add custom validation rules Validator::extend('blacklist', "App\Validators\EmailBlacklistValidator@validate"); diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index ef21631635..75ea18447c 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -87,10 +87,8 @@ class EventServiceProvider extends ServiceProvider /** * Register any events for your application. - * - * @return void */ - public function boot() + public function boot(): void { } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index ce91a9cb8b..331b48d525 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -32,10 +32,8 @@ class RouteServiceProvider extends ServiceProvider /** * Define your route model bindings, pattern filters, etc. - * - * @return void */ - public function boot() + public function boot(): void { $this->configureRateLimiting(); @@ -55,10 +53,8 @@ public function boot() /** * Configure the rate limiters for the application. - * - * @return void */ - protected function configureRateLimiting() + protected function configureRateLimiting(): void { RateLimiter::for('api', fn (Request $request) => Limit::perMinute(60)->by(\optional($request->user())->id ?: $request->ip())); } diff --git a/app/Repositories/ChatRepository.php b/app/Repositories/ChatRepository.php index 718d595d48..26c96cc478 100644 --- a/app/Repositories/ChatRepository.php +++ b/app/Repositories/ChatRepository.php @@ -46,7 +46,7 @@ public function bots() return $this->bot->all(); } - public function echoes($userId) + public function echoes($userId): \Illuminate\Support\Collection { return $this->userEcho->with([ 'bot', @@ -84,7 +84,7 @@ public function roomFindOrFail($id) return $this->chatroom->findOrFail($id); } - public function ping($type, $id) + public function ping($type, $id): bool { if ($type == 'room') { foreach (Chatroom::where('id', '>', 0)->get() as $room) { @@ -118,7 +118,7 @@ public function message($userId, $roomId, $message, $receiver = null, $bot = nul return $message; } - public function botMessage($botId, $roomId, $message, $receiver = null) + public function botMessage($botId, $roomId, $message, $receiver = null): void { $user = $this->user->find($receiver); if ($user->censor) { @@ -195,7 +195,7 @@ public function deleteMessage($id) } } - public function messages($roomId) + public function messages($roomId): \Illuminate\Support\Collection { return $this->message->with([ 'bot', @@ -212,7 +212,7 @@ public function messages($roomId) ->get(); } - public function botMessages($senderId, $botId) + public function botMessages($senderId, $botId): \Illuminate\Support\Collection { $systemUserId = User::where('username', 'System')->firstOrFail()->id; @@ -231,7 +231,7 @@ public function botMessages($senderId, $botId) ->get(); } - public function privateMessages($senderId, $targetId) + public function privateMessages($senderId, $targetId): \Illuminate\Support\Collection { return $this->message->with([ 'bot', @@ -248,7 +248,7 @@ public function privateMessages($senderId, $targetId) ->get(); } - public function checkMessageLimits($roomId) + public function checkMessageLimits($roomId): void { $messages = $this->messages($roomId)->toArray(); $limit = \config('chat.message_limit'); @@ -269,7 +269,7 @@ public function checkMessageLimits($roomId) } } - public function systemMessage($message, $bot = null) + public function systemMessage($message, $bot = null): static { $systemUserId = User::where('username', 'System')->first()->id; @@ -332,10 +332,8 @@ public function statusFindOrFail($id) /** * @param $message - * - * @return string */ - protected function censorMessage($message) + protected function censorMessage($message): string { foreach (\config('censor.redact') as $word) { if (\preg_match(\sprintf('/\b%s(?=[.,]|$|\s)/mi', $word), $message)) { diff --git a/app/Repositories/TaggedUserRepository.php b/app/Repositories/TaggedUserRepository.php index 20a582f86c..73634ac297 100644 --- a/app/Repositories/TaggedUserRepository.php +++ b/app/Repositories/TaggedUserRepository.php @@ -26,15 +26,10 @@ class TaggedUserRepository * Enables various debugging options:. * * 1. Allows you to tag yourself while testing and debugging - * - * @var bool */ - protected $debug = false; + protected bool $debug = false; - /** - * @var string - */ - protected $regex = '/@[a-zA-Z0-9-_]+/m'; + protected string $regex = '/@[a-zA-Z0-9-_]+/m'; /** * TaggedUserRepository Constructor. @@ -57,10 +52,8 @@ public function getTags($content) /** * @param $content - * - * @return bool */ - public function hasTags($content) + public function hasTags($content): bool { return $this->getTags($content) > 0; } @@ -68,15 +61,13 @@ public function hasTags($content) /** * @param $haystack * @param $needle - * - * @return bool */ - public function contains($haystack, $needle) + public function contains($haystack, $needle): bool { return \collect($this->getTags($haystack))->contains($needle); } - public function messageTaggedCommentUsers(string $type, string $content, User $user, $alias, Comment $comment) + public function messageTaggedCommentUsers(string $type, string $content, User $user, $alias, Comment $comment): bool { foreach ($this->getTags($content) as $tag) { $taggedUser = $this->user->where('username', \str_replace('@', '', $tag))->first(); @@ -86,7 +77,7 @@ public function messageTaggedCommentUsers(string $type, string $content, User $u return true; } - public function messageCommentUsers($type, $users, $sender, $alias, Comment $comment) + public function messageCommentUsers($type, $users, $sender, $alias, Comment $comment): bool { // Array of User objects if (\is_iterable($users)) { @@ -111,7 +102,7 @@ public function messageCommentUsers($type, $users, $sender, $alias, Comment $com return true; } - public function messageTaggedPostUsers(string $type, string $content, User $user, $alias, Post $post) + public function messageTaggedPostUsers(string $type, string $content, User $user, $alias, Post $post): bool { foreach ($this->getTags($content) as $tag) { $taggedUser = $this->user->where('username', \str_replace('@', '', $tag))->first(); @@ -121,7 +112,7 @@ public function messageTaggedPostUsers(string $type, string $content, User $user return true; } - public function messagePostUsers($type, $users, $sender, $alias, Post $post) + public function messagePostUsers($type, $users, $sender, $alias, Post $post): bool { // Array of User objects if (\is_iterable($users)) { @@ -155,7 +146,7 @@ public function setDebug(bool $debug): void $this->debug = $debug; } - protected function validate($user) + protected function validate($user): bool { return \is_object($user); } diff --git a/app/Repositories/WishRepository.php b/app/Repositories/WishRepository.php index cb0e187ac4..d5253688c0 100644 --- a/app/Repositories/WishRepository.php +++ b/app/Repositories/WishRepository.php @@ -27,11 +27,6 @@ public function __construct(private Wish $wish, private User $user, private Torr { } - /** - * @param null $paginate - * - * @return \Illuminate\Database\Eloquent\Collection|static[] - */ public function all($paginate = null): \Illuminate\Database\Eloquent\Collection|array { return $paginate ? $this->wish->paginate($paginate) : $this->wish->all(); @@ -68,10 +63,8 @@ public function findByTitle($title) /** * @param $uid * @param $id - * - * @return bool */ - public function exists($uid, $id) + public function exists($uid, $id): bool { return (bool) $this->user->find($uid) ->wishes() @@ -81,10 +74,8 @@ public function exists($uid, $id) /** * @param $id - * - * @return bool */ - public function isGranted($id) + public function isGranted($id): bool { return (bool) $this->torrent ->where('tmdb', '=', $id) diff --git a/app/Rules/BackupDisk.php b/app/Rules/BackupDisk.php index 3759501413..caabf2da13 100644 --- a/app/Rules/BackupDisk.php +++ b/app/Rules/BackupDisk.php @@ -17,14 +17,14 @@ class BackupDisk implements Rule { - public function passes($attribute, $value) + public function passes($attribute, $value): bool { $configuredBackupDisks = config('backup.backup.destination.disks'); return in_array($value, $configuredBackupDisks); } - public function message() + public function message(): string { return 'Current disk is not configured as a backup disk'; } diff --git a/app/Rules/PathToZip.php b/app/Rules/PathToZip.php index 8fb505c6b2..5c91f8da87 100644 --- a/app/Rules/PathToZip.php +++ b/app/Rules/PathToZip.php @@ -18,12 +18,12 @@ class PathToZip implements Rule { - public function passes($attribute, $value) + public function passes($attribute, $value): bool { return Str::endsWith($value, '.zip'); } - public function message() + public function message(): string { return 'It must be a zip file'; } diff --git a/app/Services/Tmdb/Client/Collection.php b/app/Services/Tmdb/Client/Collection.php index bbac3303f8..849a46803c 100644 --- a/app/Services/Tmdb/Client/Collection.php +++ b/app/Services/Tmdb/Client/Collection.php @@ -15,10 +15,7 @@ class Collection { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -68,7 +65,7 @@ public function get_id() return $this->data['id']; } - public function get_backdrop() + public function get_backdrop(): ?string { if ($this->data['backdrop_path']) { return 'https://image.tmdb.org/t/p/original'.$this->data['backdrop_path']; @@ -77,7 +74,7 @@ public function get_backdrop() return null; } - public function get_poster() + public function get_poster(): ?string { if ($this->data['poster_path']) { return 'https://image.tmdb.org/t/p/original'.$this->data['poster_path']; diff --git a/app/Services/Tmdb/Client/Company.php b/app/Services/Tmdb/Client/Company.php index e34ba97367..dc8b0219e8 100644 --- a/app/Services/Tmdb/Client/Company.php +++ b/app/Services/Tmdb/Client/Company.php @@ -15,15 +15,9 @@ class Company { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; - /** - * @var int|mixed - */ - public $page; + public ?int $page = null; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -79,7 +73,7 @@ public function get_id() return $this->data['id']; } - public function get_foto() + public function get_foto(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['profile_path']; } @@ -124,7 +118,7 @@ public function get_homepage() return $this->data['homepage']; } - public function get_movies() + public function get_movies(): array { $array = []; $this->page = 1; diff --git a/app/Services/Tmdb/Client/Episode.php b/app/Services/Tmdb/Client/Episode.php index 085deb89e2..31f2f97d0f 100644 --- a/app/Services/Tmdb/Client/Episode.php +++ b/app/Services/Tmdb/Client/Episode.php @@ -15,10 +15,7 @@ class Episode { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -73,12 +70,12 @@ public function get_id() return $this->data['id']; } - public function get_poster() + public function get_poster(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['poster_path']; } - public function get_season_number() + public function get_season_number(): string { return \sprintf('%02d', $this->data['seasons']); } diff --git a/app/Services/Tmdb/Client/FindMovie.php b/app/Services/Tmdb/Client/FindMovie.php index d9f838b5e6..e688505be2 100644 --- a/app/Services/Tmdb/Client/FindMovie.php +++ b/app/Services/Tmdb/Client/FindMovie.php @@ -15,10 +15,7 @@ class FindMovie { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; diff --git a/app/Services/Tmdb/Client/FindTv.php b/app/Services/Tmdb/Client/FindTv.php index 180821ded3..495e47a7bd 100644 --- a/app/Services/Tmdb/Client/FindTv.php +++ b/app/Services/Tmdb/Client/FindTv.php @@ -15,10 +15,7 @@ class FindTv { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; diff --git a/app/Services/Tmdb/Client/Genre.php b/app/Services/Tmdb/Client/Genre.php index cd28e1a8eb..928ac94cb8 100644 --- a/app/Services/Tmdb/Client/Genre.php +++ b/app/Services/Tmdb/Client/Genre.php @@ -15,10 +15,7 @@ class Genre { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -72,7 +69,7 @@ public function get_id() return $this->data['id']; } - public function get_foto() + public function get_foto(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['profile_path']; } diff --git a/app/Services/Tmdb/Client/Movie.php b/app/Services/Tmdb/Client/Movie.php index b6a3c7d143..18f3e85102 100644 --- a/app/Services/Tmdb/Client/Movie.php +++ b/app/Services/Tmdb/Client/Movie.php @@ -15,10 +15,7 @@ class Movie { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.themoviedb.org/3/'; @@ -53,7 +50,7 @@ public function getData() return $this->data; } - public function get_background() + public function get_background(): ?string { if (isset($this->data['backdrop_path'])) { return 'https://image.tmdb.org/t/p/original'.$this->data['backdrop_path']; @@ -117,7 +114,7 @@ public function get_popularity() return $this->data['popularity']; } - public function get_poster() + public function get_poster(): ?string { if (isset($this->data['poster_path'])) { return 'https://image.tmdb.org/t/p/original'.$this->data['poster_path']; @@ -176,7 +173,7 @@ public function get_vote_count() return $this->data['vote_count']; } - public function get_trailer() + public function get_trailer(): ?string { if (! empty($this->data['videos']['results'])) { return 'https://www.youtube-nocookie.com/embed/'.$this->data['videos']['results'][0]['key']; @@ -185,7 +182,7 @@ public function get_trailer() return null; } - public function get_videos() + public function get_videos(): ?string { if (isset($this->data['videos']['results'])) { return 'https://www.youtube.com/embed/'.$this->data['videos']['results']; diff --git a/app/Services/Tmdb/Client/Network.php b/app/Services/Tmdb/Client/Network.php index b9aabec5cf..9fe4530aad 100644 --- a/app/Services/Tmdb/Client/Network.php +++ b/app/Services/Tmdb/Client/Network.php @@ -15,10 +15,7 @@ class Network { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -73,7 +70,7 @@ public function get_id() return $this->data['id']; } - public function get_foto() + public function get_foto(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['profile_path']; } diff --git a/app/Services/Tmdb/Client/Person.php b/app/Services/Tmdb/Client/Person.php index e41c17a526..8d7c18d1a5 100644 --- a/app/Services/Tmdb/Client/Person.php +++ b/app/Services/Tmdb/Client/Person.php @@ -15,10 +15,7 @@ class Person { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -73,7 +70,7 @@ public function get_id() return $this->data['id']; } - public function get_foto() + public function get_foto(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['profile_path']; } diff --git a/app/Services/Tmdb/Client/Season.php b/app/Services/Tmdb/Client/Season.php index 7a468b1121..54c6a10409 100644 --- a/app/Services/Tmdb/Client/Season.php +++ b/app/Services/Tmdb/Client/Season.php @@ -15,10 +15,7 @@ class Season { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -78,12 +75,12 @@ public function get_id() return $this->data['id']; } - public function get_poster() + public function get_poster(): string { return 'https://image.tmdb.org/t/p/original'.$this->data['poster_path']; } - public function get_season_number() + public function get_season_number(): string { return \sprintf('%02d', $this->data['seasons']); } diff --git a/app/Services/Tmdb/Client/TV.php b/app/Services/Tmdb/Client/TV.php index abe4428a4c..62a1ab2ab1 100644 --- a/app/Services/Tmdb/Client/TV.php +++ b/app/Services/Tmdb/Client/TV.php @@ -15,10 +15,7 @@ class TV { - /** - * @var \GuzzleHttp\Client|mixed - */ - public $client; + public \GuzzleHttp\Client $client; public const API_BASE_URI = 'https://api.TheMovieDB.org/3'; @@ -53,7 +50,7 @@ public function getData() return $this->data; } - public function get_backdrop() + public function get_backdrop(): ?string { if ($this->data['backdrop_path']) { return 'https://image.tmdb.org/t/p/original'.$this->data['backdrop_path']; @@ -152,7 +149,7 @@ public function get_overview() return \preg_replace('/[[:^print:]]/', '', $this->data['overview']); } - public function get_poster() + public function get_poster(): ?string { if ($this->data['poster_path']) { return 'https://image.tmdb.org/t/p/original'.$this->data['poster_path']; @@ -191,7 +188,7 @@ public function get_vote_count() return $this->data['vote_count']; } - public function get_trailer() + public function get_trailer(): ?string { if (! empty($this->data['videos']['results'])) { return 'https://www.youtube.com/embed/'.$this->data['videos']['results'][0]['key']; @@ -200,7 +197,7 @@ public function get_trailer() return null; } - public function get_videos() + public function get_videos(): ?string { if ($this->data['videos']['results']) { return 'https://www.youtube-nocookie.com/embed/'.$this->data['videos']['results']; @@ -209,7 +206,7 @@ public function get_videos() return null; } - public function get_images() + public function get_images(): ?string { if ($this->data['images']['results']) { return 'https://www.youtube.com/embed/'.$this->data['images']['results']; diff --git a/app/Services/Tmdb/TMDB.php b/app/Services/Tmdb/TMDB.php index b4a7f53ab1..8ebf3cae71 100644 --- a/app/Services/Tmdb/TMDB.php +++ b/app/Services/Tmdb/TMDB.php @@ -15,7 +15,7 @@ class TMDB { - public function image($type, $array) + public function image($type, $array): ?string { if (isset($array[$type.'_path'])) { return 'https://image.tmdb.org/t/p/original'.$array[$type.'_path']; @@ -24,7 +24,7 @@ public function image($type, $array) return null; } - public function trailer($array) + public function trailer($array): ?string { if (isset($array['videos']['results'])) { return 'https://www.youtube.com/embed/'.$array['videos']['results'][0]['key']; @@ -47,7 +47,7 @@ public function ifExists($type, $array) return null; } - public function cast_array($cast) + public function cast_array($cast): array { return [ 'character' => $cast['character'], @@ -59,7 +59,7 @@ public function cast_array($cast) ]; } - public function person_array($person) + public function person_array($person): array { return [ 'birthday' => $this->ifExists('birthday', $person), diff --git a/app/Services/Tmdb/TMDBScraper.php b/app/Services/Tmdb/TMDBScraper.php index ce1f7cfa20..19e8f8b171 100644 --- a/app/Services/Tmdb/TMDBScraper.php +++ b/app/Services/Tmdb/TMDBScraper.php @@ -43,7 +43,7 @@ public function __construct(Request $request = null) } } - public function tv($id = null) + public function tv($id = null): void { if ($id == null) { $id = $this->id; @@ -82,7 +82,7 @@ public function tv($id = null) } } - public function movie($id = null) + public function movie($id = null): void { if ($id == null) { $id = $this->id; @@ -129,7 +129,7 @@ public function movie($id = null) } } - public function collection($id = null) + public function collection($id = null): void { if ($id == null) { $id = $this->id; @@ -151,7 +151,7 @@ public function collection($id = null) //return ['message' => 'Collection with id: ' . $id . ' Has been added to the database, But movies are loaded with the queue']; } - public function company($id = null) + public function company($id = null): void { if ($id == null) { $id = $this->id; diff --git a/app/Traits/Auditable.php b/app/Traits/Auditable.php index cd150e4b79..9b1ad85a80 100644 --- a/app/Traits/Auditable.php +++ b/app/Traits/Auditable.php @@ -70,12 +70,10 @@ protected static function strip($model, $data) * Generates the data to store. * * @param $action - * @param array $old - * @param array $new * * @throws \JsonException */ - protected static function generate($action, $old = [], $new = []): false|string + protected static function generate($action, array $old = [], array $new = []): false|string { $data = []; switch ($action) { diff --git a/app/Traits/TwoStep.php b/app/Traits/TwoStep.php index 18e25893e1..47e5c405ae 100644 --- a/app/Traits/TwoStep.php +++ b/app/Traits/TwoStep.php @@ -139,11 +139,10 @@ protected function getTwoStepAuthStatus(int $userId) /** * Format verification exceeded timings with Carbon. * - * @param string $time * * @return \Illuminate\Support\Collection */ - protected function exceededTimeParser($time) + protected function exceededTimeParser(string $time) { $tomorrow = Carbon::parse($time)->addMinutes(\config('auth.TwoStepExceededCountdownMinutes'))->format('l, F jS Y h:i:sa'); $remaining = $time->addMinutes(\config('auth.TwoStepExceededCountdownMinutes'))->diffForHumans(null, true); @@ -210,13 +209,8 @@ protected function resetActivationCountdown($twoStepAuth) /** * Send verification code via notify. - * - * @param $twoStepAuth - * @param null $deliveryMethod (nullable) - * - * @return void */ - protected function sendVerificationCodeNotification($twoStepAuth, $deliveryMethod = null) + protected function sendVerificationCodeNotification($twoStepAuth, $deliveryMethod = null): void { $user = \auth()->user(); if ($deliveryMethod === null) { diff --git a/app/Validators/EmailBlacklistValidator.php b/app/Validators/EmailBlacklistValidator.php index eeaeb4dc42..86f039d4a7 100644 --- a/app/Validators/EmailBlacklistValidator.php +++ b/app/Validators/EmailBlacklistValidator.php @@ -31,10 +31,8 @@ class EmailBlacklistValidator * @param $attribute * @param $rule * @param $parameters - * - * @return string */ - public function message($message, $attribute, $rule, $parameters) + public function message($message, $attribute, $rule, $parameters): string { return \sprintf('%s domain is not allowed. Throwaway email providers are blacklisted.', $attribute); } @@ -42,15 +40,12 @@ public function message($message, $attribute, $rule, $parameters) /** * Execute the validation routine. * - * @param string $attribute - * @param string $value - * @param array $parameters * * @throws \Exception * * @return bool. */ - public function validate($attribute, $value, $parameters) + public function validate(string $attribute, string $value, array $parameters): bool { // Load blacklisted domains $this->refresh(); @@ -64,21 +59,15 @@ public function validate($attribute, $value, $parameters) /** * Retrive latest selection of blacklisted domains and cache them. - * - * @param null - * - * @throws \Exception - * - * @return void */ - public function refresh() + public function refresh(): void { $this->shouldUpdate(); $this->domains = \cache()->get(\config('email-blacklist.cache-key')); $this->appendCustomDomains(); } - protected function shouldUpdate() + protected function shouldUpdate(): void { $autoupdate = \config('email-blacklist.auto-update'); @@ -90,7 +79,7 @@ protected function shouldUpdate() } } - protected function appendCustomDomains() + protected function appendCustomDomains(): void { $appendList = \config('email-blacklist.append'); if ($appendList === null) { diff --git a/database/factories/AlbumFactory.php b/database/factories/AlbumFactory.php index dc8c4779dc..88126d3944 100644 --- a/database/factories/AlbumFactory.php +++ b/database/factories/AlbumFactory.php @@ -19,10 +19,8 @@ class AlbumFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/ApplicationFactory.php b/database/factories/ApplicationFactory.php index c871305ed0..b71b5480d5 100644 --- a/database/factories/ApplicationFactory.php +++ b/database/factories/ApplicationFactory.php @@ -19,10 +19,8 @@ class ApplicationFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'type' => $this->faker->word, diff --git a/database/factories/ApplicationImageProofFactory.php b/database/factories/ApplicationImageProofFactory.php index 1efcc66b4b..3450d0033e 100644 --- a/database/factories/ApplicationImageProofFactory.php +++ b/database/factories/ApplicationImageProofFactory.php @@ -19,10 +19,8 @@ class ApplicationImageProofFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'application_id' => fn () => Application::factory()->create()->id, diff --git a/database/factories/ApplicationUrlProofFactory.php b/database/factories/ApplicationUrlProofFactory.php index 9d99ad5366..225d351667 100644 --- a/database/factories/ApplicationUrlProofFactory.php +++ b/database/factories/ApplicationUrlProofFactory.php @@ -19,10 +19,8 @@ class ApplicationUrlProofFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'application_id' => fn () => Application::factory()->create()->id, diff --git a/database/factories/ArticleFactory.php b/database/factories/ArticleFactory.php index 4a0ea5aa9e..2539668fb1 100644 --- a/database/factories/ArticleFactory.php +++ b/database/factories/ArticleFactory.php @@ -19,10 +19,8 @@ class ArticleFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'title' => $this->faker->word, diff --git a/database/factories/AuditFactory.php b/database/factories/AuditFactory.php index 093fb87bc3..931527fc45 100644 --- a/database/factories/AuditFactory.php +++ b/database/factories/AuditFactory.php @@ -19,10 +19,8 @@ class AuditFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/BanFactory.php b/database/factories/BanFactory.php index 8d54cb4a4a..85ec601167 100644 --- a/database/factories/BanFactory.php +++ b/database/factories/BanFactory.php @@ -19,10 +19,8 @@ class BanFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'owned_by' => fn () => User::factory()->create()->id, diff --git a/database/factories/BonExchangeFactory.php b/database/factories/BonExchangeFactory.php index 5eb3a1797d..4adc57bd36 100644 --- a/database/factories/BonExchangeFactory.php +++ b/database/factories/BonExchangeFactory.php @@ -18,10 +18,8 @@ class BonExchangeFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'description' => $this->faker->text, diff --git a/database/factories/BonTransactionsFactory.php b/database/factories/BonTransactionsFactory.php index 3e755751ec..a8fc9ec763 100644 --- a/database/factories/BonTransactionsFactory.php +++ b/database/factories/BonTransactionsFactory.php @@ -20,10 +20,8 @@ class BonTransactionsFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'itemID' => fn () => BonExchange::factory()->create()->id, diff --git a/database/factories/BookmarkFactory.php b/database/factories/BookmarkFactory.php index f03ff1a138..e5d88a6057 100644 --- a/database/factories/BookmarkFactory.php +++ b/database/factories/BookmarkFactory.php @@ -20,10 +20,8 @@ class BookmarkFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/BotFactory.php b/database/factories/BotFactory.php index 7b81418c79..08db82a51e 100644 --- a/database/factories/BotFactory.php +++ b/database/factories/BotFactory.php @@ -18,10 +18,8 @@ class BotFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'position' => $this->faker->randomNumber(), diff --git a/database/factories/BotTransactionFactory.php b/database/factories/BotTransactionFactory.php index 4c1b490853..e4c142516a 100644 --- a/database/factories/BotTransactionFactory.php +++ b/database/factories/BotTransactionFactory.php @@ -20,10 +20,8 @@ class BotTransactionFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'type' => $this->faker->word, diff --git a/database/factories/CategoryFactory.php b/database/factories/CategoryFactory.php index 0fc61812d1..051dc96ffc 100644 --- a/database/factories/CategoryFactory.php +++ b/database/factories/CategoryFactory.php @@ -18,10 +18,8 @@ class CategoryFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/ChatStatusFactory.php b/database/factories/ChatStatusFactory.php index b4a94f1922..e84b5ac48f 100644 --- a/database/factories/ChatStatusFactory.php +++ b/database/factories/ChatStatusFactory.php @@ -18,10 +18,8 @@ class ChatStatusFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->unique()->name, diff --git a/database/factories/ChatroomFactory.php b/database/factories/ChatroomFactory.php index f63fa9a762..92befb70e0 100644 --- a/database/factories/ChatroomFactory.php +++ b/database/factories/ChatroomFactory.php @@ -18,10 +18,8 @@ class ChatroomFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->unique()->word, diff --git a/database/factories/CommentFactory.php b/database/factories/CommentFactory.php index eb867c6e84..9f9e68b74f 100644 --- a/database/factories/CommentFactory.php +++ b/database/factories/CommentFactory.php @@ -23,10 +23,8 @@ class CommentFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'content' => $this->faker->text, diff --git a/database/factories/FailedLoginAttemptFactory.php b/database/factories/FailedLoginAttemptFactory.php index 1f51cd4b5b..d82b8488eb 100644 --- a/database/factories/FailedLoginAttemptFactory.php +++ b/database/factories/FailedLoginAttemptFactory.php @@ -18,10 +18,8 @@ class FailedLoginAttemptFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => $this->faker->randomNumber(), diff --git a/database/factories/FeaturedTorrentFactory.php b/database/factories/FeaturedTorrentFactory.php index 4668610ed7..de7ae8f0ff 100644 --- a/database/factories/FeaturedTorrentFactory.php +++ b/database/factories/FeaturedTorrentFactory.php @@ -20,10 +20,8 @@ class FeaturedTorrentFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/FollowFactory.php b/database/factories/FollowFactory.php index 7f9b8c0c54..2d294a7d6b 100644 --- a/database/factories/FollowFactory.php +++ b/database/factories/FollowFactory.php @@ -19,10 +19,8 @@ class FollowFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/ForumFactory.php b/database/factories/ForumFactory.php index fc83ce9b34..b58ec9dfca 100644 --- a/database/factories/ForumFactory.php +++ b/database/factories/ForumFactory.php @@ -18,10 +18,8 @@ class ForumFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'position' => $this->faker->randomNumber(), diff --git a/database/factories/FreeleechTokenFactory.php b/database/factories/FreeleechTokenFactory.php index 6f9732d34c..d64400966a 100644 --- a/database/factories/FreeleechTokenFactory.php +++ b/database/factories/FreeleechTokenFactory.php @@ -18,10 +18,8 @@ class FreeleechTokenFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => $this->faker->randomNumber(), diff --git a/database/factories/GitUpdateFactory.php b/database/factories/GitUpdateFactory.php index 8b84241f64..674d70de09 100644 --- a/database/factories/GitUpdateFactory.php +++ b/database/factories/GitUpdateFactory.php @@ -18,10 +18,8 @@ class GitUpdateFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/GraveyardFactory.php b/database/factories/GraveyardFactory.php index a77aeff4a4..4c3769bd53 100644 --- a/database/factories/GraveyardFactory.php +++ b/database/factories/GraveyardFactory.php @@ -20,10 +20,8 @@ class GraveyardFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/GroupFactory.php b/database/factories/GroupFactory.php index 26ad010645..44f9ef8661 100644 --- a/database/factories/GroupFactory.php +++ b/database/factories/GroupFactory.php @@ -18,10 +18,8 @@ class GroupFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/HistoryFactory.php b/database/factories/HistoryFactory.php index a5c0c43573..77a2cff5aa 100644 --- a/database/factories/HistoryFactory.php +++ b/database/factories/HistoryFactory.php @@ -20,10 +20,8 @@ class HistoryFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/ImageFactory.php b/database/factories/ImageFactory.php index 6b922fd6b4..8571408fdd 100644 --- a/database/factories/ImageFactory.php +++ b/database/factories/ImageFactory.php @@ -19,10 +19,8 @@ class ImageFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/InviteFactory.php b/database/factories/InviteFactory.php index ff6f462f26..529ff9666a 100644 --- a/database/factories/InviteFactory.php +++ b/database/factories/InviteFactory.php @@ -19,10 +19,8 @@ class InviteFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/LikeFactory.php b/database/factories/LikeFactory.php index 738432e41c..252a0f29f3 100644 --- a/database/factories/LikeFactory.php +++ b/database/factories/LikeFactory.php @@ -20,10 +20,8 @@ class LikeFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/MessageFactory.php b/database/factories/MessageFactory.php index 7546699c33..49178b092d 100644 --- a/database/factories/MessageFactory.php +++ b/database/factories/MessageFactory.php @@ -21,10 +21,8 @@ class MessageFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/NoteFactory.php b/database/factories/NoteFactory.php index f8c6e7fa71..9c56b5bdd6 100644 --- a/database/factories/NoteFactory.php +++ b/database/factories/NoteFactory.php @@ -19,10 +19,8 @@ class NoteFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/NotificationFactory.php b/database/factories/NotificationFactory.php index 4c4b14d987..939e530c5f 100644 --- a/database/factories/NotificationFactory.php +++ b/database/factories/NotificationFactory.php @@ -18,10 +18,8 @@ class NotificationFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'type' => $this->faker->word, diff --git a/database/factories/OptionFactory.php b/database/factories/OptionFactory.php index 00b4385cd2..2eee7e4b46 100644 --- a/database/factories/OptionFactory.php +++ b/database/factories/OptionFactory.php @@ -19,10 +19,8 @@ class OptionFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'poll_id' => fn () => Poll::factory()->create()->id, diff --git a/database/factories/PageFactory.php b/database/factories/PageFactory.php index f054af0e0b..c9be034021 100644 --- a/database/factories/PageFactory.php +++ b/database/factories/PageFactory.php @@ -18,10 +18,8 @@ class PageFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/PeerFactory.php b/database/factories/PeerFactory.php index 37b90c586f..dfb39500e1 100644 --- a/database/factories/PeerFactory.php +++ b/database/factories/PeerFactory.php @@ -20,10 +20,8 @@ class PeerFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'peer_id' => $this->faker->word, diff --git a/database/factories/PermissionFactory.php b/database/factories/PermissionFactory.php index 0a7a9d8c8c..ed9e06b36c 100644 --- a/database/factories/PermissionFactory.php +++ b/database/factories/PermissionFactory.php @@ -20,10 +20,8 @@ class PermissionFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'forum_id' => fn () => Forum::factory()->create()->id, diff --git a/database/factories/PersonalFreeleechFactory.php b/database/factories/PersonalFreeleechFactory.php index a83fab2f09..468977860f 100644 --- a/database/factories/PersonalFreeleechFactory.php +++ b/database/factories/PersonalFreeleechFactory.php @@ -18,10 +18,8 @@ class PersonalFreeleechFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => $this->faker->randomNumber(), diff --git a/database/factories/PlaylistFactory.php b/database/factories/PlaylistFactory.php index a4fd9fa848..c918a50683 100644 --- a/database/factories/PlaylistFactory.php +++ b/database/factories/PlaylistFactory.php @@ -19,10 +19,8 @@ class PlaylistFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/PlaylistTorrentFactory.php b/database/factories/PlaylistTorrentFactory.php index 475c856a9e..2c8ce7d9d1 100644 --- a/database/factories/PlaylistTorrentFactory.php +++ b/database/factories/PlaylistTorrentFactory.php @@ -20,10 +20,8 @@ class PlaylistTorrentFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'position' => $this->faker->randomNumber(), diff --git a/database/factories/PollFactory.php b/database/factories/PollFactory.php index 51c376f40c..0832c74e1e 100644 --- a/database/factories/PollFactory.php +++ b/database/factories/PollFactory.php @@ -19,10 +19,8 @@ class PollFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/PostFactory.php b/database/factories/PostFactory.php index 934c116303..ecc511d9e9 100644 --- a/database/factories/PostFactory.php +++ b/database/factories/PostFactory.php @@ -20,10 +20,8 @@ class PostFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'content' => $this->faker->text, diff --git a/database/factories/PrivateMessageFactory.php b/database/factories/PrivateMessageFactory.php index 2dcd1dfccd..4182114215 100644 --- a/database/factories/PrivateMessageFactory.php +++ b/database/factories/PrivateMessageFactory.php @@ -19,10 +19,8 @@ class PrivateMessageFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'sender_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/ReportFactory.php b/database/factories/ReportFactory.php index f4e2293d49..1ecf0ed5a4 100644 --- a/database/factories/ReportFactory.php +++ b/database/factories/ReportFactory.php @@ -21,10 +21,8 @@ class ReportFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'type' => $this->faker->word, diff --git a/database/factories/ResolutionFactory.php b/database/factories/ResolutionFactory.php index 60b44c6f73..f33434390d 100644 --- a/database/factories/ResolutionFactory.php +++ b/database/factories/ResolutionFactory.php @@ -18,10 +18,8 @@ class ResolutionFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/RssFactory.php b/database/factories/RssFactory.php index ae01c7a2cf..3c11cfad11 100644 --- a/database/factories/RssFactory.php +++ b/database/factories/RssFactory.php @@ -19,10 +19,8 @@ class RssFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'position' => $this->faker->randomNumber(), diff --git a/database/factories/SeedboxFactory.php b/database/factories/SeedboxFactory.php index dc78e4a9e1..6502c78d5c 100644 --- a/database/factories/SeedboxFactory.php +++ b/database/factories/SeedboxFactory.php @@ -19,10 +19,8 @@ class SeedboxFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/SubscriptionFactory.php b/database/factories/SubscriptionFactory.php index 82a8868b32..a7da429759 100644 --- a/database/factories/SubscriptionFactory.php +++ b/database/factories/SubscriptionFactory.php @@ -21,10 +21,8 @@ class SubscriptionFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/ThankFactory.php b/database/factories/ThankFactory.php index 1587942c67..69e18e2042 100644 --- a/database/factories/ThankFactory.php +++ b/database/factories/ThankFactory.php @@ -20,10 +20,8 @@ class ThankFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/TopicFactory.php b/database/factories/TopicFactory.php index c48a3df9d8..77524a2c7b 100644 --- a/database/factories/TopicFactory.php +++ b/database/factories/TopicFactory.php @@ -20,10 +20,8 @@ class TopicFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/TorrentFactory.php b/database/factories/TorrentFactory.php index 810f39ae52..82f8e2a293 100644 --- a/database/factories/TorrentFactory.php +++ b/database/factories/TorrentFactory.php @@ -22,10 +22,8 @@ class TorrentFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { $freeleech = ['0', '25', '50', '75', '100']; $selected = \random_int(0, \count($freeleech) - 1); diff --git a/database/factories/TorrentFileFactory.php b/database/factories/TorrentFileFactory.php index 982ec13e27..6efe9cffff 100644 --- a/database/factories/TorrentFileFactory.php +++ b/database/factories/TorrentFileFactory.php @@ -19,10 +19,8 @@ class TorrentFileFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/TorrentRequestBountyFactory.php b/database/factories/TorrentRequestBountyFactory.php index c14f523e55..0751215d5e 100644 --- a/database/factories/TorrentRequestBountyFactory.php +++ b/database/factories/TorrentRequestBountyFactory.php @@ -20,10 +20,8 @@ class TorrentRequestBountyFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/TorrentRequestClaimFactory.php b/database/factories/TorrentRequestClaimFactory.php index 3a7679193b..8221b55e1e 100644 --- a/database/factories/TorrentRequestClaimFactory.php +++ b/database/factories/TorrentRequestClaimFactory.php @@ -18,10 +18,8 @@ class TorrentRequestClaimFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'request_id' => $this->faker->randomNumber(), diff --git a/database/factories/TorrentRequestFactory.php b/database/factories/TorrentRequestFactory.php index 19fa202d8b..9e731fd45a 100644 --- a/database/factories/TorrentRequestFactory.php +++ b/database/factories/TorrentRequestFactory.php @@ -23,10 +23,8 @@ class TorrentRequestFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/TwoStepAuthFactory.php b/database/factories/TwoStepAuthFactory.php index f5f17e1158..7caa3f4e2c 100644 --- a/database/factories/TwoStepAuthFactory.php +++ b/database/factories/TwoStepAuthFactory.php @@ -19,10 +19,8 @@ class TwoStepAuthFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'userId' => $this->faker->randomNumber(), diff --git a/database/factories/TypeFactory.php b/database/factories/TypeFactory.php index ea3d39f1f6..d8798f8612 100644 --- a/database/factories/TypeFactory.php +++ b/database/factories/TypeFactory.php @@ -18,10 +18,8 @@ class TypeFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'name' => $this->faker->name, diff --git a/database/factories/UserActivationFactory.php b/database/factories/UserActivationFactory.php index fc6fa09ebb..1b3d0db4a9 100644 --- a/database/factories/UserActivationFactory.php +++ b/database/factories/UserActivationFactory.php @@ -19,10 +19,8 @@ class UserActivationFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/UserAudibleFactory.php b/database/factories/UserAudibleFactory.php index a5381f4602..e1bfad80b2 100644 --- a/database/factories/UserAudibleFactory.php +++ b/database/factories/UserAudibleFactory.php @@ -21,10 +21,8 @@ class UserAudibleFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/UserEchoFactory.php b/database/factories/UserEchoFactory.php index a8c865a1df..002cecdeea 100644 --- a/database/factories/UserEchoFactory.php +++ b/database/factories/UserEchoFactory.php @@ -21,10 +21,8 @@ class UserEchoFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index ad2bfe7052..22e9973c1b 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -22,10 +22,8 @@ class UserFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'username' => $this->faker->unique()->userName, diff --git a/database/factories/UserNotificationFactory.php b/database/factories/UserNotificationFactory.php index 8136040c37..643be9f330 100644 --- a/database/factories/UserNotificationFactory.php +++ b/database/factories/UserNotificationFactory.php @@ -19,10 +19,8 @@ class UserNotificationFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/UserPrivacyFactory.php b/database/factories/UserPrivacyFactory.php index b7a85b4a6c..bda2e7112d 100644 --- a/database/factories/UserPrivacyFactory.php +++ b/database/factories/UserPrivacyFactory.php @@ -19,10 +19,8 @@ class UserPrivacyFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/VoterFactory.php b/database/factories/VoterFactory.php index 01ddd6617f..2dc4b906ad 100644 --- a/database/factories/VoterFactory.php +++ b/database/factories/VoterFactory.php @@ -20,10 +20,8 @@ class VoterFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'poll_id' => fn () => Poll::factory()->create()->id, diff --git a/database/factories/WarningFactory.php b/database/factories/WarningFactory.php index 05514d9bd5..b560d90715 100644 --- a/database/factories/WarningFactory.php +++ b/database/factories/WarningFactory.php @@ -20,10 +20,8 @@ class WarningFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/factories/WishFactory.php b/database/factories/WishFactory.php index 368aff1883..88c5658262 100644 --- a/database/factories/WishFactory.php +++ b/database/factories/WishFactory.php @@ -19,10 +19,8 @@ class WishFactory extends Factory /** * Define the model's default state. - * - * @return array */ - public function definition() + public function definition(): array { return [ 'user_id' => fn () => User::factory()->create()->id, diff --git a/database/migrations/2017_12_10_020753_create_articles_table.php b/database/migrations/2017_12_10_020753_create_articles_table.php index ee331f7009..313996863a 100644 --- a/database/migrations/2017_12_10_020753_create_articles_table.php +++ b/database/migrations/2017_12_10_020753_create_articles_table.php @@ -18,10 +18,8 @@ class CreateArticlesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('articles', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_ban_table.php b/database/migrations/2017_12_10_020753_create_ban_table.php index ad7f3f0f31..03b22f3718 100644 --- a/database/migrations/2017_12_10_020753_create_ban_table.php +++ b/database/migrations/2017_12_10_020753_create_ban_table.php @@ -18,10 +18,8 @@ class CreateBanTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('ban', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_bon_exchange_table.php b/database/migrations/2017_12_10_020753_create_bon_exchange_table.php index 37c9b2d2f0..7fb4721a64 100644 --- a/database/migrations/2017_12_10_020753_create_bon_exchange_table.php +++ b/database/migrations/2017_12_10_020753_create_bon_exchange_table.php @@ -17,10 +17,8 @@ class CreateBonExchangeTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('bon_exchange', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_bon_transactions_table.php b/database/migrations/2017_12_10_020753_create_bon_transactions_table.php index 1861acdb20..bfaf133be6 100644 --- a/database/migrations/2017_12_10_020753_create_bon_transactions_table.php +++ b/database/migrations/2017_12_10_020753_create_bon_transactions_table.php @@ -17,10 +17,8 @@ class CreateBonTransactionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('bon_transactions', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_bookmarks_table.php b/database/migrations/2017_12_10_020753_create_bookmarks_table.php index e9b7cc67a0..e31f1eaf4d 100644 --- a/database/migrations/2017_12_10_020753_create_bookmarks_table.php +++ b/database/migrations/2017_12_10_020753_create_bookmarks_table.php @@ -18,10 +18,8 @@ class CreateBookmarksTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('bookmarks', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_categories_table.php b/database/migrations/2017_12_10_020753_create_categories_table.php index a05c0e5e25..5b961da8a9 100644 --- a/database/migrations/2017_12_10_020753_create_categories_table.php +++ b/database/migrations/2017_12_10_020753_create_categories_table.php @@ -18,10 +18,8 @@ class CreateCategoriesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('categories', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_clients_table.php b/database/migrations/2017_12_10_020753_create_clients_table.php index dbde80ef1d..326e94f019 100644 --- a/database/migrations/2017_12_10_020753_create_clients_table.php +++ b/database/migrations/2017_12_10_020753_create_clients_table.php @@ -18,10 +18,8 @@ class CreateClientsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('clients', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_comments_table.php b/database/migrations/2017_12_10_020753_create_comments_table.php index ff43c5c868..1e3c8d8597 100644 --- a/database/migrations/2017_12_10_020753_create_comments_table.php +++ b/database/migrations/2017_12_10_020753_create_comments_table.php @@ -18,10 +18,8 @@ class CreateCommentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('comments', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_failed_login_attempts_table.php b/database/migrations/2017_12_10_020753_create_failed_login_attempts_table.php index 8ec4ec9ee0..7204894b37 100644 --- a/database/migrations/2017_12_10_020753_create_failed_login_attempts_table.php +++ b/database/migrations/2017_12_10_020753_create_failed_login_attempts_table.php @@ -18,10 +18,8 @@ class CreateFailedLoginAttemptsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('failed_login_attempts', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_featured_torrents_table.php b/database/migrations/2017_12_10_020753_create_featured_torrents_table.php index 3bd538cd5c..83ccac11e9 100644 --- a/database/migrations/2017_12_10_020753_create_featured_torrents_table.php +++ b/database/migrations/2017_12_10_020753_create_featured_torrents_table.php @@ -18,10 +18,8 @@ class CreateFeaturedTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('featured_torrents', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_files_table.php b/database/migrations/2017_12_10_020753_create_files_table.php index 4d2545279f..8a754a6e4b 100644 --- a/database/migrations/2017_12_10_020753_create_files_table.php +++ b/database/migrations/2017_12_10_020753_create_files_table.php @@ -18,10 +18,8 @@ class CreateFilesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('files', function (Blueprint $table) { $table->bigInteger('id', true)->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_follows_table.php b/database/migrations/2017_12_10_020753_create_follows_table.php index a39e730fef..57a3ac1837 100644 --- a/database/migrations/2017_12_10_020753_create_follows_table.php +++ b/database/migrations/2017_12_10_020753_create_follows_table.php @@ -18,10 +18,8 @@ class CreateFollowsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('follows', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_forums_table.php b/database/migrations/2017_12_10_020753_create_forums_table.php index d619bb39a4..f21affef19 100644 --- a/database/migrations/2017_12_10_020753_create_forums_table.php +++ b/database/migrations/2017_12_10_020753_create_forums_table.php @@ -18,10 +18,8 @@ class CreateForumsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('forums', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_graveyard_table.php b/database/migrations/2017_12_10_020753_create_graveyard_table.php index 141c74496a..ace6bb6bcc 100644 --- a/database/migrations/2017_12_10_020753_create_graveyard_table.php +++ b/database/migrations/2017_12_10_020753_create_graveyard_table.php @@ -18,10 +18,8 @@ class CreateGraveyardTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('graveyard', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_groups_table.php b/database/migrations/2017_12_10_020753_create_groups_table.php index 44f935677e..9a2918c4a3 100644 --- a/database/migrations/2017_12_10_020753_create_groups_table.php +++ b/database/migrations/2017_12_10_020753_create_groups_table.php @@ -18,10 +18,8 @@ class CreateGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('groups', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_history_table.php b/database/migrations/2017_12_10_020753_create_history_table.php index e67843eec7..4cb6524ba9 100644 --- a/database/migrations/2017_12_10_020753_create_history_table.php +++ b/database/migrations/2017_12_10_020753_create_history_table.php @@ -17,10 +17,8 @@ class CreateHistoryTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('history', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_invites_table.php b/database/migrations/2017_12_10_020753_create_invites_table.php index cfda590b09..fe702bc962 100644 --- a/database/migrations/2017_12_10_020753_create_invites_table.php +++ b/database/migrations/2017_12_10_020753_create_invites_table.php @@ -18,10 +18,8 @@ class CreateInvitesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('invites', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_jobs_table.php b/database/migrations/2017_12_10_020753_create_jobs_table.php index c39042e69e..827597d097 100644 --- a/database/migrations/2017_12_10_020753_create_jobs_table.php +++ b/database/migrations/2017_12_10_020753_create_jobs_table.php @@ -18,10 +18,8 @@ class CreateJobsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('jobs', function (Blueprint $table) { $table->bigInteger('id', true)->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_likes_table.php b/database/migrations/2017_12_10_020753_create_likes_table.php index 3dcb0b2417..64bc70579a 100644 --- a/database/migrations/2017_12_10_020753_create_likes_table.php +++ b/database/migrations/2017_12_10_020753_create_likes_table.php @@ -18,10 +18,8 @@ class CreateLikesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('likes', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_log_activities_table.php b/database/migrations/2017_12_10_020753_create_log_activities_table.php index 686ba7bc63..4f2539907d 100644 --- a/database/migrations/2017_12_10_020753_create_log_activities_table.php +++ b/database/migrations/2017_12_10_020753_create_log_activities_table.php @@ -18,10 +18,8 @@ class CreateLogActivitiesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('log_activities', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_notifications_table.php b/database/migrations/2017_12_10_020753_create_notifications_table.php index 25485eccd2..2ca5141e5f 100644 --- a/database/migrations/2017_12_10_020753_create_notifications_table.php +++ b/database/migrations/2017_12_10_020753_create_notifications_table.php @@ -18,10 +18,8 @@ class CreateNotificationsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('notifications', function (Blueprint $table) { $table->char('id', 36)->primary(); diff --git a/database/migrations/2017_12_10_020753_create_options_table.php b/database/migrations/2017_12_10_020753_create_options_table.php index 6431ed9885..eefac75350 100644 --- a/database/migrations/2017_12_10_020753_create_options_table.php +++ b/database/migrations/2017_12_10_020753_create_options_table.php @@ -18,10 +18,8 @@ class CreateOptionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('options', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_pages_table.php b/database/migrations/2017_12_10_020753_create_pages_table.php index 962481db5e..de36582ff3 100644 --- a/database/migrations/2017_12_10_020753_create_pages_table.php +++ b/database/migrations/2017_12_10_020753_create_pages_table.php @@ -18,10 +18,8 @@ class CreatePagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('pages', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_password_resets_table.php b/database/migrations/2017_12_10_020753_create_password_resets_table.php index accdc3b3fd..bb347859bf 100644 --- a/database/migrations/2017_12_10_020753_create_password_resets_table.php +++ b/database/migrations/2017_12_10_020753_create_password_resets_table.php @@ -18,10 +18,8 @@ class CreatePasswordResetsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('password_resets', function (Blueprint $table) { $table->string('email')->index(); diff --git a/database/migrations/2017_12_10_020753_create_peers_table.php b/database/migrations/2017_12_10_020753_create_peers_table.php index 34818c82e6..e430b2894a 100644 --- a/database/migrations/2017_12_10_020753_create_peers_table.php +++ b/database/migrations/2017_12_10_020753_create_peers_table.php @@ -17,10 +17,8 @@ class CreatePeersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('peers', function (Blueprint $table) { $table->bigInteger('id', true)->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_permissions_table.php b/database/migrations/2017_12_10_020753_create_permissions_table.php index 6656b18465..996bd56e0a 100644 --- a/database/migrations/2017_12_10_020753_create_permissions_table.php +++ b/database/migrations/2017_12_10_020753_create_permissions_table.php @@ -18,10 +18,8 @@ class CreatePermissionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('permissions', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_personal_freeleech_table.php b/database/migrations/2017_12_10_020753_create_personal_freeleech_table.php index acee2edb95..5a32bfb977 100644 --- a/database/migrations/2017_12_10_020753_create_personal_freeleech_table.php +++ b/database/migrations/2017_12_10_020753_create_personal_freeleech_table.php @@ -18,10 +18,8 @@ class CreatePersonalFreeleechTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('personal_freeleech', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_polls_table.php b/database/migrations/2017_12_10_020753_create_polls_table.php index 7b5222f983..47965b96f0 100644 --- a/database/migrations/2017_12_10_020753_create_polls_table.php +++ b/database/migrations/2017_12_10_020753_create_polls_table.php @@ -18,10 +18,8 @@ class CreatePollsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('polls', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_posts_table.php b/database/migrations/2017_12_10_020753_create_posts_table.php index 735cc2a044..af58aae186 100644 --- a/database/migrations/2017_12_10_020753_create_posts_table.php +++ b/database/migrations/2017_12_10_020753_create_posts_table.php @@ -18,10 +18,8 @@ class CreatePostsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('posts', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_private_messages_table.php b/database/migrations/2017_12_10_020753_create_private_messages_table.php index 148e6f8b59..42de7d7f22 100644 --- a/database/migrations/2017_12_10_020753_create_private_messages_table.php +++ b/database/migrations/2017_12_10_020753_create_private_messages_table.php @@ -18,10 +18,8 @@ class CreatePrivateMessagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('private_messages', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_reports_table.php b/database/migrations/2017_12_10_020753_create_reports_table.php index 7c66834486..8ecefc2e97 100644 --- a/database/migrations/2017_12_10_020753_create_reports_table.php +++ b/database/migrations/2017_12_10_020753_create_reports_table.php @@ -18,10 +18,8 @@ class CreateReportsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('reports', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_request_bounty_table.php b/database/migrations/2017_12_10_020753_create_request_bounty_table.php index c5047db388..50821ab963 100644 --- a/database/migrations/2017_12_10_020753_create_request_bounty_table.php +++ b/database/migrations/2017_12_10_020753_create_request_bounty_table.php @@ -17,10 +17,8 @@ class CreateRequestBountyTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('request_bounty', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_request_claims_table.php b/database/migrations/2017_12_10_020753_create_request_claims_table.php index 28564f81d7..92472a370e 100644 --- a/database/migrations/2017_12_10_020753_create_request_claims_table.php +++ b/database/migrations/2017_12_10_020753_create_request_claims_table.php @@ -18,10 +18,8 @@ class CreateRequestClaimsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('request_claims', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_requests_table.php b/database/migrations/2017_12_10_020753_create_requests_table.php index b2e4474332..045a07ffc1 100644 --- a/database/migrations/2017_12_10_020753_create_requests_table.php +++ b/database/migrations/2017_12_10_020753_create_requests_table.php @@ -17,10 +17,8 @@ class CreateRequestsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('requests', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_rss_table.php b/database/migrations/2017_12_10_020753_create_rss_table.php index 9716975510..088744f1e4 100644 --- a/database/migrations/2017_12_10_020753_create_rss_table.php +++ b/database/migrations/2017_12_10_020753_create_rss_table.php @@ -17,10 +17,8 @@ class CreateRssTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('rss', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_sessions_table.php b/database/migrations/2017_12_10_020753_create_sessions_table.php index 541e0841ff..5f3dfd702e 100644 --- a/database/migrations/2017_12_10_020753_create_sessions_table.php +++ b/database/migrations/2017_12_10_020753_create_sessions_table.php @@ -18,10 +18,8 @@ class CreateSessionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('sessions', function (Blueprint $table) { $table->string('id')->unique(); diff --git a/database/migrations/2017_12_10_020753_create_shoutbox_table.php b/database/migrations/2017_12_10_020753_create_shoutbox_table.php index a896cb8647..1c543cd77b 100644 --- a/database/migrations/2017_12_10_020753_create_shoutbox_table.php +++ b/database/migrations/2017_12_10_020753_create_shoutbox_table.php @@ -18,10 +18,8 @@ class CreateShoutboxTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('shoutbox', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_tag_torrent_table.php b/database/migrations/2017_12_10_020753_create_tag_torrent_table.php index f84e082a4d..812e8e8c2a 100644 --- a/database/migrations/2017_12_10_020753_create_tag_torrent_table.php +++ b/database/migrations/2017_12_10_020753_create_tag_torrent_table.php @@ -18,10 +18,8 @@ class CreateTagTorrentTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('tag_torrent', function (Blueprint $table) { $table->bigInteger('torrent_id')->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_tags_table.php b/database/migrations/2017_12_10_020753_create_tags_table.php index 583624b675..d847312c98 100644 --- a/database/migrations/2017_12_10_020753_create_tags_table.php +++ b/database/migrations/2017_12_10_020753_create_tags_table.php @@ -18,10 +18,8 @@ class CreateTagsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('tags', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_thanks_table.php b/database/migrations/2017_12_10_020753_create_thanks_table.php index d5c0a6fa71..4ef9422cdf 100644 --- a/database/migrations/2017_12_10_020753_create_thanks_table.php +++ b/database/migrations/2017_12_10_020753_create_thanks_table.php @@ -18,10 +18,8 @@ class CreateThanksTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('thanks', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_topics_table.php b/database/migrations/2017_12_10_020753_create_topics_table.php index d033400b2d..9acdf7a088 100644 --- a/database/migrations/2017_12_10_020753_create_topics_table.php +++ b/database/migrations/2017_12_10_020753_create_topics_table.php @@ -18,10 +18,8 @@ class CreateTopicsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('topics', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_torrents_table.php b/database/migrations/2017_12_10_020753_create_torrents_table.php index df057ebd59..ff04203c23 100644 --- a/database/migrations/2017_12_10_020753_create_torrents_table.php +++ b/database/migrations/2017_12_10_020753_create_torrents_table.php @@ -18,10 +18,8 @@ class CreateTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('torrents', function (Blueprint $table) { $table->bigInteger('id', true)->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_types_table.php b/database/migrations/2017_12_10_020753_create_types_table.php index e759e4390d..45cffdd3b0 100644 --- a/database/migrations/2017_12_10_020753_create_types_table.php +++ b/database/migrations/2017_12_10_020753_create_types_table.php @@ -18,10 +18,8 @@ class CreateTypesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('types', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_user_activations_table.php b/database/migrations/2017_12_10_020753_create_user_activations_table.php index b742f7630a..5a7cb836c2 100644 --- a/database/migrations/2017_12_10_020753_create_user_activations_table.php +++ b/database/migrations/2017_12_10_020753_create_user_activations_table.php @@ -18,10 +18,8 @@ class CreateUserActivationsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_activations', function (Blueprint $table) { $table->bigInteger('id', true)->unsigned(); diff --git a/database/migrations/2017_12_10_020753_create_user_notes_table.php b/database/migrations/2017_12_10_020753_create_user_notes_table.php index 3c7b577df4..c5eb257333 100644 --- a/database/migrations/2017_12_10_020753_create_user_notes_table.php +++ b/database/migrations/2017_12_10_020753_create_user_notes_table.php @@ -18,10 +18,8 @@ class CreateUserNotesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_notes', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_users_table.php b/database/migrations/2017_12_10_020753_create_users_table.php index 187e260049..03d1a6f5c1 100644 --- a/database/migrations/2017_12_10_020753_create_users_table.php +++ b/database/migrations/2017_12_10_020753_create_users_table.php @@ -18,10 +18,8 @@ class CreateUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('users', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2017_12_10_020753_create_voters_table.php b/database/migrations/2017_12_10_020753_create_voters_table.php index a5b1d8da42..80ff27f243 100644 --- a/database/migrations/2017_12_10_020753_create_voters_table.php +++ b/database/migrations/2017_12_10_020753_create_voters_table.php @@ -18,10 +18,8 @@ class CreateVotersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('voters', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020753_create_warnings_table.php b/database/migrations/2017_12_10_020753_create_warnings_table.php index 472e1d4a17..0cee6016b1 100644 --- a/database/migrations/2017_12_10_020753_create_warnings_table.php +++ b/database/migrations/2017_12_10_020753_create_warnings_table.php @@ -17,10 +17,8 @@ class CreateWarningsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('warnings', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_articles_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_articles_table.php index 98b5f9293d..ab902b0330 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_articles_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_articles_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToArticlesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('articles', function (Blueprint $table) { $table->foreign('user_id', 'fk_articles_users1')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('RESTRICT'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_ban_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_ban_table.php index 8672cf88b9..b3928af58c 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_ban_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_ban_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToBanTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('ban', function (Blueprint $table) { $table->foreign('owned_by', 'foreign_ban_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_clients_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_clients_table.php index 3f21dfbeda..ebad17c85e 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_clients_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_clients_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToClientsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('clients', function (Blueprint $table) { $table->foreign('user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_comments_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_comments_table.php index 835884a558..c48ee43f85 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_comments_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_comments_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToCommentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('comments', function (Blueprint $table) { $table->foreign('article_id', 'fk_comments_articles_1')->references('id')->on('articles')->onUpdate('CASCADE')->onDelete('RESTRICT'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_history_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_history_table.php index b31b61a37f..46d3222a83 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_history_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_history_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToHistoryTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('history', function (Blueprint $table) { $table->foreign('info_hash')->references('info_hash')->on('torrents')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_peers_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_peers_table.php index fea9eff0e5..f2ea2d6059 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_peers_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_peers_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToPeersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('peers', function (Blueprint $table) { $table->foreign('torrent_id', 'fk_peers_torrents1')->references('id')->on('torrents')->onUpdate('RESTRICT')->onDelete('RESTRICT'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_reports_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_reports_table.php index 21d496e8d0..caf517f248 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_reports_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_reports_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToReportsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('reports', function (Blueprint $table) { $table->foreign('reporter_id', 'foreign_reporting_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_rss_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_rss_table.php index ecb90aa95d..1ae3bebfbd 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_rss_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_rss_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToRssTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('rss', function (Blueprint $table) { $table->foreign('userID', 'rss_user_id')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('RESTRICT'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_torrents_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_torrents_table.php index 5094f313fe..c70a96b965 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_torrents_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_torrents_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->foreign('category_id', 'category_id')->references('id')->on('categories')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_voters_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_voters_table.php index b1127d8072..90d6fa0ec1 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_voters_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_voters_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToVotersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('voters', function (Blueprint $table) { $table->foreign('poll_id')->references('id')->on('polls')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_10_020754_add_foreign_keys_to_warnings_table.php b/database/migrations/2017_12_10_020754_add_foreign_keys_to_warnings_table.php index c7dc2df443..83e86a962a 100644 --- a/database/migrations/2017_12_10_020754_add_foreign_keys_to_warnings_table.php +++ b/database/migrations/2017_12_10_020754_add_foreign_keys_to_warnings_table.php @@ -18,10 +18,8 @@ class AddForeignKeysToWarningsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('warnings', function (Blueprint $table) { $table->foreign('torrent')->references('id')->on('torrents')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2017_12_21_123452_add_custom_css_to_users_table.php b/database/migrations/2017_12_21_123452_add_custom_css_to_users_table.php index b497b21a90..b0faaea51a 100644 --- a/database/migrations/2017_12_21_123452_add_custom_css_to_users_table.php +++ b/database/migrations/2017_12_21_123452_add_custom_css_to_users_table.php @@ -19,10 +19,8 @@ class AddCustomCssToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->string('custom_css')->after('nav')->nullable(); diff --git a/database/migrations/2017_12_27_000000_add_locale_column.php b/database/migrations/2017_12_27_000000_add_locale_column.php index 92c7d4644c..14effaa0aa 100644 --- a/database/migrations/2017_12_27_000000_add_locale_column.php +++ b/database/migrations/2017_12_27_000000_add_locale_column.php @@ -18,10 +18,8 @@ class AddLocaleColumn extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function ($table) { $table->string('locale')->default(config('app.locale')); diff --git a/database/migrations/2018_01_23_095412_add_implemented_to_topics_table.php b/database/migrations/2018_01_23_095412_add_implemented_to_topics_table.php index b7a9891138..65a917b613 100644 --- a/database/migrations/2018_01_23_095412_add_implemented_to_topics_table.php +++ b/database/migrations/2018_01_23_095412_add_implemented_to_topics_table.php @@ -19,10 +19,8 @@ class AddImplementedToTopicsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('topics', function (Blueprint $table) { $table->boolean('implemented')->default(0)->after('suggestion'); diff --git a/database/migrations/2018_01_25_000000_add_twostep_to_users_table.php b/database/migrations/2018_01_25_000000_add_twostep_to_users_table.php index bf370df715..a3963c178a 100644 --- a/database/migrations/2018_01_25_000000_add_twostep_to_users_table.php +++ b/database/migrations/2018_01_25_000000_add_twostep_to_users_table.php @@ -19,10 +19,8 @@ class AddTwoStepToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('twostep')->default(0)->after('stat_hidden'); diff --git a/database/migrations/2018_02_06_142024_add_last_reply_at_to_topics_table.php b/database/migrations/2018_02_06_142024_add_last_reply_at_to_topics_table.php index 6272a15dd0..c8b90dd0ea 100644 --- a/database/migrations/2018_02_06_142024_add_last_reply_at_to_topics_table.php +++ b/database/migrations/2018_02_06_142024_add_last_reply_at_to_topics_table.php @@ -19,10 +19,8 @@ class AddLastReplyAtToTopicsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('topics', function (Blueprint $table) { $table->timestamp('last_reply_at')->nullable()->after('last_post_user_username'); diff --git a/database/migrations/2018_02_14_000000_add_is_internal_to_groups_table.php b/database/migrations/2018_02_14_000000_add_is_internal_to_groups_table.php index 9376bd24ba..b9f3449fab 100644 --- a/database/migrations/2018_02_14_000000_add_is_internal_to_groups_table.php +++ b/database/migrations/2018_02_14_000000_add_is_internal_to_groups_table.php @@ -19,10 +19,8 @@ class AddIsInternalToGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->boolean('is_internal')->after('effect')->default(0); diff --git a/database/migrations/2018_03_13_000000_add_position_to_categories_table.php b/database/migrations/2018_03_13_000000_add_position_to_categories_table.php index 9034bf2233..d723df5162 100644 --- a/database/migrations/2018_03_13_000000_add_position_to_categories_table.php +++ b/database/migrations/2018_03_13_000000_add_position_to_categories_table.php @@ -19,10 +19,8 @@ class AddPositionToCategoriesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('categories', function (Blueprint $table) { $table->integer('position')->after('slug'); diff --git a/database/migrations/2018_03_21_000000_add_censor_to_users_table.php b/database/migrations/2018_03_21_000000_add_censor_to_users_table.php index 1d2261009b..b5ad2cc454 100644 --- a/database/migrations/2018_03_21_000000_add_censor_to_users_table.php +++ b/database/migrations/2018_03_21_000000_add_censor_to_users_table.php @@ -19,10 +19,8 @@ class AddCensorToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('censor')->default(0)->after('rsskey'); diff --git a/database/migrations/2018_03_27_000000_add_chat_hidden_to_users_table.php b/database/migrations/2018_03_27_000000_add_chat_hidden_to_users_table.php index 4dc0270e06..ff61c9ab59 100644 --- a/database/migrations/2018_03_27_000000_add_chat_hidden_to_users_table.php +++ b/database/migrations/2018_03_27_000000_add_chat_hidden_to_users_table.php @@ -19,10 +19,8 @@ class AddChatHiddenToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('chat_hidden')->default(0)->after('censor'); diff --git a/database/migrations/2018_04_19_221542_create_failed_jobs_table.php b/database/migrations/2018_04_19_221542_create_failed_jobs_table.php index 96d5d85c0d..c53656b95f 100644 --- a/database/migrations/2018_04_19_221542_create_failed_jobs_table.php +++ b/database/migrations/2018_04_19_221542_create_failed_jobs_table.php @@ -19,10 +19,8 @@ class CreateFailedJobsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2018_04_21_181026_create_wishes_table.php b/database/migrations/2018_04_21_181026_create_wishes_table.php index eceed72cde..57c411feaa 100644 --- a/database/migrations/2018_04_21_181026_create_wishes_table.php +++ b/database/migrations/2018_04_21_181026_create_wishes_table.php @@ -18,10 +18,8 @@ class CreateWishesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('wishes', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_04_22_195516_alter_reports_table.php b/database/migrations/2018_04_22_195516_alter_reports_table.php index f544d35476..ab176b57ac 100644 --- a/database/migrations/2018_04_22_195516_alter_reports_table.php +++ b/database/migrations/2018_04_22_195516_alter_reports_table.php @@ -19,10 +19,8 @@ class AlterReportsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('reports', function (Blueprint $table) { // new columns diff --git a/database/migrations/2018_04_28_021651_alter_shoutbox_table.php b/database/migrations/2018_04_28_021651_alter_shoutbox_table.php index 8cd1648148..518b308979 100644 --- a/database/migrations/2018_04_28_021651_alter_shoutbox_table.php +++ b/database/migrations/2018_04_28_021651_alter_shoutbox_table.php @@ -19,10 +19,8 @@ class AlterShoutboxTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('shoutbox'); diff --git a/database/migrations/2018_04_28_022305_create_chatrooms_table.php b/database/migrations/2018_04_28_022305_create_chatrooms_table.php index bcc195d197..8d645b8897 100644 --- a/database/migrations/2018_04_28_022305_create_chatrooms_table.php +++ b/database/migrations/2018_04_28_022305_create_chatrooms_table.php @@ -19,10 +19,8 @@ class CreateChatroomsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('chatrooms', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_04_28_022344_add_chatroom_id_to_users_table.php b/database/migrations/2018_04_28_022344_add_chatroom_id_to_users_table.php index 5ba256fb77..4f48f1d3cf 100644 --- a/database/migrations/2018_04_28_022344_add_chatroom_id_to_users_table.php +++ b/database/migrations/2018_04_28_022344_add_chatroom_id_to_users_table.php @@ -19,10 +19,8 @@ class AddChatroomIdToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->integer('chatroom_id')->unsigned()->default(1)->after('rsskey'); diff --git a/database/migrations/2018_05_04_101711_create_chat_statuses_table.php b/database/migrations/2018_05_04_101711_create_chat_statuses_table.php index 1b4fa0b3dd..7e325b651d 100644 --- a/database/migrations/2018_05_04_101711_create_chat_statuses_table.php +++ b/database/migrations/2018_05_04_101711_create_chat_statuses_table.php @@ -19,10 +19,8 @@ class CreateChatStatusesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('chat_statuses', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_05_04_102055_add_chat_status_id_to_users_table.php b/database/migrations/2018_05_04_102055_add_chat_status_id_to_users_table.php index 4e3230652d..22569116be 100644 --- a/database/migrations/2018_05_04_102055_add_chat_status_id_to_users_table.php +++ b/database/migrations/2018_05_04_102055_add_chat_status_id_to_users_table.php @@ -19,10 +19,8 @@ class AddChatStatusIdToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->integer('chat_status_id')->unsigned()->default(1); diff --git a/database/migrations/2018_05_07_183534_add_can_upload_to_groups_table.php b/database/migrations/2018_05_07_183534_add_can_upload_to_groups_table.php index 586db587df..0a067f464c 100644 --- a/database/migrations/2018_05_07_183534_add_can_upload_to_groups_table.php +++ b/database/migrations/2018_05_07_183534_add_can_upload_to_groups_table.php @@ -19,10 +19,8 @@ class AddCanUploadToGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->boolean('can_upload')->after('is_freeleech')->default(1); diff --git a/database/migrations/2018_05_15_223339_add_receiver_id_column_to_messages_table.php b/database/migrations/2018_05_15_223339_add_receiver_id_column_to_messages_table.php index 488fcf7ebf..d14bcdcfae 100644 --- a/database/migrations/2018_05_15_223339_add_receiver_id_column_to_messages_table.php +++ b/database/migrations/2018_05_15_223339_add_receiver_id_column_to_messages_table.php @@ -19,10 +19,8 @@ class AddReceiverIdColumnToMessagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('messages', function (Blueprint $table) { $table->integer('receiver_id')->after('chatroom_id')->unsigned()->nullable(); diff --git a/database/migrations/2018_05_18_144651_rename_ban_table.php b/database/migrations/2018_05_18_144651_rename_ban_table.php index 1cc49064b3..4e95f72a8f 100644 --- a/database/migrations/2018_05_18_144651_rename_ban_table.php +++ b/database/migrations/2018_05_18_144651_rename_ban_table.php @@ -18,10 +18,8 @@ class RenameBanTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::rename('ban', 'bans'); } diff --git a/database/migrations/2018_05_21_022459_add_torrent_layout_to_users_table.php b/database/migrations/2018_05_21_022459_add_torrent_layout_to_users_table.php index 4a6c308384..7fb7ed3350 100644 --- a/database/migrations/2018_05_21_022459_add_torrent_layout_to_users_table.php +++ b/database/migrations/2018_05_21_022459_add_torrent_layout_to_users_table.php @@ -19,10 +19,8 @@ class AddTorrentLayoutToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('torrent_layout')->default(0)->after('nav'); diff --git a/database/migrations/2018_05_21_192858_alter_peers_table.php b/database/migrations/2018_05_21_192858_alter_peers_table.php index 81f1daa6aa..2e36b7b4a1 100644 --- a/database/migrations/2018_05_21_192858_alter_peers_table.php +++ b/database/migrations/2018_05_21_192858_alter_peers_table.php @@ -18,10 +18,8 @@ class AlterPeersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('peers', function ($table) { $table->renameColumn('hash', 'info_hash'); diff --git a/database/migrations/2018_05_22_224911_alter_private_messages_table.php b/database/migrations/2018_05_22_224911_alter_private_messages_table.php index 19d376a315..474d737c7d 100644 --- a/database/migrations/2018_05_22_224911_alter_private_messages_table.php +++ b/database/migrations/2018_05_22_224911_alter_private_messages_table.php @@ -18,10 +18,8 @@ class AlterPrivateMessagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('private_messages', function ($table) { $table->renameColumn('reciever_id', 'receiver_id'); diff --git a/database/migrations/2018_05_31_120936_create_albums_table.php b/database/migrations/2018_05_31_120936_create_albums_table.php index e450a054ce..0c68e6bf31 100644 --- a/database/migrations/2018_05_31_120936_create_albums_table.php +++ b/database/migrations/2018_05_31_120936_create_albums_table.php @@ -17,7 +17,7 @@ class CreateAlbumsTable extends Migration { - public function up() + public function up(): void { Schema::create('albums', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_05_31_120955_create_images_table.php b/database/migrations/2018_05_31_120955_create_images_table.php index cfe206f8f7..75862e80ac 100644 --- a/database/migrations/2018_05_31_120955_create_images_table.php +++ b/database/migrations/2018_05_31_120955_create_images_table.php @@ -17,7 +17,7 @@ class CreateImagesTable extends Migration { - public function up() + public function up(): void { Schema::create('images', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_06_11_110000_create_topic_subscriptions_table.php b/database/migrations/2018_06_11_110000_create_topic_subscriptions_table.php index dd9d76a476..3ff05b657c 100644 --- a/database/migrations/2018_06_11_110000_create_topic_subscriptions_table.php +++ b/database/migrations/2018_06_11_110000_create_topic_subscriptions_table.php @@ -19,10 +19,8 @@ class CreateTopicSubscriptionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('topic_subscriptions', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_07_12_114125_add_soft_deletes_to_warnings.php b/database/migrations/2018_07_12_114125_add_soft_deletes_to_warnings.php index b6facfef48..55cbac54e9 100644 --- a/database/migrations/2018_07_12_114125_add_soft_deletes_to_warnings.php +++ b/database/migrations/2018_07_12_114125_add_soft_deletes_to_warnings.php @@ -19,10 +19,8 @@ class AddSoftDeletesToWarnings extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('warnings', function (Blueprint $table) { $table->integer('deleted_by')->after('active')->nullable(); diff --git a/database/migrations/2018_08_19_212319_create_git_updates_table.php b/database/migrations/2018_08_19_212319_create_git_updates_table.php index 677148514b..afd42fa94a 100644 --- a/database/migrations/2018_08_19_212319_create_git_updates_table.php +++ b/database/migrations/2018_08_19_212319_create_git_updates_table.php @@ -19,10 +19,8 @@ class CreateGitUpdatesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('git_updates', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_09_08_153849_add_soft_deletes_to_user_table.php b/database/migrations/2018_09_08_153849_add_soft_deletes_to_user_table.php index 5d1b52fb72..915a1073b6 100644 --- a/database/migrations/2018_09_08_153849_add_soft_deletes_to_user_table.php +++ b/database/migrations/2018_09_08_153849_add_soft_deletes_to_user_table.php @@ -19,10 +19,8 @@ class AddSoftDeletesToUserTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->dateTime('disabled_at')->after('last_login')->nullable(); diff --git a/database/migrations/2018_09_24_205852_add_internal_to_torrents_table.php b/database/migrations/2018_09_24_205852_add_internal_to_torrents_table.php index 71aaa92e51..2e1aeffccf 100644 --- a/database/migrations/2018_09_24_205852_add_internal_to_torrents_table.php +++ b/database/migrations/2018_09_24_205852_add_internal_to_torrents_table.php @@ -19,10 +19,8 @@ class AddInternalToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->boolean('internal')->default(0)->after('sd'); diff --git a/database/migrations/2018_09_29_163937_add_anon_to_requests_table.php b/database/migrations/2018_09_29_163937_add_anon_to_requests_table.php index 79ebb60ddd..a725af6f1f 100644 --- a/database/migrations/2018_09_29_163937_add_anon_to_requests_table.php +++ b/database/migrations/2018_09_29_163937_add_anon_to_requests_table.php @@ -19,10 +19,8 @@ class AddAnonToRequestsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('requests', function (Blueprint $table) { $table->boolean('anon')->default(0)->after('claimed'); diff --git a/database/migrations/2018_09_29_164525_add_anon_to_request_bounty_table.php b/database/migrations/2018_09_29_164525_add_anon_to_request_bounty_table.php index 843c15f441..1aac1d9992 100644 --- a/database/migrations/2018_09_29_164525_add_anon_to_request_bounty_table.php +++ b/database/migrations/2018_09_29_164525_add_anon_to_request_bounty_table.php @@ -19,10 +19,8 @@ class AddAnonToRequestBountyTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('request_bounty', function (Blueprint $table) { $table->boolean('anon')->default(0)->after('requests_id'); diff --git a/database/migrations/2018_11_09_010002_add_immune_to_history_table.php b/database/migrations/2018_11_09_010002_add_immune_to_history_table.php index 446c36a146..f4b3b54eca 100644 --- a/database/migrations/2018_11_09_010002_add_immune_to_history_table.php +++ b/database/migrations/2018_11_09_010002_add_immune_to_history_table.php @@ -19,10 +19,8 @@ class AddImmuneToHistoryTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('history', function (Blueprint $table) { $table->boolean('immune')->default(0)->index()->after('seedtime'); diff --git a/database/migrations/2018_12_03_024251_create_applications_table.php b/database/migrations/2018_12_03_024251_create_applications_table.php index c14a1bb074..6c671adb59 100644 --- a/database/migrations/2018_12_03_024251_create_applications_table.php +++ b/database/migrations/2018_12_03_024251_create_applications_table.php @@ -19,10 +19,8 @@ class CreateApplicationsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('applications', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_12_03_032701_create_application_image_proofs_table.php b/database/migrations/2018_12_03_032701_create_application_image_proofs_table.php index 2a92c505a0..573394811b 100644 --- a/database/migrations/2018_12_03_032701_create_application_image_proofs_table.php +++ b/database/migrations/2018_12_03_032701_create_application_image_proofs_table.php @@ -19,10 +19,8 @@ class CreateApplicationImageProofsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('application_image_proofs', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_12_03_032712_create_application_url_proofs_table.php b/database/migrations/2018_12_03_032712_create_application_url_proofs_table.php index 7c14a6c5fe..0a59c566bd 100644 --- a/database/migrations/2018_12_03_032712_create_application_url_proofs_table.php +++ b/database/migrations/2018_12_03_032712_create_application_url_proofs_table.php @@ -19,10 +19,8 @@ class CreateApplicationUrlProofsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('application_url_proofs', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_12_06_012908_update_tag_torrent_table.php b/database/migrations/2018_12_06_012908_update_tag_torrent_table.php index 1729e119b8..75c2490eef 100644 --- a/database/migrations/2018_12_06_012908_update_tag_torrent_table.php +++ b/database/migrations/2018_12_06_012908_update_tag_torrent_table.php @@ -19,10 +19,8 @@ class UpdateTagTorrentTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('tag_torrent'); diff --git a/database/migrations/2018_1_10_020753_create_freeleech_tokens_table.php b/database/migrations/2018_1_10_020753_create_freeleech_tokens_table.php index 518e30fed9..0cf3c7ef1d 100644 --- a/database/migrations/2018_1_10_020753_create_freeleech_tokens_table.php +++ b/database/migrations/2018_1_10_020753_create_freeleech_tokens_table.php @@ -18,10 +18,8 @@ class CreateFreeleechTokensTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('freeleech_tokens', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2018_1_20_070937_create_two_step_auth_table.php b/database/migrations/2018_1_20_070937_create_two_step_auth_table.php index 4889e165e1..e4452b960e 100644 --- a/database/migrations/2018_1_20_070937_create_two_step_auth_table.php +++ b/database/migrations/2018_1_20_070937_create_two_step_auth_table.php @@ -18,10 +18,8 @@ class CreateTwoStepAuthTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('twostep_auth', function (Blueprint $table) { $table->increments('id'); diff --git a/database/migrations/2019_01_09_151754_alter_categories_table.php b/database/migrations/2019_01_09_151754_alter_categories_table.php index 9d20bc3c72..a6e8798ef8 100644 --- a/database/migrations/2019_01_09_151754_alter_categories_table.php +++ b/database/migrations/2019_01_09_151754_alter_categories_table.php @@ -19,10 +19,8 @@ class AlterCategoriesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('categories', function (Blueprint $table) { $table->string('image')->nullable()->after('slug'); diff --git a/database/migrations/2019_01_09_175336_add_incognito_to_groups_table.php b/database/migrations/2019_01_09_175336_add_incognito_to_groups_table.php index 0ff1d9f684..c63a941921 100644 --- a/database/migrations/2019_01_09_175336_add_incognito_to_groups_table.php +++ b/database/migrations/2019_01_09_175336_add_incognito_to_groups_table.php @@ -19,10 +19,8 @@ class AddIncognitoToGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->boolean('is_incognito')->default(0)->after('can_upload'); diff --git a/database/migrations/2019_01_10_102512_add_request_id_to_reports_table.php b/database/migrations/2019_01_10_102512_add_request_id_to_reports_table.php index 272f4afe37..d035f543bb 100644 --- a/database/migrations/2019_01_10_102512_add_request_id_to_reports_table.php +++ b/database/migrations/2019_01_10_102512_add_request_id_to_reports_table.php @@ -19,10 +19,8 @@ class AddRequestIdToReportsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('reports', function (Blueprint $table) { $table->integer('request_id')->unsigned()->default(0)->after('torrent_id'); diff --git a/database/migrations/2019_01_11_001150_alter_rss_table.php b/database/migrations/2019_01_11_001150_alter_rss_table.php index 7177341244..6fdb19f33b 100644 --- a/database/migrations/2019_01_11_001150_alter_rss_table.php +++ b/database/migrations/2019_01_11_001150_alter_rss_table.php @@ -19,10 +19,8 @@ class AlterRssTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('rss'); Schema::create('rss', function (Blueprint $table) { diff --git a/database/migrations/2019_01_17_213210_add_torrent_filters_to_users_table.php b/database/migrations/2019_01_17_213210_add_torrent_filters_to_users_table.php index 696c23a800..84504babef 100644 --- a/database/migrations/2019_01_17_213210_add_torrent_filters_to_users_table.php +++ b/database/migrations/2019_01_17_213210_add_torrent_filters_to_users_table.php @@ -19,10 +19,8 @@ class AddTorrentFiltersToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('torrent_filters')->default(0)->index()->after('torrent_layout'); diff --git a/database/migrations/2019_01_23_034500_alter_bon_transactions_table.php b/database/migrations/2019_01_23_034500_alter_bon_transactions_table.php index 88070e1969..4259fe816e 100644 --- a/database/migrations/2019_01_23_034500_alter_bon_transactions_table.php +++ b/database/migrations/2019_01_23_034500_alter_bon_transactions_table.php @@ -19,10 +19,8 @@ class AlterBonTransactionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('bon_transactions', function (Blueprint $table) { $table->integer('post_id')->nullable()->index()->after('torrent_id'); diff --git a/database/migrations/2019_01_24_033802_rename_topic_subscriptions_table.php b/database/migrations/2019_01_24_033802_rename_topic_subscriptions_table.php index e776552dbf..ac421a58b7 100644 --- a/database/migrations/2019_01_24_033802_rename_topic_subscriptions_table.php +++ b/database/migrations/2019_01_24_033802_rename_topic_subscriptions_table.php @@ -19,10 +19,8 @@ class RenameTopicSubscriptionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::rename('topic_subscriptions', 'subscriptions'); Schema::table('subscriptions', function (Blueprint $table) { diff --git a/database/migrations/2019_01_24_190220_alter_torrents_table.php b/database/migrations/2019_01_24_190220_alter_torrents_table.php index e346b0f7ed..60bd55a023 100644 --- a/database/migrations/2019_01_24_190220_alter_torrents_table.php +++ b/database/migrations/2019_01_24_190220_alter_torrents_table.php @@ -19,10 +19,8 @@ class AlterTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->string('igdb')->default(0)->index()->after('mal'); diff --git a/database/migrations/2019_01_27_005216_create_user_privacy_table.php b/database/migrations/2019_01_27_005216_create_user_privacy_table.php index 330bc0b57d..4181c3edcd 100644 --- a/database/migrations/2019_01_27_005216_create_user_privacy_table.php +++ b/database/migrations/2019_01_27_005216_create_user_privacy_table.php @@ -19,10 +19,8 @@ class CreateUserPrivacyTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_privacy', function (Blueprint $table) { $table->integer('id', true)->signed(); diff --git a/database/migrations/2019_01_28_031842_alter_groups_table.php b/database/migrations/2019_01_28_031842_alter_groups_table.php index b7ff0977ad..1becf78e25 100644 --- a/database/migrations/2019_01_28_031842_alter_groups_table.php +++ b/database/migrations/2019_01_28_031842_alter_groups_table.php @@ -19,10 +19,8 @@ class AlterGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->integer('level')->default(0)->after('position'); diff --git a/database/migrations/2019_01_28_225127_create_user_notifications_table.php b/database/migrations/2019_01_28_225127_create_user_notifications_table.php index 69a6dcda08..30a21bf5be 100644 --- a/database/migrations/2019_01_28_225127_create_user_notifications_table.php +++ b/database/migrations/2019_01_28_225127_create_user_notifications_table.php @@ -19,10 +19,8 @@ class CreateUserNotificationsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_notifications', function (Blueprint $table) { $table->integer('id', true)->signed(); diff --git a/database/migrations/2019_01_29_054104_alter_users_tables.php b/database/migrations/2019_01_29_054104_alter_users_tables.php index ac7709df88..6b2beb2c7d 100644 --- a/database/migrations/2019_01_29_054104_alter_users_tables.php +++ b/database/migrations/2019_01_29_054104_alter_users_tables.php @@ -19,10 +19,8 @@ class AlterUsersTables extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('block_notifications')->default(0)->index()->after('private_profile'); diff --git a/database/migrations/2019_02_04_041644_create_user_echoes_table.php b/database/migrations/2019_02_04_041644_create_user_echoes_table.php index 8b1442a759..8b652651a5 100644 --- a/database/migrations/2019_02_04_041644_create_user_echoes_table.php +++ b/database/migrations/2019_02_04_041644_create_user_echoes_table.php @@ -19,10 +19,8 @@ class CreateUserEchoesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_echoes', function (Blueprint $table) { $table->integer('id', true)->signed(); diff --git a/database/migrations/2019_02_05_220444_create_bots_table.php b/database/migrations/2019_02_05_220444_create_bots_table.php index 1ce14e44e8..e2a4c8dfdf 100644 --- a/database/migrations/2019_02_05_220444_create_bots_table.php +++ b/database/migrations/2019_02_05_220444_create_bots_table.php @@ -19,10 +19,8 @@ class CreateBotsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('bots', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2019_02_06_005248_add_bot_id_to_messages_table.php b/database/migrations/2019_02_06_005248_add_bot_id_to_messages_table.php index 4c810e252d..9bd4931b90 100644 --- a/database/migrations/2019_02_06_005248_add_bot_id_to_messages_table.php +++ b/database/migrations/2019_02_06_005248_add_bot_id_to_messages_table.php @@ -19,10 +19,8 @@ class AddBotIdToMessagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('messages', function (Blueprint $table) { $table->integer('bot_id')->after('receiver_id')->unsigned()->nullable(); diff --git a/database/migrations/2019_02_06_075938_create_bot_transactions_table.php b/database/migrations/2019_02_06_075938_create_bot_transactions_table.php index 98e5b6fa35..8967b7379c 100644 --- a/database/migrations/2019_02_06_075938_create_bot_transactions_table.php +++ b/database/migrations/2019_02_06_075938_create_bot_transactions_table.php @@ -19,10 +19,8 @@ class CreateBotTransactionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('bot_transactions', function (Blueprint $table) { $table->integer('id', true); diff --git a/database/migrations/2019_02_07_022409_create_user_audibles_table.php b/database/migrations/2019_02_07_022409_create_user_audibles_table.php index f42fda82e4..9350caad0d 100644 --- a/database/migrations/2019_02_07_022409_create_user_audibles_table.php +++ b/database/migrations/2019_02_07_022409_create_user_audibles_table.php @@ -19,10 +19,8 @@ class CreateUserAudiblesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('user_audibles', function (Blueprint $table) { $table->integer('id', true)->signed(); diff --git a/database/migrations/2019_02_10_010213_fix_chat_related_tables.php b/database/migrations/2019_02_10_010213_fix_chat_related_tables.php index 9dec7791e9..febb97a7c6 100644 --- a/database/migrations/2019_02_10_010213_fix_chat_related_tables.php +++ b/database/migrations/2019_02_10_010213_fix_chat_related_tables.php @@ -19,10 +19,8 @@ class FixChatRelatedTables extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('user_echoes', function (Blueprint $table) { $table->integer('room_id')->change(); diff --git a/database/migrations/2019_02_21_133950_add_is_owner_to_groups_table.php b/database/migrations/2019_02_21_133950_add_is_owner_to_groups_table.php index cca457310c..6ae2e59cac 100644 --- a/database/migrations/2019_02_21_133950_add_is_owner_to_groups_table.php +++ b/database/migrations/2019_02_21_133950_add_is_owner_to_groups_table.php @@ -19,10 +19,8 @@ class AddIsOwnerToGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->boolean('is_owner')->after('is_internal')->default(0); diff --git a/database/migrations/2019_02_21_221047_add_request_to_user_privacy_table.php b/database/migrations/2019_02_21_221047_add_request_to_user_privacy_table.php index 547546b955..28dd14750b 100644 --- a/database/migrations/2019_02_21_221047_add_request_to_user_privacy_table.php +++ b/database/migrations/2019_02_21_221047_add_request_to_user_privacy_table.php @@ -19,10 +19,8 @@ class AddRequestToUserPrivacyTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('user_privacy', function (Blueprint $table) { $table->boolean('show_profile_request_extra')->index()->default(1)->after('show_profile_forum_extra'); diff --git a/database/migrations/2019_03_20_214306_alter_users_table.php b/database/migrations/2019_03_20_214306_alter_users_table.php index a6552e8ed9..5bb36238d1 100644 --- a/database/migrations/2019_03_20_214306_alter_users_table.php +++ b/database/migrations/2019_03_20_214306_alter_users_table.php @@ -19,10 +19,8 @@ class AlterUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->boolean('read_rules')->default(0)->index()->after('ratings'); diff --git a/database/migrations/2019_06_17_172554_add_last_action_to_users_table.php b/database/migrations/2019_06_17_172554_add_last_action_to_users_table.php index 0a84f15955..876d44a077 100644 --- a/database/migrations/2019_06_17_172554_add_last_action_to_users_table.php +++ b/database/migrations/2019_06_17_172554_add_last_action_to_users_table.php @@ -19,10 +19,8 @@ class AddLastActionToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->dateTime('last_action')->after('last_login')->nullable(); diff --git a/database/migrations/2019_07_09_225645_add_release_year_to_torrents_table.php b/database/migrations/2019_07_09_225645_add_release_year_to_torrents_table.php index a977e6c6de..49b4a709d0 100644 --- a/database/migrations/2019_07_09_225645_add_release_year_to_torrents_table.php +++ b/database/migrations/2019_07_09_225645_add_release_year_to_torrents_table.php @@ -19,10 +19,8 @@ class AddReleaseYearToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->year('release_year')->nullable()->index(); diff --git a/database/migrations/2019_07_30_210848_create_tv_table.php b/database/migrations/2019_07_30_210848_create_tv_table.php index ef4dd5b05f..f8e301ebdc 100644 --- a/database/migrations/2019_07_30_210848_create_tv_table.php +++ b/database/migrations/2019_07_30_210848_create_tv_table.php @@ -8,10 +8,8 @@ class CreateTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('tv', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210849_create_seasons_table.php b/database/migrations/2019_07_30_210849_create_seasons_table.php index 8b6b826a21..bf20fb2d1d 100644 --- a/database/migrations/2019_07_30_210849_create_seasons_table.php +++ b/database/migrations/2019_07_30_210849_create_seasons_table.php @@ -8,10 +8,8 @@ class CreateSeasonsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('seasons', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_cast_table.php b/database/migrations/2019_07_30_210850_create_cast_table.php index d08b0a0f80..5d506cc7a9 100644 --- a/database/migrations/2019_07_30_210850_create_cast_table.php +++ b/database/migrations/2019_07_30_210850_create_cast_table.php @@ -8,10 +8,8 @@ class CreateCastTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('cast', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_collection_table.php b/database/migrations/2019_07_30_210850_create_collection_table.php index 028f88d425..447e54605c 100644 --- a/database/migrations/2019_07_30_210850_create_collection_table.php +++ b/database/migrations/2019_07_30_210850_create_collection_table.php @@ -8,10 +8,8 @@ class CreateCollectionTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('collection', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_companies_table.php b/database/migrations/2019_07_30_210850_create_companies_table.php index f4d583f6ac..ec8a93e316 100644 --- a/database/migrations/2019_07_30_210850_create_companies_table.php +++ b/database/migrations/2019_07_30_210850_create_companies_table.php @@ -8,10 +8,8 @@ class CreateCompaniesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('companies', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_episodes_table.php b/database/migrations/2019_07_30_210850_create_episodes_table.php index 11ff2a7ef6..9a951f818d 100644 --- a/database/migrations/2019_07_30_210850_create_episodes_table.php +++ b/database/migrations/2019_07_30_210850_create_episodes_table.php @@ -8,10 +8,8 @@ class CreateEpisodesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('episodes', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_genres_table.php b/database/migrations/2019_07_30_210850_create_genres_table.php index e07d9354a7..c1021ffc9f 100644 --- a/database/migrations/2019_07_30_210850_create_genres_table.php +++ b/database/migrations/2019_07_30_210850_create_genres_table.php @@ -8,10 +8,8 @@ class CreateGenresTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('genres', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_movie_table.php b/database/migrations/2019_07_30_210850_create_movie_table.php index ee694577d2..82b52c9b79 100644 --- a/database/migrations/2019_07_30_210850_create_movie_table.php +++ b/database/migrations/2019_07_30_210850_create_movie_table.php @@ -8,10 +8,8 @@ class CreateMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('movie', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_networks_table.php b/database/migrations/2019_07_30_210850_create_networks_table.php index 51b7f5efa4..0bf3b2e91d 100644 --- a/database/migrations/2019_07_30_210850_create_networks_table.php +++ b/database/migrations/2019_07_30_210850_create_networks_table.php @@ -8,10 +8,8 @@ class CreateNetworksTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('networks', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_30_210850_create_person_table.php b/database/migrations/2019_07_30_210850_create_person_table.php index eb40deaf32..38d2868327 100644 --- a/database/migrations/2019_07_30_210850_create_person_table.php +++ b/database/migrations/2019_07_30_210850_create_person_table.php @@ -8,10 +8,8 @@ class CreatePersonTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('person', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_07_31_024816_alter_requests_table.php b/database/migrations/2019_07_31_024816_alter_requests_table.php index 6169332caf..49b107a7f4 100644 --- a/database/migrations/2019_07_31_024816_alter_requests_table.php +++ b/database/migrations/2019_07_31_024816_alter_requests_table.php @@ -19,10 +19,8 @@ class AlterRequestsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('requests', function (Blueprint $table) { $table->string('igdb')->default(0)->index()->after('mal'); diff --git a/database/migrations/2019_07_31_210850_create_cast_episode_table.php b/database/migrations/2019_07_31_210850_create_cast_episode_table.php index d0c99b5d2d..5d6ff158c6 100644 --- a/database/migrations/2019_07_31_210850_create_cast_episode_table.php +++ b/database/migrations/2019_07_31_210850_create_cast_episode_table.php @@ -8,10 +8,8 @@ class CreateCastEpisodeTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('cast_episode', function (Blueprint $table) { $table->unsignedInteger('cast_id'); diff --git a/database/migrations/2019_07_31_210850_create_cast_movie_table.php b/database/migrations/2019_07_31_210850_create_cast_movie_table.php index 7c9dc39fc1..fd44979fb8 100644 --- a/database/migrations/2019_07_31_210850_create_cast_movie_table.php +++ b/database/migrations/2019_07_31_210850_create_cast_movie_table.php @@ -8,10 +8,8 @@ class CreateCastMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('cast_movie', function (Blueprint $table) { $table->unsignedInteger('cast_id'); diff --git a/database/migrations/2019_07_31_210850_create_cast_season_table.php b/database/migrations/2019_07_31_210850_create_cast_season_table.php index f1341f4ebc..21090a238e 100644 --- a/database/migrations/2019_07_31_210850_create_cast_season_table.php +++ b/database/migrations/2019_07_31_210850_create_cast_season_table.php @@ -8,10 +8,8 @@ class CreateCastSeasonTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('cast_season', function (Blueprint $table) { $table->unsignedInteger('cast_id'); diff --git a/database/migrations/2019_07_31_210850_create_cast_tv_table.php b/database/migrations/2019_07_31_210850_create_cast_tv_table.php index f881fb6140..ba2789511d 100644 --- a/database/migrations/2019_07_31_210850_create_cast_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_cast_tv_table.php @@ -8,10 +8,8 @@ class CreateCastTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('cast_tv', function (Blueprint $table) { $table->unsignedInteger('cast_id'); diff --git a/database/migrations/2019_07_31_210850_create_company_tv_table.php b/database/migrations/2019_07_31_210850_create_company_tv_table.php index a900d3d57d..8cb9bcdab0 100644 --- a/database/migrations/2019_07_31_210850_create_company_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_company_tv_table.php @@ -8,10 +8,8 @@ class CreateCompanyTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('company_tv', function (Blueprint $table) { $table->unsignedInteger('company_id'); diff --git a/database/migrations/2019_07_31_210850_create_crew_episode_table.php b/database/migrations/2019_07_31_210850_create_crew_episode_table.php index 3f8d639566..dcdd13e7d7 100644 --- a/database/migrations/2019_07_31_210850_create_crew_episode_table.php +++ b/database/migrations/2019_07_31_210850_create_crew_episode_table.php @@ -8,10 +8,8 @@ class CreateCrewEpisodeTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('crew_episode', function (Blueprint $table) { $table->unsignedInteger('episode_id'); diff --git a/database/migrations/2019_07_31_210850_create_crew_movie_table.php b/database/migrations/2019_07_31_210850_create_crew_movie_table.php index 520a0373e5..94c05efa8e 100644 --- a/database/migrations/2019_07_31_210850_create_crew_movie_table.php +++ b/database/migrations/2019_07_31_210850_create_crew_movie_table.php @@ -8,10 +8,8 @@ class CreateCrewMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('crew_movie', function (Blueprint $table) { $table->unsignedInteger('movie_id'); diff --git a/database/migrations/2019_07_31_210850_create_crew_season_table.php b/database/migrations/2019_07_31_210850_create_crew_season_table.php index 6eb566768c..acc2e323b2 100644 --- a/database/migrations/2019_07_31_210850_create_crew_season_table.php +++ b/database/migrations/2019_07_31_210850_create_crew_season_table.php @@ -8,10 +8,8 @@ class CreateCrewSeasonTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('crew_season', function (Blueprint $table) { $table->unsignedInteger('person_id'); diff --git a/database/migrations/2019_07_31_210850_create_crew_tv_table.php b/database/migrations/2019_07_31_210850_create_crew_tv_table.php index 7972ed3f32..de5133475c 100644 --- a/database/migrations/2019_07_31_210850_create_crew_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_crew_tv_table.php @@ -8,10 +8,8 @@ class CreateCrewTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('crew_tv', function (Blueprint $table) { $table->unsignedInteger('person_id'); diff --git a/database/migrations/2019_07_31_210850_create_episode_guest_star_table.php b/database/migrations/2019_07_31_210850_create_episode_guest_star_table.php index 220a0b3924..319ddd3c8a 100644 --- a/database/migrations/2019_07_31_210850_create_episode_guest_star_table.php +++ b/database/migrations/2019_07_31_210850_create_episode_guest_star_table.php @@ -8,10 +8,8 @@ class CreateEpisodeGuestStarTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('episode_guest_star', function (Blueprint $table) { $table->unsignedInteger('episode_id'); diff --git a/database/migrations/2019_07_31_210850_create_episode_person_table.php b/database/migrations/2019_07_31_210850_create_episode_person_table.php index 9b0ed4ebd9..cbb9f2785d 100644 --- a/database/migrations/2019_07_31_210850_create_episode_person_table.php +++ b/database/migrations/2019_07_31_210850_create_episode_person_table.php @@ -8,10 +8,8 @@ class CreateEpisodePersonTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('episode_person', function (Blueprint $table) { $table->unsignedInteger('episode_id'); diff --git a/database/migrations/2019_07_31_210850_create_genre_tv_table.php b/database/migrations/2019_07_31_210850_create_genre_tv_table.php index db0f85a069..bab12a351b 100644 --- a/database/migrations/2019_07_31_210850_create_genre_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_genre_tv_table.php @@ -8,10 +8,8 @@ class CreateGenreTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('genre_tv', function (Blueprint $table) { $table->unsignedInteger('genre_id'); diff --git a/database/migrations/2019_07_31_210850_create_network_tv_table.php b/database/migrations/2019_07_31_210850_create_network_tv_table.php index d27b9b552e..407c81745f 100644 --- a/database/migrations/2019_07_31_210850_create_network_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_network_tv_table.php @@ -8,10 +8,8 @@ class CreateNetworkTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('network_tv', function (Blueprint $table) { $table->unsignedInteger('network_id'); diff --git a/database/migrations/2019_07_31_210850_create_person_movie_table.php b/database/migrations/2019_07_31_210850_create_person_movie_table.php index 01afe952ee..4a8b9a750f 100644 --- a/database/migrations/2019_07_31_210850_create_person_movie_table.php +++ b/database/migrations/2019_07_31_210850_create_person_movie_table.php @@ -8,10 +8,8 @@ class CreatePersonMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('person_movie', function (Blueprint $table) { $table->unsignedInteger('person_id'); diff --git a/database/migrations/2019_07_31_210850_create_person_tv_table.php b/database/migrations/2019_07_31_210850_create_person_tv_table.php index d514000a00..9869bb6210 100644 --- a/database/migrations/2019_07_31_210850_create_person_tv_table.php +++ b/database/migrations/2019_07_31_210850_create_person_tv_table.php @@ -8,10 +8,8 @@ class CreatePersonTvTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('person_tv', function (Blueprint $table) { $table->unsignedInteger('person_id'); diff --git a/database/migrations/2019_07_31_210851_create_collection_movie_table.php b/database/migrations/2019_07_31_210851_create_collection_movie_table.php index 2c3b21ca9d..dbb8e3c2ae 100644 --- a/database/migrations/2019_07_31_210851_create_collection_movie_table.php +++ b/database/migrations/2019_07_31_210851_create_collection_movie_table.php @@ -1,4 +1,3 @@ - unsignedInteger('collection_id'); diff --git a/database/migrations/2019_07_31_210851_create_company_movie_table.php b/database/migrations/2019_07_31_210851_create_company_movie_table.php index f6d4134c68..93dd69353e 100644 --- a/database/migrations/2019_07_31_210851_create_company_movie_table.php +++ b/database/migrations/2019_07_31_210851_create_company_movie_table.php @@ -8,10 +8,8 @@ class CreateCompanyMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('company_movie', function (Blueprint $table) { $table->unsignedInteger('company_id'); diff --git a/database/migrations/2019_07_31_210851_create_genre_movie_table.php b/database/migrations/2019_07_31_210851_create_genre_movie_table.php index 790474fcdb..33f6e61f5c 100644 --- a/database/migrations/2019_07_31_210851_create_genre_movie_table.php +++ b/database/migrations/2019_07_31_210851_create_genre_movie_table.php @@ -8,10 +8,8 @@ class CreateGenreMovieTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('genre_movie', function (Blueprint $table) { $table->unsignedInteger('genre_id'); diff --git a/database/migrations/2019_07_31_210851_create_person_season_table.php b/database/migrations/2019_07_31_210851_create_person_season_table.php index a9539b690f..11344bdbc2 100644 --- a/database/migrations/2019_07_31_210851_create_person_season_table.php +++ b/database/migrations/2019_07_31_210851_create_person_season_table.php @@ -8,10 +8,8 @@ class CreatePersonSeasonTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('person_season', function (Blueprint $table) { $table->unsignedInteger('person_id'); diff --git a/database/migrations/2019_09_22_204439_create_playlists_table.php b/database/migrations/2019_09_22_204439_create_playlists_table.php index 68ba1bc472..a6910b283b 100644 --- a/database/migrations/2019_09_22_204439_create_playlists_table.php +++ b/database/migrations/2019_09_22_204439_create_playlists_table.php @@ -19,10 +19,8 @@ class CreatePlaylistsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('playlists', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_09_22_204613_create_playlist_torrents_table.php b/database/migrations/2019_09_22_204613_create_playlist_torrents_table.php index be925688ab..ab43a3b9be 100644 --- a/database/migrations/2019_09_22_204613_create_playlist_torrents_table.php +++ b/database/migrations/2019_09_22_204613_create_playlist_torrents_table.php @@ -19,10 +19,8 @@ class CreatePlaylistTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('playlist_torrents', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2019_09_24_160123_alter_comments_table.php b/database/migrations/2019_09_24_160123_alter_comments_table.php index 592c664493..c9b2baa196 100644 --- a/database/migrations/2019_09_24_160123_alter_comments_table.php +++ b/database/migrations/2019_09_24_160123_alter_comments_table.php @@ -19,10 +19,8 @@ class AlterCommentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('comments', function (Blueprint $table) { $table->integer('playlist_id')->nullable()->index()->after('requests_id'); diff --git a/database/migrations/2019_11_05_233558_create_audits_table.php b/database/migrations/2019_11_05_233558_create_audits_table.php index b7f153b28e..0d48bac14f 100644 --- a/database/migrations/2019_11_05_233558_create_audits_table.php +++ b/database/migrations/2019_11_05_233558_create_audits_table.php @@ -19,10 +19,8 @@ class CreateAuditsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('log_activities'); diff --git a/database/migrations/2019_11_27_025048_add_api_token_field_users.php b/database/migrations/2019_11_27_025048_add_api_token_field_users.php index 0e63dfccc3..0b120ece61 100644 --- a/database/migrations/2019_11_27_025048_add_api_token_field_users.php +++ b/database/migrations/2019_11_27_025048_add_api_token_field_users.php @@ -19,10 +19,8 @@ class AddApiTokenFieldUsers extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->string('api_token', 100)->after('remember_token') diff --git a/database/migrations/2019_12_17_030908_create_keywords_table.php b/database/migrations/2019_12_17_030908_create_keywords_table.php index d8dfa2b57e..275046e19a 100644 --- a/database/migrations/2019_12_17_030908_create_keywords_table.php +++ b/database/migrations/2019_12_17_030908_create_keywords_table.php @@ -8,10 +8,8 @@ class CreateKeywordsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('keywords', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2020_01_02_203432_bdinfo_to_torrents_table.php b/database/migrations/2020_01_02_203432_bdinfo_to_torrents_table.php index 76886d2984..2ad05ad6d6 100644 --- a/database/migrations/2020_01_02_203432_bdinfo_to_torrents_table.php +++ b/database/migrations/2020_01_02_203432_bdinfo_to_torrents_table.php @@ -8,10 +8,8 @@ class BdinfoToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->longText('bdinfo')->nullable()->after('mediainfo'); diff --git a/database/migrations/2020_02_14_185120_add_foreign_key_to_options_table.php b/database/migrations/2020_02_14_185120_add_foreign_key_to_options_table.php index 6242f7dc47..f66fb32cb8 100644 --- a/database/migrations/2020_02_14_185120_add_foreign_key_to_options_table.php +++ b/database/migrations/2020_02_14_185120_add_foreign_key_to_options_table.php @@ -8,10 +8,8 @@ class AddForeignKeyToOptionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('options', function (Blueprint $table) { $table->foreign('poll_id', 'fk_options_poll')->references('id')->on('polls')->onUpdate('RESTRICT')->onDelete('CASCADE'); diff --git a/database/migrations/2020_02_14_202935_drop_ip_checking_in_polls_table.php b/database/migrations/2020_02_14_202935_drop_ip_checking_in_polls_table.php index 17c8d91699..2748e219a2 100644 --- a/database/migrations/2020_02_14_202935_drop_ip_checking_in_polls_table.php +++ b/database/migrations/2020_02_14_202935_drop_ip_checking_in_polls_table.php @@ -8,10 +8,8 @@ class DropIpCheckingInPollsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('polls', function (Blueprint $table) { $table->dropColumn('ip_checking'); diff --git a/database/migrations/2020_02_14_203001_drop_ip_address_in_voters_table.php b/database/migrations/2020_02_14_203001_drop_ip_address_in_voters_table.php index 05959e572c..3fa5f75933 100644 --- a/database/migrations/2020_02_14_203001_drop_ip_address_in_voters_table.php +++ b/database/migrations/2020_02_14_203001_drop_ip_address_in_voters_table.php @@ -8,10 +8,8 @@ class DropIpAddressInVotersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('voters', function (Blueprint $table) { $table->dropColumn('ip_address'); diff --git a/database/migrations/2020_03_02_031656_update_comments_table.php b/database/migrations/2020_03_02_031656_update_comments_table.php index b0890daf89..e1267bd779 100644 --- a/database/migrations/2020_03_02_031656_update_comments_table.php +++ b/database/migrations/2020_03_02_031656_update_comments_table.php @@ -8,10 +8,8 @@ class UpdateCommentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('comments', function (Blueprint $table) { $table->integer('collection_id')->nullable()->index()->after('requests_id'); diff --git a/database/migrations/2020_03_26_030235_create_subtitles_table.php b/database/migrations/2020_03_26_030235_create_subtitles_table.php index 141fce9cc7..c12f25ad86 100644 --- a/database/migrations/2020_03_26_030235_create_subtitles_table.php +++ b/database/migrations/2020_03_26_030235_create_subtitles_table.php @@ -19,10 +19,8 @@ class CreateSubtitlesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('subtitles', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2020_03_26_034620_create_media_languages_table.php b/database/migrations/2020_03_26_034620_create_media_languages_table.php index 55bb948855..054fd9c92e 100644 --- a/database/migrations/2020_03_26_034620_create_media_languages_table.php +++ b/database/migrations/2020_03_26_034620_create_media_languages_table.php @@ -19,10 +19,8 @@ class CreateMediaLanguagesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('media_languages', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2020_03_31_201107_add_is_double_upload_to_groups_table.php b/database/migrations/2020_03_31_201107_add_is_double_upload_to_groups_table.php index 07e6ed147a..34e48677ae 100644 --- a/database/migrations/2020_03_31_201107_add_is_double_upload_to_groups_table.php +++ b/database/migrations/2020_03_31_201107_add_is_double_upload_to_groups_table.php @@ -8,10 +8,8 @@ class AddIsDoubleUploadToGroupsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->boolean('is_double_upload')->after('is_freeleech')->default(0); diff --git a/database/migrations/2020_05_19_023939_add_type_id_to_torrents_table.php b/database/migrations/2020_05_19_023939_add_type_id_to_torrents_table.php index 1b5a7c6565..2cd4679077 100644 --- a/database/migrations/2020_05_19_023939_add_type_id_to_torrents_table.php +++ b/database/migrations/2020_05_19_023939_add_type_id_to_torrents_table.php @@ -21,10 +21,8 @@ class AddTypeIdToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->integer('type_id')->index(); diff --git a/database/migrations/2020_05_26_053632_add_type_id_to_requests_table.php b/database/migrations/2020_05_26_053632_add_type_id_to_requests_table.php index 3915290f77..3f24392f15 100644 --- a/database/migrations/2020_05_26_053632_add_type_id_to_requests_table.php +++ b/database/migrations/2020_05_26_053632_add_type_id_to_requests_table.php @@ -21,10 +21,8 @@ class AddTypeIdToRequestsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('requests', function (Blueprint $table) { $table->integer('type_id')->index(); diff --git a/database/migrations/2020_06_06_185230_create_resolutions_table.php b/database/migrations/2020_06_06_185230_create_resolutions_table.php index d95be37756..2917c6e02d 100644 --- a/database/migrations/2020_06_06_185230_create_resolutions_table.php +++ b/database/migrations/2020_06_06_185230_create_resolutions_table.php @@ -19,10 +19,8 @@ class CreateResolutionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('resolutions', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2020_06_07_023938_add_resolution_id_to_torrents_table.php b/database/migrations/2020_06_07_023938_add_resolution_id_to_torrents_table.php index 528a74d9e5..53dd3b653b 100644 --- a/database/migrations/2020_06_07_023938_add_resolution_id_to_torrents_table.php +++ b/database/migrations/2020_06_07_023938_add_resolution_id_to_torrents_table.php @@ -21,10 +21,8 @@ class AddResolutionIdToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->integer('resolution_id')->nullable()->index(); diff --git a/database/migrations/2020_06_07_054632_add_resolution_id_to_requests_table.php b/database/migrations/2020_06_07_054632_add_resolution_id_to_requests_table.php index f30e70873a..afd8abf0de 100644 --- a/database/migrations/2020_06_07_054632_add_resolution_id_to_requests_table.php +++ b/database/migrations/2020_06_07_054632_add_resolution_id_to_requests_table.php @@ -19,10 +19,8 @@ class AddResolutionIdToRequestsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('requests', function (Blueprint $table) { $table->integer('resolution_id')->nullable()->index(); diff --git a/database/migrations/2020_06_10_014256_unique_groups.php b/database/migrations/2020_06_10_014256_unique_groups.php index 9b9a311d63..4573c5099e 100644 --- a/database/migrations/2020_06_10_014256_unique_groups.php +++ b/database/migrations/2020_06_10_014256_unique_groups.php @@ -8,10 +8,8 @@ class UniqueGroups extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('groups', function (Blueprint $table) { $table->unique('slug'); diff --git a/database/migrations/2020_06_18_115296_add_bumped_at_to_torrents_table.php b/database/migrations/2020_06_18_115296_add_bumped_at_to_torrents_table.php index 626fad79b2..d0e7f255e4 100644 --- a/database/migrations/2020_06_18_115296_add_bumped_at_to_torrents_table.php +++ b/database/migrations/2020_06_18_115296_add_bumped_at_to_torrents_table.php @@ -8,10 +8,8 @@ class AddBumpedAtToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->dateTime('bumped_at')->nullable()->after('updated_at'); diff --git a/database/migrations/2020_07_07_202935_drop_tags_tables.php b/database/migrations/2020_07_07_202935_drop_tags_tables.php index 83fa08115c..31718e8278 100644 --- a/database/migrations/2020_07_07_202935_drop_tags_tables.php +++ b/database/migrations/2020_07_07_202935_drop_tags_tables.php @@ -7,10 +7,8 @@ class DropTagsTables extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::dropIfExists('tags'); Schema::dropIfExists('tag_torrent'); diff --git a/database/migrations/2020_10_06_143759_add_uuid_to_failed_jobs_table.php b/database/migrations/2020_10_06_143759_add_uuid_to_failed_jobs_table.php index b2eae2e8ed..1a1e092732 100644 --- a/database/migrations/2020_10_06_143759_add_uuid_to_failed_jobs_table.php +++ b/database/migrations/2020_10_06_143759_add_uuid_to_failed_jobs_table.php @@ -8,10 +8,8 @@ class AddUuidToFailedJobsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('failed_jobs', function (Blueprint $table) { $table->string('uuid')->after('id')->nullable()->unique(); diff --git a/database/migrations/2020_10_07_012129_create_job_batches_table.php b/database/migrations/2020_10_07_012129_create_job_batches_table.php index ab4840874b..3aff19f6c6 100644 --- a/database/migrations/2020_10_07_012129_create_job_batches_table.php +++ b/database/migrations/2020_10_07_012129_create_job_batches_table.php @@ -8,10 +8,8 @@ class CreateJobBatchesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('job_batches', function (Blueprint $table) { $table->string('id')->primary(); diff --git a/database/migrations/2020_10_18_235628_create_genre_torrent_table.php b/database/migrations/2020_10_18_235628_create_genre_torrent_table.php index 2de166d428..03d87cece2 100644 --- a/database/migrations/2020_10_18_235628_create_genre_torrent_table.php +++ b/database/migrations/2020_10_18_235628_create_genre_torrent_table.php @@ -8,10 +8,8 @@ class CreateGenreTorrentTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('genre_torrent', function (Blueprint $table) { $table->bigInteger('genre_id')->index(); diff --git a/database/migrations/2020_11_01_165838_update_wishes_table.php b/database/migrations/2020_11_01_165838_update_wishes_table.php index 30b75a5418..1b50d3b454 100644 --- a/database/migrations/2020_11_01_165838_update_wishes_table.php +++ b/database/migrations/2020_11_01_165838_update_wishes_table.php @@ -8,10 +8,8 @@ class UpdateWishesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('wishes', function (Blueprint $table) { $table->renameColumn('imdb', 'tmdb'); diff --git a/database/migrations/2021_01_02_230512_update_users_table.php b/database/migrations/2021_01_02_230512_update_users_table.php index 488b81943d..e7d694e615 100644 --- a/database/migrations/2021_01_02_230512_update_users_table.php +++ b/database/migrations/2021_01_02_230512_update_users_table.php @@ -8,10 +8,8 @@ class UpdateUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->unique('username'); diff --git a/database/migrations/2021_01_06_360572_update_nfo_column_on_torrents_table.php b/database/migrations/2021_01_06_360572_update_nfo_column_on_torrents_table.php index 97f1dabc63..7163ba5cdb 100644 --- a/database/migrations/2021_01_06_360572_update_nfo_column_on_torrents_table.php +++ b/database/migrations/2021_01_06_360572_update_nfo_column_on_torrents_table.php @@ -8,10 +8,8 @@ class UpdateNfoColumnOnTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->binary('nfo')->change(); diff --git a/database/migrations/2021_01_18_191121_create_tickets_table.php b/database/migrations/2021_01_18_191121_create_tickets_table.php index 14389ffa23..c1cdf315ff 100644 --- a/database/migrations/2021_01_18_191121_create_tickets_table.php +++ b/database/migrations/2021_01_18_191121_create_tickets_table.php @@ -8,10 +8,8 @@ class CreateTicketsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('tickets', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_01_18_191321_create_ticket_categories_table.php b/database/migrations/2021_01_18_191321_create_ticket_categories_table.php index b809af8be5..9c6f20946d 100644 --- a/database/migrations/2021_01_18_191321_create_ticket_categories_table.php +++ b/database/migrations/2021_01_18_191321_create_ticket_categories_table.php @@ -8,10 +8,8 @@ class CreateTicketCategoriesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('ticket_categories', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_01_18_191336_create_ticket_priorities_table.php b/database/migrations/2021_01_18_191336_create_ticket_priorities_table.php index 1d20b4208f..c977acc351 100644 --- a/database/migrations/2021_01_18_191336_create_ticket_priorities_table.php +++ b/database/migrations/2021_01_18_191336_create_ticket_priorities_table.php @@ -8,10 +8,8 @@ class CreateTicketPrioritiesTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('ticket_priorities', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_01_18_191357_create_ticket_attachments_table.php b/database/migrations/2021_01_18_191357_create_ticket_attachments_table.php index 6c20dcc678..8fcf972129 100644 --- a/database/migrations/2021_01_18_191357_create_ticket_attachments_table.php +++ b/database/migrations/2021_01_18_191357_create_ticket_attachments_table.php @@ -8,10 +8,8 @@ class CreateTicketAttachmentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('ticket_attachments', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_01_18_191596_add_ticket_id_to_comments_table.php b/database/migrations/2021_01_18_191596_add_ticket_id_to_comments_table.php index 573f6d346d..33155d2434 100644 --- a/database/migrations/2021_01_18_191596_add_ticket_id_to_comments_table.php +++ b/database/migrations/2021_01_18_191596_add_ticket_id_to_comments_table.php @@ -8,10 +8,8 @@ class AddTicketIdToCommentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('comments', function (Blueprint $table) { $table->integer('ticket_id')->nullable()->index()->after('playlist_id'); diff --git a/database/migrations/2021_03_04_042851_create_watchlists_table.php b/database/migrations/2021_03_04_042851_create_watchlists_table.php index 93f095a9fd..c3cff6ac84 100644 --- a/database/migrations/2021_03_04_042851_create_watchlists_table.php +++ b/database/migrations/2021_03_04_042851_create_watchlists_table.php @@ -8,10 +8,8 @@ class CreateWatchlistsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('watchlists', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_03_11_024605_add_personal_release_to_torrents_table.php b/database/migrations/2021_03_11_024605_add_personal_release_to_torrents_table.php index 632ea951a8..50300ca0e9 100644 --- a/database/migrations/2021_03_11_024605_add_personal_release_to_torrents_table.php +++ b/database/migrations/2021_03_11_024605_add_personal_release_to_torrents_table.php @@ -8,10 +8,8 @@ class AddPersonalReleaseToTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->integer('personal_release')->default('0')->index(); diff --git a/database/migrations/2021_03_14_093812_add_read_column_tickets_table.php b/database/migrations/2021_03_14_093812_add_read_column_tickets_table.php index d7c6cbbe75..33f6109dc7 100644 --- a/database/migrations/2021_03_14_093812_add_read_column_tickets_table.php +++ b/database/migrations/2021_03_14_093812_add_read_column_tickets_table.php @@ -8,10 +8,8 @@ class AddReadColumnTicketsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('tickets', function (Blueprint $table) { $table->tinyInteger('user_read')->nullable()->after('staff_id'); diff --git a/database/migrations/2021_04_13_200421_update_about_column_on_users_table.php b/database/migrations/2021_04_13_200421_update_about_column_on_users_table.php index f822009a03..b22916351f 100644 --- a/database/migrations/2021_04_13_200421_update_about_column_on_users_table.php +++ b/database/migrations/2021_04_13_200421_update_about_column_on_users_table.php @@ -8,10 +8,8 @@ class UpdateAboutColumnOnUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->mediumText('about')->nullable()->change(); diff --git a/database/migrations/2021_04_18_085155_add_internals_table.php b/database/migrations/2021_04_18_085155_add_internals_table.php index 6f1cf0ab6d..8b2d54b579 100644 --- a/database/migrations/2021_04_18_085155_add_internals_table.php +++ b/database/migrations/2021_04_18_085155_add_internals_table.php @@ -8,10 +8,8 @@ class AddInternalsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { //Create Table Schema::create('internals', function (Blueprint $table) { @@ -29,10 +27,8 @@ public function up() /** * Reverse the migrations. - * - * @return void */ - public function down() + public function down(): void { //Delete Table Schema::dropIfExists('internals'); diff --git a/database/migrations/2021_05_26_215430_create_recommendations_table.php b/database/migrations/2021_05_26_215430_create_recommendations_table.php index b942acce14..034065065e 100644 --- a/database/migrations/2021_05_26_215430_create_recommendations_table.php +++ b/database/migrations/2021_05_26_215430_create_recommendations_table.php @@ -8,10 +8,8 @@ class CreateRecommendationsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('recommendations', function (Blueprint $table) { $table->id(); diff --git a/database/migrations/2021_06_28_123452_add_standalone_css_to_users_table.php b/database/migrations/2021_06_28_123452_add_standalone_css_to_users_table.php index e988908750..fb97665638 100644 --- a/database/migrations/2021_06_28_123452_add_standalone_css_to_users_table.php +++ b/database/migrations/2021_06_28_123452_add_standalone_css_to_users_table.php @@ -19,10 +19,8 @@ class AddStandaloneCssToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->string('standalone_css')->after('custom_css')->nullable(); diff --git a/database/migrations/2021_07_08_135537_add_flush_own_peers_to_users_table.php b/database/migrations/2021_07_08_135537_add_flush_own_peers_to_users_table.php index a8d7535306..00e9e68691 100644 --- a/database/migrations/2021_07_08_135537_add_flush_own_peers_to_users_table.php +++ b/database/migrations/2021_07_08_135537_add_flush_own_peers_to_users_table.php @@ -8,10 +8,8 @@ class AddFlushOwnPeersToUsersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('users', function (Blueprint $table) { $table->tinyInteger('own_flushes')->default('2'); diff --git a/database/migrations/2021_07_27_140562_change_torrents_table.php b/database/migrations/2021_07_27_140562_change_torrents_table.php index 6591b27093..8833c40f85 100644 --- a/database/migrations/2021_07_27_140562_change_torrents_table.php +++ b/database/migrations/2021_07_27_140562_change_torrents_table.php @@ -8,10 +8,8 @@ class ChangeTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->integer('distributor_id')->nullable()->index()->after('resolution_id'); diff --git a/database/migrations/2021_07_27_185231_create_distributors_table.php b/database/migrations/2021_07_27_185231_create_distributors_table.php index a7504c0cc8..ada0d52b98 100644 --- a/database/migrations/2021_07_27_185231_create_distributors_table.php +++ b/database/migrations/2021_07_27_185231_create_distributors_table.php @@ -19,10 +19,8 @@ class CreateDistributorsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('distributors', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2021_07_27_285231_create_regions_table.php b/database/migrations/2021_07_27_285231_create_regions_table.php index fb5fe849a4..12fc279919 100644 --- a/database/migrations/2021_07_27_285231_create_regions_table.php +++ b/database/migrations/2021_07_27_285231_create_regions_table.php @@ -19,10 +19,8 @@ class CreateRegionsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::create('regions', function (Blueprint $table) { $table->bigIncrements('id'); diff --git a/database/migrations/2021_07_31_172708_add_connectable_state_to_peers_table.php b/database/migrations/2021_07_31_172708_add_connectable_state_to_peers_table.php index 7ed289f590..88afaafd5d 100644 --- a/database/migrations/2021_07_31_172708_add_connectable_state_to_peers_table.php +++ b/database/migrations/2021_07_31_172708_add_connectable_state_to_peers_table.php @@ -8,10 +8,8 @@ class AddConnectableStateToPeersTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('peers', function (Blueprint $table) { $table->boolean('connectable')->default(0); diff --git a/database/migrations/2021_08_20_121103_change_torrent_to_nullable_in_warning.php b/database/migrations/2021_08_20_121103_change_torrent_to_nullable_in_warning.php index 6d0047aec7..ee8b6a499b 100644 --- a/database/migrations/2021_08_20_121103_change_torrent_to_nullable_in_warning.php +++ b/database/migrations/2021_08_20_121103_change_torrent_to_nullable_in_warning.php @@ -8,10 +8,8 @@ class ChangeTorrentToNullableInWarning extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('warnings', function (Blueprint $table) { $table->bigInteger('torrent')->unsigned()->nullable()->change(); diff --git a/database/migrations/2021_10_03_180121_add_indexes_to_tables.php b/database/migrations/2021_10_03_180121_add_indexes_to_tables.php index f85ac7a7a3..229378cb6c 100644 --- a/database/migrations/2021_10_03_180121_add_indexes_to_tables.php +++ b/database/migrations/2021_10_03_180121_add_indexes_to_tables.php @@ -8,10 +8,8 @@ class AddIndexesToTables extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('articles', function (Blueprint $table) { $sm = Schema::getConnection()->getDoctrineSchemaManager(); diff --git a/database/migrations/2021_11_22_115517_add_more_torrent_promos.php b/database/migrations/2021_11_22_115517_add_more_torrent_promos.php index 178f4481f3..7a0b4859d8 100644 --- a/database/migrations/2021_11_22_115517_add_more_torrent_promos.php +++ b/database/migrations/2021_11_22_115517_add_more_torrent_promos.php @@ -8,10 +8,8 @@ class AddMoreTorrentPromos extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->smallInteger('free')->default(0)->change(); @@ -30,7 +28,7 @@ public function up() } } - public function down() + public function down(): void { Schema::table('torrents', function (Blueprint $table) { $table->boolean('free')->default(0)->change(); diff --git a/database/migrations/2021_11_26_024738_update_torrents_table.php b/database/migrations/2021_11_26_024738_update_torrents_table.php index 6963bdf515..6ca905fe39 100644 --- a/database/migrations/2021_11_26_024738_update_torrents_table.php +++ b/database/migrations/2021_11_26_024738_update_torrents_table.php @@ -8,10 +8,8 @@ class UpdateTorrentsTable extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { Schema::table('torrents', function (Blueprint $table) { $table->integer('season_number')->after('igdb')->nullable()->index(); diff --git a/database/migrations/2021_12_19_202317_fix_database_indexs.php b/database/migrations/2021_12_19_202317_fix_database_indexs.php index d1cace27c8..d30a954dac 100644 --- a/database/migrations/2021_12_19_202317_fix_database_indexs.php +++ b/database/migrations/2021_12_19_202317_fix_database_indexs.php @@ -7,10 +7,8 @@ class FixDatabaseIndexs extends Migration { /** * Run the migrations. - * - * @return void */ - public function up() + public function up(): void { // New Indexs DB::statement('ALTER TABLE `history` ADD INDEX `history_idx_prewa_hitru_immun_activ_actua` (`prewarn`,`hitrun`,`immune`,`active`,`actual_downloaded`)'); diff --git a/database/seeders/AchievementDetailsTableSeeder.php b/database/seeders/AchievementDetailsTableSeeder.php index 8cfd2212a0..eccd9a0f0d 100644 --- a/database/seeders/AchievementDetailsTableSeeder.php +++ b/database/seeders/AchievementDetailsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->achievementDetails as $ad) { AchievementDetail::updateOrCreate($ad); } } - private function getAchievementDetails() + private function getAchievementDetails(): array { return [ [ diff --git a/database/seeders/ArticlesTableSeeder.php b/database/seeders/ArticlesTableSeeder.php index 082897fd11..3bab0cc5fa 100644 --- a/database/seeders/ArticlesTableSeeder.php +++ b/database/seeders/ArticlesTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->articles as $article) { Article::updateOrCreate($article); } } - private function getArticles() + private function getArticles(): array { return [ [ diff --git a/database/seeders/BonExchangeTableSeeder.php b/database/seeders/BonExchangeTableSeeder.php index 8f1d92498f..fce2c01e01 100644 --- a/database/seeders/BonExchangeTableSeeder.php +++ b/database/seeders/BonExchangeTableSeeder.php @@ -28,17 +28,15 @@ public function __construct(private ByteUnits $byteUnits) /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->bonExchanges as $be) { BonExchange::updateOrCreate($be); } } - private function getBonExchanges() + private function getBonExchanges(): array { return [ [ diff --git a/database/seeders/BotsTableSeeder.php b/database/seeders/BotsTableSeeder.php index f9348b9616..a1205e79cc 100644 --- a/database/seeders/BotsTableSeeder.php +++ b/database/seeders/BotsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Run the database seeds. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->bots as $bot) { Bot::updateOrCreate($bot); } } - private function getBots() + private function getBots(): array { return [ [ diff --git a/database/seeders/CategoriesTableSeeder.php b/database/seeders/CategoriesTableSeeder.php index d2a408c74d..d69a40cf2b 100644 --- a/database/seeders/CategoriesTableSeeder.php +++ b/database/seeders/CategoriesTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->categories as $category) { Category::updateOrCreate($category); } } - private function getCategories() + private function getCategories(): array { return [ [ diff --git a/database/seeders/ChatStatusSeeder.php b/database/seeders/ChatStatusSeeder.php index ea1c73bd6e..b13517b2b5 100644 --- a/database/seeders/ChatStatusSeeder.php +++ b/database/seeders/ChatStatusSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Run the database seeds. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->statuses as $status) { ChatStatus::updateOrCreate($status); } } - private function getStatuses() + private function getStatuses(): array { return [ [ diff --git a/database/seeders/ChatroomTableSeeder.php b/database/seeders/ChatroomTableSeeder.php index 155448351a..6b7392a371 100644 --- a/database/seeders/ChatroomTableSeeder.php +++ b/database/seeders/ChatroomTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Run the database seeds. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->rooms as $room) { Chatroom::updateOrCreate($room); } } - private function getRooms() + private function getRooms(): array { return [ [ diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index e135125f16..8673fba55c 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -19,10 +19,8 @@ class DatabaseSeeder extends Seeder { /** * Run the database seeds. - * - * @return void */ - public function run() + public function run(): void { $this->call([ GroupsTableSeeder::class, diff --git a/database/seeders/DistributorsTableSeeder.php b/database/seeders/DistributorsTableSeeder.php index 369aac62be..60b83a3438 100644 --- a/database/seeders/DistributorsTableSeeder.php +++ b/database/seeders/DistributorsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->distributors as $distributor) { Distributor::updateOrCreate($distributor); } } - private function getDistributors() + private function getDistributors(): array { return [ [ diff --git a/database/seeders/ForumsTableSeeder.php b/database/seeders/ForumsTableSeeder.php index d274c95c6b..6b420f95cc 100644 --- a/database/seeders/ForumsTableSeeder.php +++ b/database/seeders/ForumsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->forums as $forum) { Forum::updateOrCreate($forum); } } - private function getForums() + private function getForums(): array { return [ [ diff --git a/database/seeders/GroupsTableSeeder.php b/database/seeders/GroupsTableSeeder.php index 277e0eaaee..726f0e5712 100644 --- a/database/seeders/GroupsTableSeeder.php +++ b/database/seeders/GroupsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->groups as $group) { Group::updateOrCreate($group); } } - private function getGroups() + private function getGroups(): array { return [ [ diff --git a/database/seeders/MediaLanguagesSeeder.php b/database/seeders/MediaLanguagesSeeder.php index fa7790b018..3d1b7050e7 100644 --- a/database/seeders/MediaLanguagesSeeder.php +++ b/database/seeders/MediaLanguagesSeeder.php @@ -16,8 +16,6 @@ public function __construct() /** * Run the database seeder. - * - * @return void */ public function run(): void { @@ -29,7 +27,7 @@ public function run(): void } } - private function getLanguages() + private function getLanguages(): array { return [ 'aa' => 'Afar', diff --git a/database/seeders/PagesTableSeeder.php b/database/seeders/PagesTableSeeder.php index 6d068aa75e..27e4d93f4e 100644 --- a/database/seeders/PagesTableSeeder.php +++ b/database/seeders/PagesTableSeeder.php @@ -27,10 +27,8 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->pages as $page) { if (Page::find($page['id']) == null) { @@ -41,7 +39,7 @@ public function run() } } - private function getPages() + private function getPages(): array { return [ [ diff --git a/database/seeders/PermissionsTableSeeder.php b/database/seeders/PermissionsTableSeeder.php index a4b46f7bab..fd0f9a7958 100644 --- a/database/seeders/PermissionsTableSeeder.php +++ b/database/seeders/PermissionsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->permissions as $permission) { Permission::updateOrCreate($permission); } } - private function getPermissions() + private function getPermissions(): array { return [ [ diff --git a/database/seeders/RegionsTableSeeder.php b/database/seeders/RegionsTableSeeder.php index 6012c75dbd..2946422672 100644 --- a/database/seeders/RegionsTableSeeder.php +++ b/database/seeders/RegionsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->regions as $region) { Region::updateOrCreate($region); } } - private function getRegions() + private function getRegions(): array { return [ [ diff --git a/database/seeders/ResolutionsTableSeeder.php b/database/seeders/ResolutionsTableSeeder.php index 4cc499b098..50d478fdce 100644 --- a/database/seeders/ResolutionsTableSeeder.php +++ b/database/seeders/ResolutionsTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->resolutions as $resolution) { Resolution::updateOrCreate($resolution); } } - private function getResolutions() + private function getResolutions(): array { return [ [ diff --git a/database/seeders/TicketCategoriesTableSeeder.php b/database/seeders/TicketCategoriesTableSeeder.php index 670549c0c1..e7a419ca60 100644 --- a/database/seeders/TicketCategoriesTableSeeder.php +++ b/database/seeders/TicketCategoriesTableSeeder.php @@ -18,7 +18,7 @@ class TicketCategoriesTableSeeder extends Seeder { - private $categories; + private array $categories; public function __construct() { diff --git a/database/seeders/TicketPrioritiesTableSeeder.php b/database/seeders/TicketPrioritiesTableSeeder.php index 7776ead9a6..43a7a6d741 100644 --- a/database/seeders/TicketPrioritiesTableSeeder.php +++ b/database/seeders/TicketPrioritiesTableSeeder.php @@ -18,7 +18,7 @@ class TicketPrioritiesTableSeeder extends Seeder { - private $priorities; + private array $priorities; public function __construct() { diff --git a/database/seeders/TypesTableSeeder.php b/database/seeders/TypesTableSeeder.php index 082cb29ab9..972265209e 100644 --- a/database/seeders/TypesTableSeeder.php +++ b/database/seeders/TypesTableSeeder.php @@ -27,17 +27,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->types as $type) { Type::updateOrCreate($type); } } - private function getTypes() + private function getTypes(): array { return [ [ diff --git a/database/seeders/UsersTableSeeder.php b/database/seeders/UsersTableSeeder.php index 14e849b876..e80f7293f6 100644 --- a/database/seeders/UsersTableSeeder.php +++ b/database/seeders/UsersTableSeeder.php @@ -28,17 +28,15 @@ public function __construct() /** * Auto generated seed file. - * - * @return void */ - public function run() + public function run(): void { foreach ($this->users as $user) { User::updateOrCreate($user); } } - private function getUsers() + private function getUsers(): array { return [ [ diff --git a/tests/Feature/Factories/UserFactoryTest.php b/tests/Feature/Factories/UserFactoryTest.php index b86baac6d3..be7dd3460c 100644 --- a/tests/Feature/Factories/UserFactoryTest.php +++ b/tests/Feature/Factories/UserFactoryTest.php @@ -13,7 +13,7 @@ protected function setUp(): void } /** @test */ - public function factoryReturnsCorrectValuesWhenCreated() + public function factoryReturnsCorrectValuesWhenCreated(): void { $user = User::factory()->create(); diff --git a/tests/Feature/Http/Controllers/API/TorrentControllerTest.php b/tests/Feature/Http/Controllers/API/TorrentControllerTest.php index 2cc5ca286a..2ce53aad12 100644 --- a/tests/Feature/Http/Controllers/API/TorrentControllerTest.php +++ b/tests/Feature/Http/Controllers/API/TorrentControllerTest.php @@ -21,7 +21,7 @@ class TorrentControllerTest extends TestCase /** * @test */ - public function filter_returns_an_ok_response() + public function filter_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -52,7 +52,7 @@ public function filter_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -83,7 +83,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -104,7 +104,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(ChatroomTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/AchievementsControllerTest.php b/tests/Feature/Http/Controllers/AchievementsControllerTest.php index 562dc19b9e..1054dce03a 100644 --- a/tests/Feature/Http/Controllers/AchievementsControllerTest.php +++ b/tests/Feature/Http/Controllers/AchievementsControllerTest.php @@ -14,7 +14,7 @@ class AchievementsControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -33,7 +33,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/AlbumControllerTest.php b/tests/Feature/Http/Controllers/AlbumControllerTest.php index b1563c8ff5..ab4b308631 100644 --- a/tests/Feature/Http/Controllers/AlbumControllerTest.php +++ b/tests/Feature/Http/Controllers/AlbumControllerTest.php @@ -13,7 +13,7 @@ class AlbumControllerTest extends TestCase { /** @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -26,7 +26,7 @@ public function create_returns_an_ok_response() } /** @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -43,7 +43,7 @@ public function destroy_returns_an_ok_response() } /** @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -56,7 +56,7 @@ public function index_returns_an_ok_response() } /** @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -75,7 +75,7 @@ public function show_returns_an_ok_response() } /** @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/AnnounceControllerTest.php b/tests/Feature/Http/Controllers/AnnounceControllerTest.php index 0525d464e4..98f8b84265 100644 --- a/tests/Feature/Http/Controllers/AnnounceControllerTest.php +++ b/tests/Feature/Http/Controllers/AnnounceControllerTest.php @@ -16,7 +16,7 @@ class AnnounceControllerTest extends TestCase /** * @test */ - public function announce_returns_an_ok_response() + public function announce_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/ArticleControllerTest.php b/tests/Feature/Http/Controllers/ArticleControllerTest.php index 7f05519d9c..c7de5ee8e3 100644 --- a/tests/Feature/Http/Controllers/ArticleControllerTest.php +++ b/tests/Feature/Http/Controllers/ArticleControllerTest.php @@ -15,7 +15,7 @@ class ArticleControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -31,7 +31,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php b/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php index 9615742cda..0faf27cb86 100644 --- a/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php +++ b/tests/Feature/Http/Controllers/Auth/ActivationControllerTest.php @@ -14,7 +14,7 @@ class ActivationControllerTest extends TestCase /** * @test */ - public function activate_returns_an_ok_response() + public function activate_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php b/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php index 50767fe678..35fa28d7f5 100644 --- a/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php +++ b/tests/Feature/Http/Controllers/Auth/ApplicationControllerTest.php @@ -13,7 +13,7 @@ class ApplicationControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->get(route('application.create')) ->assertOk() @@ -23,7 +23,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { config(['captcha.enabled' => false]); diff --git a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php b/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php index a252b4464b..cded98fe7f 100644 --- a/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php +++ b/tests/Feature/Http/Controllers/Auth/ForgotUsernameControllerTest.php @@ -13,7 +13,7 @@ class ForgotUsernameControllerTest extends TestCase /** * @test */ - public function send_username_reminder_returns_an_ok_response() + public function send_username_reminder_returns_an_ok_response(): void { config(['captcha.enabled' => false]); @@ -29,7 +29,7 @@ public function send_username_reminder_returns_an_ok_response() /** * @test */ - public function show_forgot_username_form_returns_an_ok_response() + public function show_forgot_username_form_returns_an_ok_response(): void { $this->get(route('username.request')) ->assertOk() diff --git a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php b/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php index 7711002af3..5da572c716 100644 --- a/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php +++ b/tests/Feature/Http/Controllers/Auth/TwoStepControllerTest.php @@ -15,7 +15,7 @@ class TwoStepControllerTest extends TestCase /** * @test */ - public function resend_returns_an_ok_response() + public function resend_returns_an_ok_response(): void { config(['auth.TwoStepEnabled' => true]); @@ -36,7 +36,7 @@ public function resend_returns_an_ok_response() /** * @test */ - public function show_verification_returns_an_ok_response() + public function show_verification_returns_an_ok_response(): void { config(['auth.TwoStepEnabled' => true]); @@ -58,7 +58,7 @@ public function show_verification_returns_an_ok_response() /** * @test */ - public function verify_returns_an_ok_response() + public function verify_returns_an_ok_response(): void { config(['auth.TwoStepEnabled' => true]); diff --git a/tests/Feature/Http/Controllers/BonusControllerTest.php b/tests/Feature/Http/Controllers/BonusControllerTest.php index 044bd2e3c0..6a091ec85f 100644 --- a/tests/Feature/Http/Controllers/BonusControllerTest.php +++ b/tests/Feature/Http/Controllers/BonusControllerTest.php @@ -25,7 +25,7 @@ protected function setUp(): void } /** @test */ - public function bonus_returns_an_ok_response() + public function bonus_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -56,7 +56,7 @@ public function bonus_returns_an_ok_response() } /** @test */ - public function upload_exchange_returns_an_ok_response() + public function upload_exchange_returns_an_ok_response(): void { // User's seed bonus must be >= cost for exchange to succeed. @@ -79,7 +79,7 @@ public function upload_exchange_returns_an_ok_response() } /** @test */ - public function download_exchange_returns_an_ok_response() + public function download_exchange_returns_an_ok_response(): void { // User's seed bonus must be >= cost for exchange to succeed. @@ -106,7 +106,7 @@ public function download_exchange_returns_an_ok_response() } /** @test */ - public function personal_freeleech_exchange_returns_an_ok_response() + public function personal_freeleech_exchange_returns_an_ok_response(): void { // User's seed bonus must be >= cost for exchange to succeed. @@ -133,7 +133,7 @@ public function personal_freeleech_exchange_returns_an_ok_response() } /** @test */ - public function gift_returns_an_ok_response() + public function gift_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -145,7 +145,7 @@ public function gift_returns_an_ok_response() } /** @test */ - public function gifts_returns_an_ok_response() + public function gifts_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -161,7 +161,7 @@ public function gifts_returns_an_ok_response() } /** @test */ - public function send_gift_returns_an_ok_response() + public function send_gift_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(BotsTableSeeder::class); @@ -184,7 +184,7 @@ public function send_gift_returns_an_ok_response() } /** @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $user = User::factory()->create(); @@ -202,7 +202,7 @@ public function store_returns_an_ok_response() } /** @test */ - public function tip_poster_returns_an_ok_response() + public function tip_poster_returns_an_ok_response(): void { // User's seed bonus must be >= tip amount for exchange to succeed. @@ -222,7 +222,7 @@ public function tip_poster_returns_an_ok_response() } /** @test */ - public function tip_uploader_returns_an_ok_response() + public function tip_uploader_returns_an_ok_response(): void { // User's seed bonus must be >= tip amount for exchange to succeed. @@ -241,7 +241,7 @@ public function tip_uploader_returns_an_ok_response() } /** @test */ - public function tips_returns_an_ok_response() + public function tips_returns_an_ok_response(): void { $user = User::factory()->create(); diff --git a/tests/Feature/Http/Controllers/CommentControllerTest.php b/tests/Feature/Http/Controllers/CommentControllerTest.php index 4843aaa61c..7a77705392 100644 --- a/tests/Feature/Http/Controllers/CommentControllerTest.php +++ b/tests/Feature/Http/Controllers/CommentControllerTest.php @@ -22,7 +22,7 @@ class CommentControllerTest extends TestCase /** * @test */ - public function article_returns_an_ok_response() + public function article_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -49,7 +49,7 @@ public function article_returns_an_ok_response() /** * @test */ - public function delete_comment_returns_an_ok_response() + public function delete_comment_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -73,7 +73,7 @@ public function delete_comment_returns_an_ok_response() /** * @test */ - public function edit_comment_returns_an_ok_response() + public function edit_comment_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -97,7 +97,7 @@ public function edit_comment_returns_an_ok_response() /** * @test */ - public function playlist_returns_an_ok_response() + public function playlist_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -126,7 +126,7 @@ public function playlist_returns_an_ok_response() /** * @test */ - public function quickthanks_returns_an_ok_response() + public function quickthanks_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -151,7 +151,7 @@ public function quickthanks_returns_an_ok_response() /** * @test */ - public function request_returns_an_ok_response() + public function request_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -178,7 +178,7 @@ public function request_returns_an_ok_response() /** * @test */ - public function torrent_returns_an_ok_response() + public function torrent_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/ContactControllerTest.php b/tests/Feature/Http/Controllers/ContactControllerTest.php index c483ab9aff..b126a5766f 100644 --- a/tests/Feature/Http/Controllers/ContactControllerTest.php +++ b/tests/Feature/Http/Controllers/ContactControllerTest.php @@ -13,7 +13,7 @@ class ContactControllerTest extends TestCase { /** @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -27,7 +27,7 @@ public function index_returns_an_ok_response() } /** @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/FollowControllerTest.php b/tests/Feature/Http/Controllers/FollowControllerTest.php index 63aa9d6595..8365686985 100644 --- a/tests/Feature/Http/Controllers/FollowControllerTest.php +++ b/tests/Feature/Http/Controllers/FollowControllerTest.php @@ -14,7 +14,7 @@ class FollowControllerTest extends TestCase { /** @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -37,7 +37,7 @@ public function destroy_returns_an_ok_response() } /** @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php b/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php index fbc07a7a5f..28f550d4e5 100644 --- a/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/ForumCategoryControllerTest.php @@ -15,7 +15,7 @@ class ForumCategoryControllerTest extends TestCase { /** @test */ - public function show_category_returns_an_ok_response() + public function show_category_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -41,7 +41,7 @@ public function show_category_returns_an_ok_response() } /** @test */ - public function show_forum_returns_an_ok_response() + public function show_forum_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/ForumControllerTest.php b/tests/Feature/Http/Controllers/ForumControllerTest.php index becb0fcc8c..fb310f235b 100644 --- a/tests/Feature/Http/Controllers/ForumControllerTest.php +++ b/tests/Feature/Http/Controllers/ForumControllerTest.php @@ -15,7 +15,7 @@ class ForumControllerTest extends TestCase { /** @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -32,7 +32,7 @@ public function index_returns_an_ok_response() } /** @test */ - public function latest_posts_returns_an_ok_response() + public function latest_posts_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -50,7 +50,7 @@ public function latest_posts_returns_an_ok_response() } /** @test */ - public function latest_topics_returns_an_ok_response() + public function latest_topics_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -68,7 +68,7 @@ public function latest_topics_returns_an_ok_response() } /** @test */ - public function search_topics_returns_an_ok_response() + public function search_topics_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -90,7 +90,7 @@ public function search_topics_returns_an_ok_response() } /** @test */ - public function search_posts_returns_an_ok_response() + public function search_posts_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); @@ -112,7 +112,7 @@ public function search_posts_returns_an_ok_response() } /** @test */ - public function show_category_returns_an_ok_response() + public function show_category_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -151,7 +151,7 @@ public function show_category_returns_an_ok_response() } /** @test */ - public function show_forum_returns_an_ok_response() + public function show_forum_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -179,7 +179,7 @@ public function show_forum_returns_an_ok_response() } /** @test */ - public function subscriptions_returns_an_ok_response() + public function subscriptions_returns_an_ok_response(): void { $this->seed(UsersTableSeeder::class); $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/HomeControllerTest.php b/tests/Feature/Http/Controllers/HomeControllerTest.php index 4d59507740..80685859e8 100644 --- a/tests/Feature/Http/Controllers/HomeControllerTest.php +++ b/tests/Feature/Http/Controllers/HomeControllerTest.php @@ -19,7 +19,7 @@ protected function setUp(): void } /** @test */ - public function whenNotAuthenticatedHomepageRedirectsToLogin() + public function whenNotAuthenticatedHomepageRedirectsToLogin(): void { $response = $this->get('/'); @@ -27,7 +27,7 @@ public function whenNotAuthenticatedHomepageRedirectsToLogin() } /** @test */ - public function whenAuthenticatedHomepageReturns200() + public function whenAuthenticatedHomepageReturns200(): void { $user = User::factory()->create(); @@ -56,7 +56,7 @@ public function whenAuthenticatedHomepageReturns200() } /** @test */ - public function whenAuthenticatedAndTwoStepRequiredHomepageRedirectsToTwoStep() + public function whenAuthenticatedAndTwoStepRequiredHomepageRedirectsToTwoStep(): void { $user = User::factory()->create([ 'twostep' => true, diff --git a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php index 398357f53e..cdd4015c86 100644 --- a/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/ArticleControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -61,7 +61,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -78,7 +78,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -94,7 +94,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -114,7 +114,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php index 68df0db3f9..d9b873235c 100644 --- a/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/CategoryControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -62,7 +62,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -95,7 +95,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -121,7 +121,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php index 5ce35e307a..61b0c7339a 100644 --- a/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/ChatBotControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -48,7 +48,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function disable_returns_an_ok_response() + public function disable_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -62,7 +62,7 @@ public function disable_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function enable_returns_an_ok_response() + public function enable_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -93,7 +93,7 @@ public function enable_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -109,7 +109,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php index e7313b92b1..9ee4e78d4f 100644 --- a/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/ChatRoomControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -63,7 +63,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -80,7 +80,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php index 941c8a3089..950cf3cef9 100644 --- a/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/ChatStatusControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -46,7 +46,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -62,7 +62,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -81,7 +81,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php index 8fa099915e..66df1792dc 100644 --- a/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/CheaterControllerTest.php @@ -17,7 +17,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -31,7 +31,7 @@ protected function createStaffUser() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php index 22f7a2ec1a..cebd38fff0 100644 --- a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php @@ -17,7 +17,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -31,7 +31,7 @@ protected function createStaffUser() /** * @test */ - public function clear_all_cache_returns_an_ok_response() + public function clear_all_cache_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -45,7 +45,7 @@ public function clear_all_cache_returns_an_ok_response() /** * @test */ - public function clear_cache_returns_an_ok_response() + public function clear_cache_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -59,7 +59,7 @@ public function clear_cache_returns_an_ok_response() /** * @test */ - public function clear_config_returns_an_ok_response() + public function clear_config_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -73,7 +73,7 @@ public function clear_config_returns_an_ok_response() /** * @test */ - public function clear_route_returns_an_ok_response() + public function clear_route_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -87,7 +87,7 @@ public function clear_route_returns_an_ok_response() /** * @test */ - public function clear_view_returns_an_ok_response() + public function clear_view_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -101,7 +101,7 @@ public function clear_view_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -116,7 +116,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function maintance_disable_returns_an_ok_response() + public function maintance_disable_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -130,7 +130,7 @@ public function maintance_disable_returns_an_ok_response() /** * @test */ - public function set_all_cache_returns_an_ok_response() + public function set_all_cache_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -144,7 +144,7 @@ public function set_all_cache_returns_an_ok_response() /** * @test */ - public function test_email_returns_an_ok_response() + public function test_email_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/GiftControllerTest.php b/tests/Feature/Http/Controllers/Staff/GiftControllerTest.php index bdc87400f5..7c293050d5 100644 --- a/tests/Feature/Http/Controllers/Staff/GiftControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/GiftControllerTest.php @@ -17,7 +17,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -31,7 +31,7 @@ protected function createStaffUser() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -46,7 +46,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php index 6d07931086..a0e6ce07c1 100644 --- a/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/GroupControllerTest.php @@ -17,7 +17,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -31,7 +31,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -46,7 +46,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -63,7 +63,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -79,7 +79,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -113,7 +113,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php index ef32399257..82a154b414 100644 --- a/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/InviteControllerTest.php @@ -17,7 +17,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -31,7 +31,7 @@ protected function createStaffUser() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php index 8c7395ce18..32c03f6fbb 100644 --- a/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/MassActionControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -69,7 +69,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php b/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php index 6e47aaa875..ca421d8285 100644 --- a/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/NoteControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -48,7 +48,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -64,7 +64,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/PageControllerTest.php b/tests/Feature/Http/Controllers/Staff/PageControllerTest.php index 908d9b0770..1613a0d66d 100644 --- a/tests/Feature/Http/Controllers/Staff/PageControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/PageControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -62,7 +62,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -95,7 +95,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -114,7 +114,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php index d43e70bb9a..499f7b34d9 100644 --- a/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/TypeControllerTest.php @@ -18,7 +18,7 @@ protected function setUp(): void parent::setUp(); } - protected function createStaffUser() + protected function createStaffUser(): \Illuminate\Database\Eloquent\Collection|\Illuminate\Database\Eloquent\Model { return User::factory()->create([ 'group_id' => fn () => Group::factory()->create([ @@ -32,7 +32,7 @@ protected function createStaffUser() /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -47,7 +47,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -62,7 +62,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -95,7 +95,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); @@ -114,7 +114,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->seed(GroupsTableSeeder::class); diff --git a/tests/Todo/Feature/Http/Controllers/API/ChatControllerTest.php b/tests/Todo/Feature/Http/Controllers/API/ChatControllerTest.php index db24dc5ace..ebf8256a82 100644 --- a/tests/Todo/Feature/Http/Controllers/API/ChatControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/API/ChatControllerTest.php @@ -27,7 +27,7 @@ protected function setUp(): void } /** @test */ - public function audibles_returns_an_ok_response() + public function audibles_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -44,7 +44,7 @@ public function audibles_returns_an_ok_response() } /** @test */ - public function bot_messages_returns_an_ok_response() + public function bot_messages_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -80,7 +80,7 @@ public function bot_messages_returns_an_ok_response() } /** @test */ - public function bots_returns_an_ok_response() + public function bots_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -101,7 +101,7 @@ public function bots_returns_an_ok_response() } /** @test */ - public function config_returns_an_ok_response() + public function config_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -118,7 +118,7 @@ public function config_returns_an_ok_response() } /** @test */ - public function create_message_returns_an_ok_response() + public function create_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -148,7 +148,7 @@ public function create_message_returns_an_ok_response() } /** @test */ - public function delete_bot_echo_returns_an_ok_response() + public function delete_bot_echo_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -171,7 +171,7 @@ public function delete_bot_echo_returns_an_ok_response() } /** @test */ - public function delete_message_returns_an_ok_response() + public function delete_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -186,7 +186,7 @@ public function delete_message_returns_an_ok_response() } /** @test */ - public function delete_room_echo_returns_an_ok_response() + public function delete_room_echo_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -208,7 +208,7 @@ public function delete_room_echo_returns_an_ok_response() } /** @test */ - public function delete_target_echo_returns_an_ok_response() + public function delete_target_echo_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -230,7 +230,7 @@ public function delete_target_echo_returns_an_ok_response() } /** @test */ - public function echoes_returns_an_ok_response() + public function echoes_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -249,7 +249,7 @@ public function echoes_returns_an_ok_response() } /** @test */ - public function messages_returns_an_ok_response() + public function messages_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -270,7 +270,7 @@ public function messages_returns_an_ok_response() } /** @test */ - public function private_messages_returns_an_ok_response() + public function private_messages_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -293,7 +293,7 @@ public function private_messages_returns_an_ok_response() } /** @test */ - public function rooms_returns_an_ok_response() + public function rooms_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -311,7 +311,7 @@ public function rooms_returns_an_ok_response() } /** @test */ - public function statuses_returns_an_ok_response() + public function statuses_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -331,7 +331,7 @@ public function statuses_returns_an_ok_response() } /** @test */ - public function toggle_bot_audible_returns_an_ok_response() + public function toggle_bot_audible_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -353,7 +353,7 @@ public function toggle_bot_audible_returns_an_ok_response() } /** @test */ - public function toggle_room_audible_returns_an_ok_response() + public function toggle_room_audible_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -375,7 +375,7 @@ public function toggle_room_audible_returns_an_ok_response() } /** @test */ - public function toggle_target_audible_returns_an_ok_response() + public function toggle_target_audible_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -397,7 +397,7 @@ public function toggle_target_audible_returns_an_ok_response() } /** @test */ - public function update_user_chat_status_returns_an_ok_response() + public function update_user_chat_status_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -417,7 +417,7 @@ public function update_user_chat_status_returns_an_ok_response() } /** @test */ - public function update_user_room_returns_an_ok_response() + public function update_user_room_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); @@ -435,7 +435,7 @@ public function update_user_room_returns_an_ok_response() } /** @test */ - public function update_user_target_returns_an_ok_response() + public function update_user_target_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete'); diff --git a/tests/Todo/Feature/Http/Controllers/BookmarkControllerTest.php b/tests/Todo/Feature/Http/Controllers/BookmarkControllerTest.php index b251aca06d..1b5c5e6c55 100644 --- a/tests/Todo/Feature/Http/Controllers/BookmarkControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/BookmarkControllerTest.php @@ -20,7 +20,7 @@ protected function setUp(): void } /** @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete. Needs too be converted to Livewire test.'); @@ -37,7 +37,7 @@ public function destroy_returns_an_ok_response() } /** @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete. Needs too be converted to Livewire test.'); @@ -55,7 +55,7 @@ public function index_returns_an_ok_response() } /** @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test is incomplete. Needs too be converted to Livewire test.'); diff --git a/tests/Todo/Feature/Http/Controllers/GraveyardControllerTest.php b/tests/Todo/Feature/Http/Controllers/GraveyardControllerTest.php index 9b1912b963..8d6312364a 100644 --- a/tests/Todo/Feature/Http/Controllers/GraveyardControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/GraveyardControllerTest.php @@ -17,7 +17,7 @@ class GraveyardControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -35,7 +35,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function faceted_returns_an_ok_response() + public function faceted_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -52,7 +52,7 @@ public function faceted_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -73,7 +73,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/ImageControllerTest.php b/tests/Todo/Feature/Http/Controllers/ImageControllerTest.php index af1ed69d3b..0da6965373 100644 --- a/tests/Todo/Feature/Http/Controllers/ImageControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/ImageControllerTest.php @@ -14,7 +14,7 @@ class ImageControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -33,7 +33,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -51,7 +51,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function download_returns_an_ok_response() + public function download_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -68,7 +68,7 @@ public function download_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/InviteControllerTest.php b/tests/Todo/Feature/Http/Controllers/InviteControllerTest.php index 6a7c1b16d8..54f146490b 100644 --- a/tests/Todo/Feature/Http/Controllers/InviteControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/InviteControllerTest.php @@ -14,7 +14,7 @@ class InviteControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -30,7 +30,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -51,7 +51,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function send_returns_an_ok_response() + public function send_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -70,7 +70,7 @@ public function send_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/LanguageControllerTest.php b/tests/Todo/Feature/Http/Controllers/LanguageControllerTest.php index 4493b379d2..ebae91e0ec 100644 --- a/tests/Todo/Feature/Http/Controllers/LanguageControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/LanguageControllerTest.php @@ -16,7 +16,7 @@ class LanguageControllerTest extends TestCase /** * @test */ - public function back_returns_an_ok_response() + public function back_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/LikeControllerTest.php b/tests/Todo/Feature/Http/Controllers/LikeControllerTest.php index 7c08bbc7c8..57747796f6 100644 --- a/tests/Todo/Feature/Http/Controllers/LikeControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/LikeControllerTest.php @@ -17,7 +17,7 @@ class LikeControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -35,7 +35,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/NotificationControllerTest.php b/tests/Todo/Feature/Http/Controllers/NotificationControllerTest.php index caee14b401..d9f30713d9 100644 --- a/tests/Todo/Feature/Http/Controllers/NotificationControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/NotificationControllerTest.php @@ -14,7 +14,7 @@ class NotificationControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function destroy_all_returns_an_ok_response() + public function destroy_all_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -48,7 +48,7 @@ public function destroy_all_returns_an_ok_response() /** * @test */ - public function faceted_returns_an_ok_response() + public function faceted_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -65,7 +65,7 @@ public function faceted_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -83,7 +83,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -100,7 +100,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -119,7 +119,7 @@ public function update_returns_an_ok_response() /** * @test */ - public function update_all_returns_an_ok_response() + public function update_all_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/PageControllerTest.php b/tests/Todo/Feature/Http/Controllers/PageControllerTest.php index 885420d964..e08a2c0ff4 100644 --- a/tests/Todo/Feature/Http/Controllers/PageControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PageControllerTest.php @@ -14,7 +14,7 @@ class PageControllerTest extends TestCase /** * @test */ - public function about_returns_an_ok_response() + public function about_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function about_returns_an_ok_response() /** * @test */ - public function blacklist_returns_an_ok_response() + public function blacklist_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -50,7 +50,7 @@ public function blacklist_returns_an_ok_response() /** * @test */ - public function email_list_returns_an_ok_response() + public function email_list_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -69,7 +69,7 @@ public function email_list_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -87,7 +87,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function internal_returns_an_ok_response() + public function internal_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -105,7 +105,7 @@ public function internal_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -124,7 +124,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function staff_returns_an_ok_response() + public function staff_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/PlaylistControllerTest.php b/tests/Todo/Feature/Http/Controllers/PlaylistControllerTest.php index 1372f9a942..0dced23678 100644 --- a/tests/Todo/Feature/Http/Controllers/PlaylistControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PlaylistControllerTest.php @@ -17,7 +17,7 @@ class PlaylistControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -52,7 +52,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -71,7 +71,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -89,7 +89,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -110,7 +110,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -128,7 +128,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/PlaylistTorrentControllerTest.php b/tests/Todo/Feature/Http/Controllers/PlaylistTorrentControllerTest.php index 67e71d806f..15686066c4 100644 --- a/tests/Todo/Feature/Http/Controllers/PlaylistTorrentControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PlaylistTorrentControllerTest.php @@ -14,7 +14,7 @@ class PlaylistTorrentControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/PollControllerTest.php b/tests/Todo/Feature/Http/Controllers/PollControllerTest.php index f4b81e64cb..bb7c505164 100644 --- a/tests/Todo/Feature/Http/Controllers/PollControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PollControllerTest.php @@ -14,7 +14,7 @@ class PollControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function result_returns_an_ok_response() + public function result_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -50,7 +50,7 @@ public function result_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -67,7 +67,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function vote_returns_an_ok_response() + public function vote_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -85,7 +85,7 @@ public function vote_returns_an_ok_response() /** * @test */ - public function vote_validates_with_a_form_request() + public function vote_validates_with_a_form_request(): void { $this->assertActionUsesFormRequest( \App\Http\Controllers\PollController::class, diff --git a/tests/Todo/Feature/Http/Controllers/PostControllerTest.php b/tests/Todo/Feature/Http/Controllers/PostControllerTest.php index d2f0073cd3..227517f745 100644 --- a/tests/Todo/Feature/Http/Controllers/PostControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PostControllerTest.php @@ -17,7 +17,7 @@ class PostControllerTest extends TestCase /** * @test */ - public function post_delete_returns_an_ok_response() + public function post_delete_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function post_delete_returns_an_ok_response() /** * @test */ - public function post_edit_returns_an_ok_response() + public function post_edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -53,7 +53,7 @@ public function post_edit_returns_an_ok_response() /** * @test */ - public function post_edit_form_returns_an_ok_response() + public function post_edit_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -76,7 +76,7 @@ public function post_edit_form_returns_an_ok_response() /** * @test */ - public function reply_returns_an_ok_response() + public function reply_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/PrivateMessageControllerTest.php b/tests/Todo/Feature/Http/Controllers/PrivateMessageControllerTest.php index 91c7bae5d9..916f41bca9 100644 --- a/tests/Todo/Feature/Http/Controllers/PrivateMessageControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/PrivateMessageControllerTest.php @@ -14,7 +14,7 @@ class PrivateMessageControllerTest extends TestCase /** * @test */ - public function delete_private_message_returns_an_ok_response() + public function delete_private_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -33,7 +33,7 @@ public function delete_private_message_returns_an_ok_response() /** * @test */ - public function get_private_message_by_id_returns_an_ok_response() + public function get_private_message_by_id_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -53,7 +53,7 @@ public function get_private_message_by_id_returns_an_ok_response() /** * @test */ - public function get_private_messages_returns_an_ok_response() + public function get_private_messages_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -72,7 +72,7 @@ public function get_private_messages_returns_an_ok_response() /** * @test */ - public function get_private_messages_sent_returns_an_ok_response() + public function get_private_messages_sent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -91,7 +91,7 @@ public function get_private_messages_sent_returns_an_ok_response() /** * @test */ - public function make_private_message_returns_an_ok_response() + public function make_private_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -111,7 +111,7 @@ public function make_private_message_returns_an_ok_response() /** * @test */ - public function mark_all_as_read_returns_an_ok_response() + public function mark_all_as_read_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -127,7 +127,7 @@ public function mark_all_as_read_returns_an_ok_response() /** * @test */ - public function reply_private_message_returns_an_ok_response() + public function reply_private_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -146,7 +146,7 @@ public function reply_private_message_returns_an_ok_response() /** * @test */ - public function search_p_m_inbox_returns_an_ok_response() + public function search_p_m_inbox_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -167,7 +167,7 @@ public function search_p_m_inbox_returns_an_ok_response() /** * @test */ - public function search_p_m_outbox_returns_an_ok_response() + public function search_p_m_outbox_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -188,7 +188,7 @@ public function search_p_m_outbox_returns_an_ok_response() /** * @test */ - public function send_private_message_returns_an_ok_response() + public function send_private_message_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/ReportControllerTest.php b/tests/Todo/Feature/Http/Controllers/ReportControllerTest.php index 9457497a30..ddae94b90e 100644 --- a/tests/Todo/Feature/Http/Controllers/ReportControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/ReportControllerTest.php @@ -17,7 +17,7 @@ class ReportControllerTest extends TestCase /** * @test */ - public function request_returns_an_ok_response() + public function request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -36,7 +36,7 @@ public function request_returns_an_ok_response() /** * @test */ - public function torrent_returns_an_ok_response() + public function torrent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -55,7 +55,7 @@ public function torrent_returns_an_ok_response() /** * @test */ - public function user_returns_an_ok_response() + public function user_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/RequestControllerTest.php b/tests/Todo/Feature/Http/Controllers/RequestControllerTest.php index 4c0835812f..f5c3644317 100644 --- a/tests/Todo/Feature/Http/Controllers/RequestControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/RequestControllerTest.php @@ -16,7 +16,7 @@ class RequestControllerTest extends TestCase /** * @test */ - public function add_bonus_returns_an_ok_response() + public function add_bonus_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function add_bonus_returns_an_ok_response() /** * @test */ - public function add_request_form_returns_an_ok_response() + public function add_request_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -57,7 +57,7 @@ public function add_request_form_returns_an_ok_response() /** * @test */ - public function approve_request_returns_an_ok_response() + public function approve_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -73,7 +73,7 @@ public function approve_request_returns_an_ok_response() /** * @test */ - public function claim_request_returns_an_ok_response() + public function claim_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -91,7 +91,7 @@ public function claim_request_returns_an_ok_response() /** * @test */ - public function delete_request_returns_an_ok_response() + public function delete_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -109,7 +109,7 @@ public function delete_request_returns_an_ok_response() /** * @test */ - public function edit_request_form_returns_an_ok_response() + public function edit_request_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -130,7 +130,7 @@ public function edit_request_form_returns_an_ok_response() /** * @test */ - public function faceted_returns_an_ok_response() + public function faceted_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -147,7 +147,7 @@ public function faceted_returns_an_ok_response() /** * @test */ - public function fill_request_returns_an_ok_response() + public function fill_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -165,7 +165,7 @@ public function fill_request_returns_an_ok_response() /** * @test */ - public function reject_request_returns_an_ok_response() + public function reject_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -181,7 +181,7 @@ public function reject_request_returns_an_ok_response() /** * @test */ - public function request_returns_an_ok_response() + public function request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -205,7 +205,7 @@ public function request_returns_an_ok_response() /** * @test */ - public function requests_returns_an_ok_response() + public function requests_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -231,7 +231,7 @@ public function requests_returns_an_ok_response() /** * @test */ - public function reset_request_returns_an_ok_response() + public function reset_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -247,7 +247,7 @@ public function reset_request_returns_an_ok_response() /** * @test */ - public function unclaim_request_returns_an_ok_response() + public function unclaim_request_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/RssControllerTest.php b/tests/Todo/Feature/Http/Controllers/RssControllerTest.php index a5b9a7897e..24b0deb6da 100644 --- a/tests/Todo/Feature/Http/Controllers/RssControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/RssControllerTest.php @@ -17,7 +17,7 @@ class RssControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -38,7 +38,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -56,7 +56,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -100,7 +100,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -117,7 +117,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -135,7 +135,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/SeedboxControllerTest.php b/tests/Todo/Feature/Http/Controllers/SeedboxControllerTest.php index fa0defb7c1..4b35a62aa7 100644 --- a/tests/Todo/Feature/Http/Controllers/SeedboxControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/SeedboxControllerTest.php @@ -17,7 +17,7 @@ class SeedboxControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/ApplicationControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/ApplicationControllerTest.php index 44672c5180..96921a4279 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/ApplicationControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/ApplicationControllerTest.php @@ -17,7 +17,7 @@ class ApplicationControllerTest extends TestCase /** * @test */ - public function approve_returns_an_ok_response() + public function approve_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -36,7 +36,7 @@ public function approve_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -54,7 +54,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function reject_returns_an_ok_response() + public function reject_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -73,7 +73,7 @@ public function reject_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/AuditControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/AuditControllerTest.php index fb3cf6a137..4aa975e1db 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/AuditControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/AuditControllerTest.php @@ -14,7 +14,7 @@ class AuditControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php index f2479d9091..bef4168161 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/AuthenticationControllerTest.php @@ -13,7 +13,7 @@ class AuthenticationControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/BackupControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/BackupControllerTest.php index 0afff0f407..b0983d3316 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/BackupControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/BackupControllerTest.php @@ -13,7 +13,7 @@ class BackupControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function database_returns_an_ok_response() + public function database_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -49,7 +49,7 @@ public function database_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -66,7 +66,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function download_returns_an_ok_response() + public function download_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -82,7 +82,7 @@ public function download_returns_an_ok_response() /** * @test */ - public function files_returns_an_ok_response() + public function files_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -100,7 +100,7 @@ public function files_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/BanControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/BanControllerTest.php index d4eea97d18..a4068dd4fb 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/BanControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/BanControllerTest.php @@ -17,7 +17,7 @@ class BanControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -35,7 +35,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -54,7 +54,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/FlushControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/FlushControllerTest.php index 2e3d07e6f6..e8b9e0fd3e 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/FlushControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/FlushControllerTest.php @@ -13,7 +13,7 @@ class FlushControllerTest extends TestCase /** * @test */ - public function chat_returns_an_ok_response() + public function chat_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -29,7 +29,7 @@ public function chat_returns_an_ok_response() /** * @test */ - public function peers_returns_an_ok_response() + public function peers_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/ForumControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/ForumControllerTest.php index 728659c79c..965f0c3947 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/ForumControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/ForumControllerTest.php @@ -17,7 +17,7 @@ class ForumControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -36,7 +36,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -54,7 +54,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -75,7 +75,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -93,7 +93,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -111,7 +111,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/HomeControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/HomeControllerTest.php index 3f2a166e31..63bf22b06e 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/HomeControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/HomeControllerTest.php @@ -13,7 +13,7 @@ class HomeControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/ModerationControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/ModerationControllerTest.php index e7cff22f75..1a6c0f1703 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/ModerationControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/ModerationControllerTest.php @@ -13,7 +13,7 @@ class ModerationControllerTest extends TestCase /** * @test */ - public function approve_returns_an_ok_response() + public function approve_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -29,7 +29,7 @@ public function approve_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -50,7 +50,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function postpone_returns_an_ok_response() + public function postpone_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -68,7 +68,7 @@ public function postpone_returns_an_ok_response() /** * @test */ - public function reject_returns_an_ok_response() + public function reject_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/PollControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/PollControllerTest.php index 91834e6a82..45815c5fb4 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/PollControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/PollControllerTest.php @@ -14,7 +14,7 @@ class PollControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -49,7 +49,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -68,7 +68,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -86,7 +86,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function store_validates_with_a_form_request() + public function store_validates_with_a_form_request(): void { $this->assertActionUsesFormRequest( \App\Http\Controllers\Staff\PollController::class, diff --git a/tests/Todo/Feature/Http/Controllers/Staff/ReportControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/ReportControllerTest.php index d795e5ddb4..1073c66c36 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/ReportControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/ReportControllerTest.php @@ -17,7 +17,7 @@ class ReportControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -35,7 +35,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -55,7 +55,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/RssControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/RssControllerTest.php index c8a5f50ee9..8e8258b641 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/RssControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/RssControllerTest.php @@ -17,7 +17,7 @@ class RssControllerTest extends TestCase /** * @test */ - public function create_returns_an_ok_response() + public function create_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -38,7 +38,7 @@ public function create_returns_an_ok_response() /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -56,7 +56,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -79,7 +79,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -98,7 +98,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -116,7 +116,7 @@ public function store_returns_an_ok_response() /** * @test */ - public function update_returns_an_ok_response() + public function update_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/SeedboxControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/SeedboxControllerTest.php index 23d5b358c3..00fbc3c8b6 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/SeedboxControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/SeedboxControllerTest.php @@ -14,7 +14,7 @@ class SeedboxControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/UserControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/UserControllerTest.php index 76b7e79489..0d8d198cf0 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/UserControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/UserControllerTest.php @@ -16,7 +16,7 @@ class UserControllerTest extends TestCase /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -35,7 +35,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -57,7 +57,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function permissions_returns_an_ok_response() + public function permissions_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -76,7 +76,7 @@ public function permissions_returns_an_ok_response() /** * @test */ - public function search_returns_an_ok_response() + public function search_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -94,7 +94,7 @@ public function search_returns_an_ok_response() /** * @test */ - public function settings_returns_an_ok_response() + public function settings_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/VersionControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/VersionControllerTest.php index 4afec99d58..893ce5705f 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/VersionControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/VersionControllerTest.php @@ -13,7 +13,7 @@ class VersionControllerTest extends TestCase /** * @test */ - public function check_version_returns_an_ok_response() + public function check_version_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/Staff/WarningControllerTest.php b/tests/Todo/Feature/Http/Controllers/Staff/WarningControllerTest.php index e3d685514f..eb26108abf 100644 --- a/tests/Todo/Feature/Http/Controllers/Staff/WarningControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/Staff/WarningControllerTest.php @@ -13,7 +13,7 @@ class WarningControllerTest extends TestCase /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/StatsControllerTest.php b/tests/Todo/Feature/Http/Controllers/StatsControllerTest.php index a6bfaf2d11..5e4eba97d9 100644 --- a/tests/Todo/Feature/Http/Controllers/StatsControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/StatsControllerTest.php @@ -13,7 +13,7 @@ class StatsControllerTest extends TestCase /** * @test */ - public function bankers_returns_an_ok_response() + public function bankers_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function bankers_returns_an_ok_response() /** * @test */ - public function bountied_returns_an_ok_response() + public function bountied_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -49,7 +49,7 @@ public function bountied_returns_an_ok_response() /** * @test */ - public function completed_returns_an_ok_response() + public function completed_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -67,7 +67,7 @@ public function completed_returns_an_ok_response() /** * @test */ - public function dead_returns_an_ok_response() + public function dead_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -85,7 +85,7 @@ public function dead_returns_an_ok_response() /** * @test */ - public function downloaded_returns_an_ok_response() + public function downloaded_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -103,7 +103,7 @@ public function downloaded_returns_an_ok_response() /** * @test */ - public function dying_returns_an_ok_response() + public function dying_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -121,7 +121,7 @@ public function dying_returns_an_ok_response() /** * @test */ - public function group_returns_an_ok_response() + public function group_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -140,7 +140,7 @@ public function group_returns_an_ok_response() /** * @test */ - public function groups_returns_an_ok_response() + public function groups_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -158,7 +158,7 @@ public function groups_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -194,7 +194,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function languages_returns_an_ok_response() + public function languages_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -212,7 +212,7 @@ public function languages_returns_an_ok_response() /** * @test */ - public function leeched_returns_an_ok_response() + public function leeched_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -230,7 +230,7 @@ public function leeched_returns_an_ok_response() /** * @test */ - public function leechers_returns_an_ok_response() + public function leechers_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -248,7 +248,7 @@ public function leechers_returns_an_ok_response() /** * @test */ - public function seeded_returns_an_ok_response() + public function seeded_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -266,7 +266,7 @@ public function seeded_returns_an_ok_response() /** * @test */ - public function seeders_returns_an_ok_response() + public function seeders_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -284,7 +284,7 @@ public function seeders_returns_an_ok_response() /** * @test */ - public function seedsize_returns_an_ok_response() + public function seedsize_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -302,7 +302,7 @@ public function seedsize_returns_an_ok_response() /** * @test */ - public function seedtime_returns_an_ok_response() + public function seedtime_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -320,7 +320,7 @@ public function seedtime_returns_an_ok_response() /** * @test */ - public function uploaded_returns_an_ok_response() + public function uploaded_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -338,7 +338,7 @@ public function uploaded_returns_an_ok_response() /** * @test */ - public function uploaders_returns_an_ok_response() + public function uploaders_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/SubscriptionControllerTest.php b/tests/Todo/Feature/Http/Controllers/SubscriptionControllerTest.php index 5fd92d9158..803a9a548a 100644 --- a/tests/Todo/Feature/Http/Controllers/SubscriptionControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/SubscriptionControllerTest.php @@ -19,7 +19,7 @@ class SubscriptionControllerTest extends TestCase /** * @test */ - public function subscribe_forum_returns_an_ok_response() + public function subscribe_forum_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -37,7 +37,7 @@ public function subscribe_forum_returns_an_ok_response() /** * @test */ - public function subscribe_topic_returns_an_ok_response() + public function subscribe_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -55,7 +55,7 @@ public function subscribe_topic_returns_an_ok_response() /** * @test */ - public function unsubscribe_forum_returns_an_ok_response() + public function unsubscribe_forum_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -73,7 +73,7 @@ public function unsubscribe_forum_returns_an_ok_response() /** * @test */ - public function unsubscribe_topic_returns_an_ok_response() + public function unsubscribe_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/ThankControllerTest.php b/tests/Todo/Feature/Http/Controllers/ThankControllerTest.php index 56fc8499cf..f63dedb41e 100644 --- a/tests/Todo/Feature/Http/Controllers/ThankControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/ThankControllerTest.php @@ -17,7 +17,7 @@ class ThankControllerTest extends TestCase /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/TopicControllerTest.php b/tests/Todo/Feature/Http/Controllers/TopicControllerTest.php index bfed2e1c00..2896d67e2f 100644 --- a/tests/Todo/Feature/Http/Controllers/TopicControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/TopicControllerTest.php @@ -17,7 +17,7 @@ class TopicControllerTest extends TestCase /** * @test */ - public function add_form_returns_an_ok_response() + public function add_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function add_form_returns_an_ok_response() /** * @test */ - public function close_topic_returns_an_ok_response() + public function close_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -51,7 +51,7 @@ public function close_topic_returns_an_ok_response() /** * @test */ - public function delete_topic_returns_an_ok_response() + public function delete_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -68,7 +68,7 @@ public function delete_topic_returns_an_ok_response() /** * @test */ - public function edit_form_returns_an_ok_response() + public function edit_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -88,7 +88,7 @@ public function edit_form_returns_an_ok_response() /** * @test */ - public function edit_topic_returns_an_ok_response() + public function edit_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -107,7 +107,7 @@ public function edit_topic_returns_an_ok_response() /** * @test */ - public function new_topic_returns_an_ok_response() + public function new_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -126,7 +126,7 @@ public function new_topic_returns_an_ok_response() /** * @test */ - public function open_topic_returns_an_ok_response() + public function open_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -143,7 +143,7 @@ public function open_topic_returns_an_ok_response() /** * @test */ - public function pin_topic_returns_an_ok_response() + public function pin_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -160,7 +160,7 @@ public function pin_topic_returns_an_ok_response() /** * @test */ - public function topic_returns_an_ok_response() + public function topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -177,7 +177,7 @@ public function topic_returns_an_ok_response() /** * @test */ - public function unpin_topic_returns_an_ok_response() + public function unpin_topic_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/TopicLabelControllerTest.php b/tests/Todo/Feature/Http/Controllers/TopicLabelControllerTest.php index a10afa924d..d1253746c2 100644 --- a/tests/Todo/Feature/Http/Controllers/TopicLabelControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/TopicLabelControllerTest.php @@ -16,7 +16,7 @@ class TopicLabelControllerTest extends TestCase /** * @test */ - public function approve_returns_an_ok_response() + public function approve_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -32,7 +32,7 @@ public function approve_returns_an_ok_response() /** * @test */ - public function bug_returns_an_ok_response() + public function bug_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -48,7 +48,7 @@ public function bug_returns_an_ok_response() /** * @test */ - public function deny_returns_an_ok_response() + public function deny_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -64,7 +64,7 @@ public function deny_returns_an_ok_response() /** * @test */ - public function implement_returns_an_ok_response() + public function implement_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -80,7 +80,7 @@ public function implement_returns_an_ok_response() /** * @test */ - public function invalid_returns_an_ok_response() + public function invalid_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -96,7 +96,7 @@ public function invalid_returns_an_ok_response() /** * @test */ - public function solve_returns_an_ok_response() + public function solve_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -112,7 +112,7 @@ public function solve_returns_an_ok_response() /** * @test */ - public function suggest_returns_an_ok_response() + public function suggest_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/TorrentControllerTest.php b/tests/Todo/Feature/Http/Controllers/TorrentControllerTest.php index 894573ff07..c0b2eab6c4 100644 --- a/tests/Todo/Feature/Http/Controllers/TorrentControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/TorrentControllerTest.php @@ -14,7 +14,7 @@ class TorrentControllerTest extends TestCase /** * @test */ - public function bump_torrent_returns_an_ok_response() + public function bump_torrent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function bump_torrent_returns_an_ok_response() /** * @test */ - public function card_layout_returns_an_ok_response() + public function card_layout_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -51,7 +51,7 @@ public function card_layout_returns_an_ok_response() /** * @test */ - public function delete_torrent_returns_an_ok_response() + public function delete_torrent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -69,7 +69,7 @@ public function delete_torrent_returns_an_ok_response() /** * @test */ - public function download_returns_an_ok_response() + public function download_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -86,7 +86,7 @@ public function download_returns_an_ok_response() /** * @test */ - public function download_check_returns_an_ok_response() + public function download_check_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -106,7 +106,7 @@ public function download_check_returns_an_ok_response() /** * @test */ - public function edit_returns_an_ok_response() + public function edit_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -125,7 +125,7 @@ public function edit_returns_an_ok_response() /** * @test */ - public function edit_form_returns_an_ok_response() + public function edit_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -146,7 +146,7 @@ public function edit_form_returns_an_ok_response() /** * @test */ - public function faceted_returns_an_ok_response() + public function faceted_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -163,7 +163,7 @@ public function faceted_returns_an_ok_response() /** * @test */ - public function filtered_returns_an_ok_response() + public function filtered_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -179,7 +179,7 @@ public function filtered_returns_an_ok_response() /** * @test */ - public function freeleech_token_returns_an_ok_response() + public function freeleech_token_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -196,7 +196,7 @@ public function freeleech_token_returns_an_ok_response() /** * @test */ - public function grant_double_up_returns_an_ok_response() + public function grant_double_up_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -213,7 +213,7 @@ public function grant_double_up_returns_an_ok_response() /** * @test */ - public function grant_f_l_returns_an_ok_response() + public function grant_f_l_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -230,7 +230,7 @@ public function grant_f_l_returns_an_ok_response() /** * @test */ - public function grant_featured_returns_an_ok_response() + public function grant_featured_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -247,7 +247,7 @@ public function grant_featured_returns_an_ok_response() /** * @test */ - public function grouping_layout_returns_an_ok_response() + public function grouping_layout_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -264,7 +264,7 @@ public function grouping_layout_returns_an_ok_response() /** * @test */ - public function history_returns_an_ok_response() + public function history_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -284,7 +284,7 @@ public function history_returns_an_ok_response() /** * @test */ - public function peers_returns_an_ok_response() + public function peers_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -304,7 +304,7 @@ public function peers_returns_an_ok_response() /** * @test */ - public function reseed_torrent_returns_an_ok_response() + public function reseed_torrent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -321,7 +321,7 @@ public function reseed_torrent_returns_an_ok_response() /** * @test */ - public function similar_returns_an_ok_response() + public function similar_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -344,7 +344,7 @@ public function similar_returns_an_ok_response() /** * @test */ - public function sticky_returns_an_ok_response() + public function sticky_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -361,7 +361,7 @@ public function sticky_returns_an_ok_response() /** * @test */ - public function torrent_returns_an_ok_response() + public function torrent_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -402,7 +402,7 @@ public function torrent_returns_an_ok_response() /** * @test */ - public function torrents_returns_an_ok_response() + public function torrents_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -427,7 +427,7 @@ public function torrents_returns_an_ok_response() /** * @test */ - public function upload_returns_an_ok_response() + public function upload_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -445,7 +445,7 @@ public function upload_returns_an_ok_response() /** * @test */ - public function upload_form_returns_an_ok_response() + public function upload_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/UserControllerTest.php b/tests/Todo/Feature/Http/Controllers/UserControllerTest.php index 9b0bfa36cb..924ddc80b7 100644 --- a/tests/Todo/Feature/Http/Controllers/UserControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/UserControllerTest.php @@ -16,7 +16,7 @@ class UserControllerTest extends TestCase /** * @test */ - public function accept_rules_returns_an_ok_response() + public function accept_rules_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function accept_rules_returns_an_ok_response() /** * @test */ - public function active_returns_an_ok_response() + public function active_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -59,7 +59,7 @@ public function active_returns_an_ok_response() /** * @test */ - public function change_api_token_returns_an_ok_response() + public function change_api_token_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -78,7 +78,7 @@ public function change_api_token_returns_an_ok_response() /** * @test */ - public function change_p_i_d_returns_an_ok_response() + public function change_p_i_d_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -97,7 +97,7 @@ public function change_p_i_d_returns_an_ok_response() /** * @test */ - public function change_r_i_d_returns_an_ok_response() + public function change_r_i_d_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -116,7 +116,7 @@ public function change_r_i_d_returns_an_ok_response() /** * @test */ - public function change_settings_returns_an_ok_response() + public function change_settings_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -135,7 +135,7 @@ public function change_settings_returns_an_ok_response() /** * @test */ - public function disable_notifications_returns_an_ok_response() + public function disable_notifications_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -152,7 +152,7 @@ public function disable_notifications_returns_an_ok_response() /** * @test */ - public function download_history_torrents_returns_an_ok_response() + public function download_history_torrents_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -169,7 +169,7 @@ public function download_history_torrents_returns_an_ok_response() /** * @test */ - public function downloads_returns_an_ok_response() + public function downloads_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -194,7 +194,7 @@ public function downloads_returns_an_ok_response() /** * @test */ - public function edit_profile_returns_an_ok_response() + public function edit_profile_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -213,7 +213,7 @@ public function edit_profile_returns_an_ok_response() /** * @test */ - public function edit_profile_form_returns_an_ok_response() + public function edit_profile_form_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -233,7 +233,7 @@ public function edit_profile_form_returns_an_ok_response() /** * @test */ - public function enable_notifications_returns_an_ok_response() + public function enable_notifications_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -250,7 +250,7 @@ public function enable_notifications_returns_an_ok_response() /** * @test */ - public function followers_returns_an_ok_response() + public function followers_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -271,7 +271,7 @@ public function followers_returns_an_ok_response() /** * @test */ - public function get_bans_returns_an_ok_response() + public function get_bans_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -291,7 +291,7 @@ public function get_bans_returns_an_ok_response() /** * @test */ - public function make_hidden_returns_an_ok_response() + public function make_hidden_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -308,7 +308,7 @@ public function make_hidden_returns_an_ok_response() /** * @test */ - public function make_private_returns_an_ok_response() + public function make_private_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -325,7 +325,7 @@ public function make_private_returns_an_ok_response() /** * @test */ - public function make_public_returns_an_ok_response() + public function make_public_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -342,7 +342,7 @@ public function make_public_returns_an_ok_response() /** * @test */ - public function make_visible_returns_an_ok_response() + public function make_visible_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -359,7 +359,7 @@ public function make_visible_returns_an_ok_response() /** * @test */ - public function my_filter_returns_an_ok_response() + public function my_filter_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -379,7 +379,7 @@ public function my_filter_returns_an_ok_response() /** * @test */ - public function notification_returns_an_ok_response() + public function notification_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -399,7 +399,7 @@ public function notification_returns_an_ok_response() /** * @test */ - public function posts_returns_an_ok_response() + public function posts_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -420,7 +420,7 @@ public function posts_returns_an_ok_response() /** * @test */ - public function privacy_returns_an_ok_response() + public function privacy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -440,7 +440,7 @@ public function privacy_returns_an_ok_response() /** * @test */ - public function requested_returns_an_ok_response() + public function requested_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -461,7 +461,7 @@ public function requested_returns_an_ok_response() /** * @test */ - public function resurrections_returns_an_ok_response() + public function resurrections_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -482,7 +482,7 @@ public function resurrections_returns_an_ok_response() /** * @test */ - public function security_returns_an_ok_response() + public function security_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -501,7 +501,7 @@ public function security_returns_an_ok_response() /** * @test */ - public function seeds_returns_an_ok_response() + public function seeds_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -526,7 +526,7 @@ public function seeds_returns_an_ok_response() /** * @test */ - public function settings_returns_an_ok_response() + public function settings_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -546,7 +546,7 @@ public function settings_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -578,7 +578,7 @@ public function show_returns_an_ok_response() /** * @test */ - public function topics_returns_an_ok_response() + public function topics_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -599,7 +599,7 @@ public function topics_returns_an_ok_response() /** * @test */ - public function torrents_returns_an_ok_response() + public function torrents_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -624,7 +624,7 @@ public function torrents_returns_an_ok_response() /** * @test */ - public function unsatisfieds_returns_an_ok_response() + public function unsatisfieds_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -649,7 +649,7 @@ public function unsatisfieds_returns_an_ok_response() /** * @test */ - public function uploads_returns_an_ok_response() + public function uploads_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/WarningControllerTest.php b/tests/Todo/Feature/Http/Controllers/WarningControllerTest.php index 11d35a3e93..a339510d5c 100644 --- a/tests/Todo/Feature/Http/Controllers/WarningControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/WarningControllerTest.php @@ -17,7 +17,7 @@ class WarningControllerTest extends TestCase /** * @test */ - public function deactivate_returns_an_ok_response() + public function deactivate_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +34,7 @@ public function deactivate_returns_an_ok_response() /** * @test */ - public function deactivate_all_warnings_returns_an_ok_response() + public function deactivate_all_warnings_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -51,7 +51,7 @@ public function deactivate_all_warnings_returns_an_ok_response() /** * @test */ - public function delete_all_warnings_returns_an_ok_response() + public function delete_all_warnings_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -68,7 +68,7 @@ public function delete_all_warnings_returns_an_ok_response() /** * @test */ - public function delete_warning_returns_an_ok_response() + public function delete_warning_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -85,7 +85,7 @@ public function delete_warning_returns_an_ok_response() /** * @test */ - public function restore_warning_returns_an_ok_response() + public function restore_warning_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -102,7 +102,7 @@ public function restore_warning_returns_an_ok_response() /** * @test */ - public function show_returns_an_ok_response() + public function show_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Feature/Http/Controllers/WishControllerTest.php b/tests/Todo/Feature/Http/Controllers/WishControllerTest.php index 203779fa6a..36c78c7efd 100644 --- a/tests/Todo/Feature/Http/Controllers/WishControllerTest.php +++ b/tests/Todo/Feature/Http/Controllers/WishControllerTest.php @@ -14,7 +14,7 @@ class WishControllerTest extends TestCase /** * @test */ - public function destroy_returns_an_ok_response() + public function destroy_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -31,7 +31,7 @@ public function destroy_returns_an_ok_response() /** * @test */ - public function index_returns_an_ok_response() + public function index_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -52,7 +52,7 @@ public function index_returns_an_ok_response() /** * @test */ - public function store_returns_an_ok_response() + public function store_returns_an_ok_response(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/AutoBanDisposableUsersTest.php b/tests/Todo/Unit/Console/Commands/AutoBanDisposableUsersTest.php index 465696743a..953da02068 100644 --- a/tests/Todo/Unit/Console/Commands/AutoBanDisposableUsersTest.php +++ b/tests/Todo/Unit/Console/Commands/AutoBanDisposableUsersTest.php @@ -12,7 +12,7 @@ class AutoBanDisposableUsersTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/AutoNerdStatTest.php b/tests/Todo/Unit/Console/Commands/AutoNerdStatTest.php index 255eee35af..e6b6e991d4 100644 --- a/tests/Todo/Unit/Console/Commands/AutoNerdStatTest.php +++ b/tests/Todo/Unit/Console/Commands/AutoNerdStatTest.php @@ -12,7 +12,7 @@ class AutoNerdStatTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/AutoRevokePermissionsTest.php b/tests/Todo/Unit/Console/Commands/AutoRevokePermissionsTest.php index f58140ab54..b522e735ed 100644 --- a/tests/Todo/Unit/Console/Commands/AutoRevokePermissionsTest.php +++ b/tests/Todo/Unit/Console/Commands/AutoRevokePermissionsTest.php @@ -12,7 +12,7 @@ class AutoRevokePermissionsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/FetchGenresTest.php b/tests/Todo/Unit/Console/Commands/FetchGenresTest.php index 590be27530..c642181487 100644 --- a/tests/Todo/Unit/Console/Commands/FetchGenresTest.php +++ b/tests/Todo/Unit/Console/Commands/FetchGenresTest.php @@ -12,7 +12,7 @@ class FetchGenresTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/FetchReleaseYearsTest.php b/tests/Todo/Unit/Console/Commands/FetchReleaseYearsTest.php index 8bb7463d4a..c1010a27fa 100644 --- a/tests/Todo/Unit/Console/Commands/FetchReleaseYearsTest.php +++ b/tests/Todo/Unit/Console/Commands/FetchReleaseYearsTest.php @@ -12,7 +12,7 @@ class FetchReleaseYearsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/GitUpdaterTest.php b/tests/Todo/Unit/Console/Commands/GitUpdaterTest.php index 02bda42e37..d3653b6e8f 100644 --- a/tests/Todo/Unit/Console/Commands/GitUpdaterTest.php +++ b/tests/Todo/Unit/Console/Commands/GitUpdaterTest.php @@ -12,7 +12,7 @@ class GitUpdaterTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/TestMailSettingsTest.php b/tests/Todo/Unit/Console/Commands/TestMailSettingsTest.php index dfcd9d277c..938249abd0 100644 --- a/tests/Todo/Unit/Console/Commands/TestMailSettingsTest.php +++ b/tests/Todo/Unit/Console/Commands/TestMailSettingsTest.php @@ -12,7 +12,7 @@ class TestMailSettingsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Console/Commands/VendorCleanupTest.php b/tests/Todo/Unit/Console/Commands/VendorCleanupTest.php index 4386f73ec2..dd594a4e36 100644 --- a/tests/Todo/Unit/Console/Commands/VendorCleanupTest.php +++ b/tests/Todo/Unit/Console/Commands/VendorCleanupTest.php @@ -12,7 +12,7 @@ class VendorCleanupTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Http/Requests/StorePollTest.php b/tests/Todo/Unit/Http/Requests/StorePollTest.php index 873ae2d53c..043df9898c 100644 --- a/tests/Todo/Unit/Http/Requests/StorePollTest.php +++ b/tests/Todo/Unit/Http/Requests/StorePollTest.php @@ -9,8 +9,7 @@ */ class StorePollTest extends TestCase { - /** @var \App\Http\Requests\StorePoll */ - private $subject; + private \App\Http\Requests\StorePoll $subject; protected function setUp(): void { @@ -22,7 +21,7 @@ protected function setUp(): void /** * @test */ - public function authorize() + public function authorize(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +33,7 @@ public function authorize() /** * @test */ - public function rules() + public function rules(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -46,7 +45,7 @@ public function rules() /** * @test */ - public function messages() + public function messages(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Todo/Unit/Http/Requests/VoteOnPollTest.php b/tests/Todo/Unit/Http/Requests/VoteOnPollTest.php index d63ad27c5d..76dfe58016 100644 --- a/tests/Todo/Unit/Http/Requests/VoteOnPollTest.php +++ b/tests/Todo/Unit/Http/Requests/VoteOnPollTest.php @@ -9,8 +9,7 @@ */ class VoteOnPollTest extends TestCase { - /** @var \App\Http\Requests\VoteOnPoll */ - private $subject; + private \App\Http\Requests\VoteOnPoll $subject; protected function setUp(): void { @@ -22,7 +21,7 @@ protected function setUp(): void /** * @test */ - public function authorize() + public function authorize(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -34,7 +33,7 @@ public function authorize() /** * @test */ - public function rules() + public function rules(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); @@ -46,7 +45,7 @@ public function rules() /** * @test */ - public function messages() + public function messages(): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); diff --git a/tests/Unit/Console/Commands/AutoBanTest.php b/tests/Unit/Console/Commands/AutoBanTest.php index 483e3ea4d3..a236bfdcda 100644 --- a/tests/Unit/Console/Commands/AutoBanTest.php +++ b/tests/Unit/Console/Commands/AutoBanTest.php @@ -12,7 +12,7 @@ class AutoBanTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:ban') ->expectsOutput('Automated User Banning Command Complete') diff --git a/tests/Unit/Console/Commands/AutoBonAllocationTest.php b/tests/Unit/Console/Commands/AutoBonAllocationTest.php index d02e104d82..6d50f34037 100644 --- a/tests/Unit/Console/Commands/AutoBonAllocationTest.php +++ b/tests/Unit/Console/Commands/AutoBonAllocationTest.php @@ -12,7 +12,7 @@ class AutoBonAllocationTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:bon_allocation') ->expectsOutput('Automated BON Allocation Command Complete') diff --git a/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php b/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php index 1ccdd3bea0..f69e42f357 100644 --- a/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php +++ b/tests/Unit/Console/Commands/AutoCorrectHistoryTest.php @@ -12,7 +12,7 @@ class AutoCorrectHistoryTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:correct_history') ->expectsOutput('Automated History Record Correction Command Complete') diff --git a/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php b/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php index 5866380d98..c08c0f5f30 100644 --- a/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php +++ b/tests/Unit/Console/Commands/AutoDeactivateWarningTest.php @@ -12,7 +12,7 @@ class AutoDeactivateWarningTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:deactivate_warning') ->expectsOutput('Automated Warning Deativation Command Complete') diff --git a/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php b/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php index 186c828375..ba4dfa9d98 100644 --- a/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php +++ b/tests/Unit/Console/Commands/AutoDisableInactiveUsersTest.php @@ -12,7 +12,7 @@ class AutoDisableInactiveUsersTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:disable_inactive_users') ->expectsOutput('Automated User Disable Command Complete') diff --git a/tests/Unit/Console/Commands/AutoFlushPeersTest.php b/tests/Unit/Console/Commands/AutoFlushPeersTest.php index a5d1666ad9..029bb6c7ac 100644 --- a/tests/Unit/Console/Commands/AutoFlushPeersTest.php +++ b/tests/Unit/Console/Commands/AutoFlushPeersTest.php @@ -12,7 +12,7 @@ class AutoFlushPeersTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:flush_peers') ->expectsOutput('Automated Flush Ghost Peers Command Complete') diff --git a/tests/Unit/Console/Commands/AutoGraveyardTest.php b/tests/Unit/Console/Commands/AutoGraveyardTest.php index b95c1f2f10..e46c7e4296 100644 --- a/tests/Unit/Console/Commands/AutoGraveyardTest.php +++ b/tests/Unit/Console/Commands/AutoGraveyardTest.php @@ -12,7 +12,7 @@ class AutoGraveyardTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:graveyard') ->expectsOutput('Automated Graveyard Rewards Command Complete') diff --git a/tests/Unit/Console/Commands/AutoGroupTest.php b/tests/Unit/Console/Commands/AutoGroupTest.php index 28881bffae..b4a2611696 100644 --- a/tests/Unit/Console/Commands/AutoGroupTest.php +++ b/tests/Unit/Console/Commands/AutoGroupTest.php @@ -12,7 +12,7 @@ class AutoGroupTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:group') ->expectsOutput('Automated User Group Command Complete') diff --git a/tests/Unit/Console/Commands/AutoHighspeedTagTest.php b/tests/Unit/Console/Commands/AutoHighspeedTagTest.php index aec1a3d4ad..525c472431 100644 --- a/tests/Unit/Console/Commands/AutoHighspeedTagTest.php +++ b/tests/Unit/Console/Commands/AutoHighspeedTagTest.php @@ -12,7 +12,7 @@ class AutoHighspeedTagTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:highspeed_tag') ->expectsOutput('Automated High Speed Torrents Command Complete') diff --git a/tests/Unit/Console/Commands/AutoPreWarningTest.php b/tests/Unit/Console/Commands/AutoPreWarningTest.php index 899b8f8603..16ab8fc803 100644 --- a/tests/Unit/Console/Commands/AutoPreWarningTest.php +++ b/tests/Unit/Console/Commands/AutoPreWarningTest.php @@ -12,7 +12,7 @@ class AutoPreWarningTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:prewarning') ->expectsOutput('Automated User Pre-Warning Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php b/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php index 0b6be4eace..e2593a2ff4 100644 --- a/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php +++ b/tests/Unit/Console/Commands/AutoRecycleAuditsTest.php @@ -12,7 +12,7 @@ class AutoRecycleAuditsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:recycle_activity_log') ->expectsOutput('Automated Purge Old Audits Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php b/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php index 8c73d940f0..16fec6c35c 100644 --- a/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php +++ b/tests/Unit/Console/Commands/AutoRecycleClaimedTorrentRequestsTest.php @@ -12,7 +12,7 @@ class AutoRecycleClaimedTorrentRequestsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:recycle_claimed_torrent_requests') ->expectsOutput('Automated Request Claim Reset Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php b/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php index 06c79ad1a3..61eb9c8b02 100644 --- a/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php +++ b/tests/Unit/Console/Commands/AutoRecycleFailedLoginsTest.php @@ -12,7 +12,7 @@ class AutoRecycleFailedLoginsTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:recycle_failed_logins') ->expectsOutput('Automated Purge Old Failed Logins Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php b/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php index 27387d576c..338a095c6e 100644 --- a/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php +++ b/tests/Unit/Console/Commands/AutoRecycleInvitesTest.php @@ -12,7 +12,7 @@ class AutoRecycleInvitesTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:recycle_invites') ->expectsOutput('Automated Purge Unaccepted Invites Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php b/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php index f182919d78..939099a3e4 100644 --- a/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php +++ b/tests/Unit/Console/Commands/AutoRemoveFeaturedTorrentTest.php @@ -12,7 +12,7 @@ class AutoRemoveFeaturedTorrentTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:remove_featured_torrent') ->expectsOutput('Automated Removal Featured Torrents Command Complete') diff --git a/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php b/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php index 11a899d3a5..bce0da533d 100644 --- a/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php +++ b/tests/Unit/Console/Commands/AutoRemovePersonalFreeleechTest.php @@ -12,7 +12,7 @@ class AutoRemovePersonalFreeleechTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:remove_personal_freeleech') ->expectsOutput('Automated Removal User Personal Freeleech Command Complete') diff --git a/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php b/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php index 23c9b14e5c..07c749ca63 100644 --- a/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php +++ b/tests/Unit/Console/Commands/AutoSoftDeleteDisabledUsersTest.php @@ -12,7 +12,7 @@ class AutoSoftDeleteDisabledUsersTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:softdelete_disabled_users') ->expectsOutput('Automated Soft Delete Disabled Users Command Complete') diff --git a/tests/Unit/Console/Commands/AutoWarningTest.php b/tests/Unit/Console/Commands/AutoWarningTest.php index 105bfd8ae7..6438751bca 100644 --- a/tests/Unit/Console/Commands/AutoWarningTest.php +++ b/tests/Unit/Console/Commands/AutoWarningTest.php @@ -12,7 +12,7 @@ class AutoWarningTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:warning') ->expectsOutput('Automated User Warning Command Complete') diff --git a/tests/Unit/Console/Commands/ClearCacheTest.php b/tests/Unit/Console/Commands/ClearCacheTest.php index c794e9d285..353354a892 100644 --- a/tests/Unit/Console/Commands/ClearCacheTest.php +++ b/tests/Unit/Console/Commands/ClearCacheTest.php @@ -12,7 +12,7 @@ class ClearCacheTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('clear:all_cache') ->expectsOutput('Clearing several common cache\'s ...') diff --git a/tests/Unit/Console/Commands/SetCacheTest.php b/tests/Unit/Console/Commands/SetCacheTest.php index c2c07397a0..7f5034c1f9 100644 --- a/tests/Unit/Console/Commands/SetCacheTest.php +++ b/tests/Unit/Console/Commands/SetCacheTest.php @@ -12,7 +12,7 @@ class SetCacheTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('set:all_cache') ->expectsOutput('Setting several common cache\'s ...') diff --git a/tests/Unit/Console/Commands/SyncPeersTest.php b/tests/Unit/Console/Commands/SyncPeersTest.php index 97cb08692a..fd17d08e66 100644 --- a/tests/Unit/Console/Commands/SyncPeersTest.php +++ b/tests/Unit/Console/Commands/SyncPeersTest.php @@ -12,7 +12,7 @@ class SyncPeersTest extends TestCase /** * @test */ - public function it_runs_successfully() + public function it_runs_successfully(): void { $this->artisan('auto:sync_peers') ->expectsOutput('Torrent Peer Syncing Command Complete') diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php index 06ece2c2c0..35a4ae64c5 100644 --- a/tests/Unit/ExampleTest.php +++ b/tests/Unit/ExampleTest.php @@ -8,10 +8,8 @@ class ExampleTest extends TestCase { /** * A basic test example. - * - * @return void */ - public function testBasicTest() + public function testBasicTest(): void { $this->assertTrue(true); } From 47cb6bdffd24090934541d3b0d9e5e2cae1d8865 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Fri, 7 Jan 2022 23:36:34 -0500 Subject: [PATCH 02/18] chore: blade directive - Modernize outdated HTML and Blade directives with the latest equivalents --- .../views/Staff/application/index.blade.php | 32 +- .../views/Staff/application/show.blade.php | 62 +-- .../views/Staff/article/create.blade.php | 18 +- resources/views/Staff/article/edit.blade.php | 18 +- resources/views/Staff/article/index.blade.php | 16 +- resources/views/Staff/audit/index.blade.php | 18 +- .../Staff/authentication/index.blade.php | 20 +- resources/views/Staff/backup/index.blade.php | 10 +- resources/views/Staff/ban/index.blade.php | 24 +- .../views/Staff/category/create.blade.php | 48 +-- resources/views/Staff/category/edit.blade.php | 50 +-- .../views/Staff/category/index.blade.php | 26 +- resources/views/Staff/chat/bot/edit.blade.php | 30 +- .../views/Staff/chat/bot/index.blade.php | 26 +- .../Staff/chat/room/chatroom_modals.blade.php | 10 +- .../views/Staff/chat/room/index.blade.php | 20 +- .../chat/status/chatstatuses_modals.blade.php | 12 +- .../views/Staff/chat/status/index.blade.php | 24 +- resources/views/Staff/cheater/index.blade.php | 20 +- resources/views/Staff/command/index.blade.php | 6 +- .../views/Staff/dashboard/index.blade.php | 6 +- resources/views/Staff/forum/create.blade.php | 8 +- resources/views/Staff/forum/edit.blade.php | 12 +- resources/views/Staff/forum/index.blade.php | 16 +- resources/views/Staff/gift/index.blade.php | 22 +- resources/views/Staff/group/create.blade.php | 14 +- resources/views/Staff/group/edit.blade.php | 12 +- resources/views/Staff/group/index.blade.php | 8 +- .../views/Staff/internals/create.blade.php | 10 +- .../views/Staff/internals/edit.blade.php | 4 +- .../views/Staff/internals/index.blade.php | 10 +- resources/views/Staff/invite/index.blade.php | 24 +- resources/views/Staff/logs/index.blade.php | 2 +- resources/views/Staff/masspm/index.blade.php | 16 +- .../Staff/media_language/create.blade.php | 12 +- .../views/Staff/media_language/edit.blade.php | 12 +- .../Staff/media_language/index.blade.php | 22 +- .../views/Staff/moderation/index.blade.php | 162 +++---- resources/views/Staff/note/index.blade.php | 22 +- resources/views/Staff/page/create.blade.php | 26 +- resources/views/Staff/page/edit.blade.php | 16 +- resources/views/Staff/page/index.blade.php | 24 +- resources/views/Staff/poll/create.blade.php | 14 +- resources/views/Staff/poll/edit.blade.php | 10 +- .../views/Staff/poll/forms/make.blade.php | 14 +- .../views/Staff/poll/forms/update.blade.php | 14 +- resources/views/Staff/poll/index.blade.php | 22 +- resources/views/Staff/poll/show.blade.php | 12 +- resources/views/Staff/report/index.blade.php | 26 +- resources/views/Staff/report/show.blade.php | 24 +- .../views/Staff/resolution/create.blade.php | 10 +- .../views/Staff/resolution/edit.blade.php | 14 +- .../views/Staff/resolution/index.blade.php | 16 +- resources/views/Staff/rss/create.blade.php | 64 +-- resources/views/Staff/rss/edit.blade.php | 80 ++-- resources/views/Staff/rss/index.blade.php | 32 +- resources/views/Staff/seedbox/index.blade.php | 22 +- resources/views/Staff/type/create.blade.php | 24 +- resources/views/Staff/type/edit.blade.php | 24 +- resources/views/Staff/type/index.blade.php | 22 +- resources/views/Staff/user/edit.blade.php | 102 ++--- resources/views/Staff/user/index.blade.php | 8 +- resources/views/Staff/warning/index.blade.php | 30 +- .../views/Staff/watchlist/index.blade.php | 8 +- resources/views/achievement/index.blade.php | 32 +- resources/views/achievement/show.blade.php | 22 +- resources/views/album/create.blade.php | 18 +- resources/views/album/image.blade.php | 18 +- resources/views/album/index.blade.php | 22 +- resources/views/album/show.blade.php | 18 +- resources/views/article/index.blade.php | 10 +- resources/views/article/show.blade.php | 22 +- .../views/auth/application/create.blade.php | 54 +-- resources/views/auth/login.blade.php | 24 +- .../views/auth/passwords/email.blade.php | 20 +- .../views/auth/passwords/reset.blade.php | 24 +- resources/views/auth/register.blade.php | 30 +- .../views/auth/twostep-exceeded.blade.php | 14 +- .../views/auth/twostep-verification.blade.php | 22 +- resources/views/auth/username.blade.php | 20 +- resources/views/blocks/featured.blade.php | 28 +- resources/views/blocks/latest_posts.blade.php | 12 +- .../views/blocks/latest_topics.blade.php | 12 +- resources/views/blocks/news.blade.php | 10 +- resources/views/blocks/online.blade.php | 6 +- resources/views/blocks/poll.blade.php | 6 +- resources/views/blocks/top_torrents.blade.php | 396 +++++++++--------- .../views/blocks/top_uploaders.blade.php | 22 +- resources/views/bonus/buttons.blade.php | 16 +- resources/views/bonus/gift.blade.php | 24 +- resources/views/bonus/gifts.blade.php | 26 +- resources/views/bonus/index.blade.php | 168 ++++---- resources/views/bonus/store.blade.php | 26 +- resources/views/bonus/tips.blade.php | 28 +- resources/views/contact/index.blade.php | 18 +- resources/views/emails/activate.blade.php | 8 +- resources/views/emails/ban.blade.php | 4 +- resources/views/emails/contact.blade.php | 6 +- resources/views/emails/disabled.blade.php | 2 +- resources/views/emails/invite.blade.php | 8 +- resources/views/emails/new_reply.blade.php | 6 +- resources/views/emails/pruned.blade.php | 2 +- resources/views/emails/report.blade.php | 10 +- resources/views/emails/unban.blade.php | 4 +- resources/views/forum/buttons.blade.php | 10 +- resources/views/forum/category.blade.php | 24 +- resources/views/forum/display.blade.php | 28 +- resources/views/forum/edit_topic.blade.php | 20 +- resources/views/forum/index.blade.php | 16 +- resources/views/forum/latest_posts.blade.php | 28 +- resources/views/forum/latest_topics.blade.php | 28 +- resources/views/forum/new_topic.blade.php | 12 +- resources/views/forum/post_edit.blade.php | 10 +- resources/views/forum/results_posts.blade.php | 98 ++--- .../views/forum/results_topics.blade.php | 98 ++--- resources/views/forum/stats.blade.php | 6 +- resources/views/forum/subscriptions.blade.php | 38 +- resources/views/forum/topic.blade.php | 76 ++-- resources/views/graveyard/index.blade.php | 4 +- .../livewire/attachment-upload.blade.php | 2 +- .../views/livewire/backup-panel.blade.php | 16 +- .../views/livewire/bookmark-button.blade.php | 4 +- .../livewire/collection-search.blade.php | 6 +- .../views/livewire/dislike-button.blade.php | 2 +- .../views/livewire/graveyard-search.blade.php | 70 ++-- .../livewire/includes/_tooltip.blade.php | 12 +- .../views/livewire/like-button.blade.php | 2 +- .../livewire/missing-media-search.blade.php | 2 +- .../views/livewire/movie-search.blade.php | 2 +- .../views/livewire/person-search.blade.php | 2 +- .../views/livewire/similar-torrent.blade.php | 56 +-- .../views/livewire/subtitle-search.blade.php | 30 +- .../views/livewire/thank-button.blade.php | 2 +- .../views/livewire/ticket-search.blade.php | 24 +- resources/views/livewire/top10.blade.php | 260 ++++++------ .../livewire/torrent-card-search.blade.php | 82 ++-- .../livewire/torrent-list-search.blade.php | 124 +++--- .../livewire/torrent-request-search.blade.php | 70 ++-- .../views/livewire/user-search.blade.php | 22 +- .../views/livewire/watchlist-search.blade.php | 6 +- .../views/mediahub/collection/index.blade.php | 8 +- .../views/mediahub/collection/show.blade.php | 26 +- .../views/mediahub/company/index.blade.php | 8 +- .../views/mediahub/company/show.blade.php | 16 +- .../views/mediahub/genre/index.blade.php | 12 +- resources/views/mediahub/genre/show.blade.php | 16 +- resources/views/mediahub/index.blade.php | 38 +- .../views/mediahub/movie/index.blade.php | 6 +- resources/views/mediahub/movie/show.blade.php | 56 +-- .../views/mediahub/network/index.blade.php | 8 +- .../views/mediahub/network/show.blade.php | 14 +- .../views/mediahub/person/index.blade.php | 8 +- .../views/mediahub/person/show.blade.php | 34 +- resources/views/mediahub/tv/show.blade.php | 4 +- resources/views/notification/index.blade.php | 52 +-- .../views/notification/results.blade.php | 16 +- resources/views/page/aboutus.blade.php | 30 +- resources/views/page/blacklist.blade.php | 8 +- resources/views/page/index.blade.php | 2 +- resources/views/page/internal.blade.php | 6 +- resources/views/page/staff.blade.php | 6 +- .../partials/achievement_modal.blade.php | 2 +- resources/views/partials/alerts.blade.php | 6 +- resources/views/partials/breadcrumb.blade.php | 2 +- .../views/partials/dashboardmenu.blade.php | 82 ++-- resources/views/partials/footer.blade.php | 30 +- resources/views/partials/modals.blade.php | 6 +- resources/views/partials/pmmenu.blade.php | 6 +- resources/views/partials/side_nav.blade.php | 36 +- .../views/partials/statsgroupmenu.blade.php | 2 +- .../views/partials/statsrequestmenu.blade.php | 4 +- .../views/partials/statstorrentmenu.blade.php | 10 +- .../views/partials/statsusermenu.blade.php | 12 +- resources/views/partials/top_nav.blade.php | 20 +- resources/views/partials/userbar.blade.php | 30 +- resources/views/playlist/create.blade.php | 22 +- resources/views/playlist/edit.blade.php | 22 +- resources/views/playlist/index.blade.php | 12 +- resources/views/playlist/show.blade.php | 52 +-- resources/views/pm/inbox.blade.php | 26 +- resources/views/pm/message.blade.php | 14 +- resources/views/pm/outbox.blade.php | 14 +- resources/views/pm/send.blade.php | 14 +- resources/views/poll/forms/vote.blade.php | 4 +- resources/views/poll/latest.blade.php | 6 +- resources/views/poll/result.blade.php | 12 +- resources/views/poll/show.blade.php | 8 +- .../views/requests/add_request.blade.php | 46 +- .../views/requests/edit_request.blade.php | 44 +- resources/views/requests/request.blade.php | 92 ++-- .../views/requests/request_modals.blade.php | 84 ++-- resources/views/rss/create.blade.php | 60 +-- resources/views/rss/edit.blade.php | 76 ++-- resources/views/rss/index.blade.php | 46 +- resources/views/rss/show.blade.php | 8 +- resources/views/seedbox/index.blade.php | 28 +- .../views/stats/clients/clients.blade.php | 4 +- resources/views/stats/groups/group.blade.php | 18 +- resources/views/stats/groups/groups.blade.php | 12 +- resources/views/stats/index.blade.php | 60 +-- .../views/stats/languages/languages.blade.php | 8 +- .../views/stats/requests/bountied.blade.php | 22 +- .../views/stats/torrents/completed.blade.php | 18 +- resources/views/stats/torrents/dead.blade.php | 18 +- .../views/stats/torrents/dying.blade.php | 18 +- .../views/stats/torrents/leeched.blade.php | 18 +- .../views/stats/torrents/seeded.blade.php | 18 +- resources/views/stats/users/bankers.blade.php | 16 +- .../views/stats/users/downloaded.blade.php | 18 +- .../views/stats/users/leechers.blade.php | 14 +- resources/views/stats/users/seeders.blade.php | 14 +- .../views/stats/users/seedsize.blade.php | 14 +- .../views/stats/users/seedtime.blade.php | 14 +- .../views/stats/users/uploaded.blade.php | 18 +- .../views/stats/users/uploaders.blade.php | 14 +- resources/views/subtitle/create.blade.php | 32 +- resources/views/subtitle/index.blade.php | 4 +- resources/views/subtitle/modals.blade.php | 24 +- resources/views/ticket/create.blade.php | 26 +- resources/views/ticket/index.blade.php | 4 +- resources/views/ticket/show.blade.php | 46 +- resources/views/torrent/cards.blade.php | 6 +- .../views/torrent/download_check.blade.php | 32 +- .../views/torrent/edit_torrent.blade.php | 76 ++-- resources/views/torrent/history.blade.php | 32 +- .../views/torrent/partials/buttons.blade.php | 20 +- .../views/torrent/partials/comments.blade.php | 18 +- .../torrent/partials/description.blade.php | 2 +- .../torrent/partials/game_meta.blade.php | 6 +- .../views/torrent/partials/general.blade.php | 146 +++---- .../torrent/partials/movie_meta.blade.php | 10 +- .../torrent/partials/playlists.blade.php | 2 +- .../partials/recommendations.blade.php | 6 +- .../torrent/partials/subtitles.blade.php | 24 +- .../views/torrent/partials/tipjar.blade.php | 10 +- .../views/torrent/partials/tools.blade.php | 38 +- .../views/torrent/partials/tv_meta.blade.php | 10 +- resources/views/torrent/peers.blade.php | 34 +- resources/views/torrent/similar.blade.php | 8 +- resources/views/torrent/torrent.blade.php | 6 +- .../views/torrent/torrent_modals.blade.php | 68 +-- resources/views/torrent/torrents.blade.php | 6 +- resources/views/torrent/upload.blade.php | 94 ++--- .../views/torrent_request/index.blade.php | 4 +- resources/views/user/banlog.blade.php | 20 +- .../views/user/buttons/achievement.blade.php | 6 +- resources/views/user/buttons/client.blade.php | 6 +- resources/views/user/buttons/edit.blade.php | 6 +- .../views/user/buttons/follower.blade.php | 6 +- resources/views/user/buttons/forum.blade.php | 10 +- resources/views/user/buttons/invite.blade.php | 10 +- resources/views/user/buttons/other.blade.php | 14 +- .../views/user/buttons/private.blade.php | 6 +- .../views/user/buttons/profile.blade.php | 54 +-- resources/views/user/buttons/public.blade.php | 26 +- .../views/user/buttons/requests.blade.php | 6 +- .../views/user/buttons/settings.blade.php | 14 +- resources/views/user/buttons/staff.blade.php | 10 +- resources/views/user/buttons/stats.blade.php | 22 +- resources/views/user/buttons/user.blade.php | 12 +- resources/views/user/downloads.blade.php | 28 +- resources/views/user/edit_profile.blade.php | 24 +- resources/views/user/filters/active.blade.php | 18 +- .../views/user/filters/downloads.blade.php | 24 +- .../views/user/filters/history.blade.php | 38 +- .../views/user/filters/requests.blade.php | 26 +- .../user/filters/resurrections.blade.php | 22 +- resources/views/user/filters/seeds.blade.php | 16 +- .../views/user/filters/unsatisfieds.blade.php | 26 +- .../views/user/filters/uploads.blade.php | 36 +- resources/views/user/followers.blade.php | 14 +- resources/views/user/invite.blade.php | 24 +- resources/views/user/invites.blade.php | 22 +- resources/views/user/notification.blade.php | 144 +++---- resources/views/user/posts.blade.php | 22 +- resources/views/user/privacy.blade.php | 136 +++--- resources/views/user/private/active.blade.php | 64 +-- .../views/user/private/downloads.blade.php | 64 +-- .../views/user/private/requests.blade.php | 60 +-- .../user/private/resurrections.blade.php | 58 +-- resources/views/user/private/seeds.blade.php | 54 +-- .../views/user/private/torrents.blade.php | 100 ++--- .../views/user/private/unsatisfieds.blade.php | 66 +-- .../views/user/private/uploads.blade.php | 94 ++--- resources/views/user/profile.blade.php | 228 +++++----- resources/views/user/requests.blade.php | 38 +- resources/views/user/security.blade.php | 30 +- resources/views/user/settings.blade.php | 18 +- resources/views/user/topics.blade.php | 22 +- resources/views/user/uploads.blade.php | 24 +- resources/views/user/user_modals.blade.php | 12 +- resources/views/user/warninglog.blade.php | 50 +-- resources/views/user/wishlist.blade.php | 12 +- .../cookie-consent/dialogContents.blade.php | 2 +- .../log-viewer/bootstrap-4/_master.blade.php | 4 +- .../bootstrap-4/dashboard.blade.php | 4 +- .../log-viewer/bootstrap-4/logs.blade.php | 12 +- .../log-viewer/bootstrap-4/show.blade.php | 46 +- .../vendor/notifications/email.blade.php | 2 +- .../pagination/livewire-pagination.blade.php | 8 +- 300 files changed, 4208 insertions(+), 4206 deletions(-) diff --git a/resources/views/Staff/application/index.blade.php b/resources/views/Staff/application/index.blade.php index ad6cb6914f..dfe9b41e56 100644 --- a/resources/views/Staff/application/index.blade.php +++ b/resources/views/Staff/application/index.blade.php @@ -1,22 +1,22 @@ @extends('layout.default') @section('title') - Applications - @lang('staff.staff-dashboard') - {{ config('other.title') }} + Applications - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }} @endsection @section('meta') - + @endsection @section('breadcrumb')
  • @endsection @@ -24,28 +24,28 @@ @section('content')
    -

    @lang('staff.applications')

    +

    {{ __('staff.applications') }}


    - @lang('staff.applications') + {{ __('staff.applications') }}

    - - - - - - - - - - + + + + + + + + + + diff --git a/resources/views/Staff/application/show.blade.php b/resources/views/Staff/application/show.blade.php index 732caf0892..f6c3958d2c 100644 --- a/resources/views/Staff/application/show.blade.php +++ b/resources/views/Staff/application/show.blade.php @@ -1,28 +1,28 @@ @extends('layout.default') @section('title') - Application - @lang('staff.staff-dashboard') - {{ config('other.title') }} + Application - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }} @endsection @section('meta') - + @endsection @section('breadcrumb')
  • @endsection @@ -35,7 +35,7 @@ class="l-breadcrumb-item-link"> @if($application->status != 0) @else - - + + diff --git a/resources/views/Staff/internals/create.blade.php b/resources/views/Staff/internals/create.blade.php index 969e0d8d2a..6e088981bd 100644 --- a/resources/views/Staff/internals/create.blade.php +++ b/resources/views/Staff/internals/create.blade.php @@ -3,7 +3,7 @@ @section('breadcrumb')
  • @@ -13,14 +13,14 @@
  • @endsection @section('content')
    -

    @lang('common.add') Internal-Group

    +

    {{ __('common.add') }} Internal-Group

    @csrf @@ -28,7 +28,7 @@
    @lang('common.no')@lang('common.user')@lang('common.email')@lang('staff.application-type')@lang('staff.application-image-proofs')@lang('user.profile') @lang('staff.links')@lang('common.created_at')@lang('common.status')@lang('common.moderated-by')@lang('common.action'){{ __('common.no') }}{{ __('common.user') }}{{ __('common.email') }}{{ __('staff.application-type') }}{{ __('staff.application-image-proofs') }}{{ __('user.profile') }} {{ __('staff.links') }}{{ __('common.created_at') }}{{ __('common.status') }}{{ __('common.moderated-by') }}{{ __('common.action') }}
    - @lang('common.email') + {{ __('common.email') }} {{ $application->email }} @@ -43,7 +43,7 @@ class="l-breadcrumb-item-link">
    - @lang('staff.application-type') + {{ __('staff.application-type') }} {{ $application->type }} @@ -51,7 +51,7 @@ class="l-breadcrumb-item-link">
    - @lang('common.created_at') + {{ __('common.created_at') }} {{ $application->created_at->toDayDateTimeString() }} @@ -60,31 +60,31 @@ class="l-breadcrumb-item-link">
    - @lang('staff.application-image-proofs') + {{ __('staff.application-image-proofs') }} @foreach($application->imageProofs as $key => $img_proof) + class="btn btn-sm btn-info">{{ __('staff.application-image-proofs') }} {{ ++$key }} @endforeach
    - @lang('user.profile') @lang('staff.links') + {{ __('user.profile') }} {{ __('staff.links') }} @foreach($application->urlProofs as $key => $url_proof)
  • @lang('user.profile') @lang('staff.links') {{ ++$key }}
  • + target="_blank">{{ __('user.profile') }} {{ __('staff.links') }} {{ ++$key }} @endforeach
    - @lang('staff.application-referrer') + {{ __('staff.application-referrer') }}
    @@ -97,34 +97,34 @@ class="btn btn-sm btn-info">@lang('staff.application-image-proofs') {{ ++$key }}
    - @lang('common.status') + {{ __('common.status') }} @if ($application->status == 0) - @lang('request.pending') + {{ __('request.pending') }} @elseif ($application->status == 1) - @lang('request.approve') + {{ __('request.approve') }} @else - @lang('request.reject') + {{ __('request.reject') }} @endif
    - @lang('common.moderated-by') + {{ __('common.moderated-by') }} {{ $application->moderated->username }}
    - @lang('common.action') + {{ __('common.action') }} - + diff --git a/resources/views/Staff/group/index.blade.php b/resources/views/Staff/group/index.blade.php index fe1b27c22b..9d9a762726 100644 --- a/resources/views/Staff/group/index.blade.php +++ b/resources/views/Staff/group/index.blade.php @@ -3,12 +3,12 @@ @section('breadcrumb')
  • @endsection @@ -22,8 +22,8 @@
    ID@lang('common.name')@lang('common.position'){{ __('common.name') }}{{ __('common.position') }} Level Color Icon
    - + @@ -57,7 +57,7 @@
    @lang('common.name'){{ __('common.name') }} Icon Effect
    - +
    diff --git a/resources/views/Staff/internals/edit.blade.php b/resources/views/Staff/internals/edit.blade.php index 027769b4f5..84bab28476 100644 --- a/resources/views/Staff/internals/edit.blade.php +++ b/resources/views/Staff/internals/edit.blade.php @@ -3,7 +3,7 @@ @section('breadcrumb')
  • @@ -61,7 +61,7 @@ class="form-control"/>
    - + diff --git a/resources/views/Staff/internals/index.blade.php b/resources/views/Staff/internals/index.blade.php index d51ae62c8f..caddd3a61c 100644 --- a/resources/views/Staff/internals/index.blade.php +++ b/resources/views/Staff/internals/index.blade.php @@ -3,7 +3,7 @@ @section('breadcrumb')
  • @@ -22,10 +22,10 @@ ID - @lang('common.name') + {{ __('common.name') }} Icon Effect - @lang('common.action') + {{ __('common.action') }} @@ -52,8 +52,8 @@ @csrf @method('DELETE') @lang('common.edit') - + class="btn btn-warning">{{ __('common.edit') }} + diff --git a/resources/views/Staff/invite/index.blade.php b/resources/views/Staff/invite/index.blade.php index 1eb8df2db0..f0dfeeef14 100644 --- a/resources/views/Staff/invite/index.blade.php +++ b/resources/views/Staff/invite/index.blade.php @@ -1,22 +1,22 @@ @extends('layout.default') @section('title') - Invites Log - @lang('staff.staff-dashboard') - {{ config('other.title') }} + Invites Log - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }} @endsection @section('meta') - + @endsection @section('breadcrumb')
  • @endsection @@ -24,23 +24,23 @@ @section('content')
    -

    @lang('staff.invites-log')

    +

    {{ __('staff.invites-log') }}


    - {{ $invitecount }} @lang('user.invites-send')

    + {{ $invitecount }} {{ __('user.invites-send') }}
    - - + + - - - - + + + + diff --git a/resources/views/Staff/logs/index.blade.php b/resources/views/Staff/logs/index.blade.php index d85e36fcdb..e05be1c2c2 100644 --- a/resources/views/Staff/logs/index.blade.php +++ b/resources/views/Staff/logs/index.blade.php @@ -92,7 +92,7 @@ class="glyphicon glyphicon-download-alt"> Download file - @lang('common.delete') file + class="glyphicon glyphicon-trash"> {{ __('common.delete') }} file diff --git a/resources/views/Staff/masspm/index.blade.php b/resources/views/Staff/masspm/index.blade.php index fe86dc2a89..f2f94da91d 100644 --- a/resources/views/Staff/masspm/index.blade.php +++ b/resources/views/Staff/masspm/index.blade.php @@ -1,44 +1,44 @@ @extends('layout.default') @section('title') - @lang('staff.mass-pm') - @lang('staff.staff-dashboard') - {{ config('other.title') }} + {{ __('staff.mass-pm') }} - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }} @endsection @section('meta') - + @endsection @section('breadcrumb')
  • @endsection @section('content')
    -

    @lang('staff.mass-pm')

    +

    {{ __('staff.mass-pm') }}

    @csrf
    - +
    - +
    - +
    @endsection diff --git a/resources/views/Staff/media_language/create.blade.php b/resources/views/Staff/media_language/create.blade.php index ad008529b6..f2b38bcaef 100644 --- a/resources/views/Staff/media_language/create.blade.php +++ b/resources/views/Staff/media_language/create.blade.php @@ -3,20 +3,20 @@ @section('breadcrumb')
  • @@ -25,20 +25,20 @@ @section('content')

    - @lang('common.add') @lang('common.media-language') @lang('staff.media-languages-desc') + {{ __('common.add') }} {{ __('common.media-language') }} {{ __('staff.media-languages-desc') }}

    @csrf
    - +
    - + diff --git a/resources/views/Staff/media_language/edit.blade.php b/resources/views/Staff/media_language/edit.blade.php index c76c18381c..6e611dae0c 100644 --- a/resources/views/Staff/media_language/edit.blade.php +++ b/resources/views/Staff/media_language/edit.blade.php @@ -3,13 +3,13 @@ @section('breadcrumb')
  • @@ -17,7 +17,7 @@ @@ -26,20 +26,20 @@ class="l-breadcrumb-item-link"> @section('content')

    - @lang('common.edit') @lang('common.media-language') @lang('staff.media-languages-desc')

    + {{ __('common.edit') }} {{ __('common.media-language') }} {{ __('staff.media-languages-desc') }} @csrf
    - +
    - + diff --git a/resources/views/Staff/media_language/index.blade.php b/resources/views/Staff/media_language/index.blade.php index ddac115eae..5dfdc3b249 100644 --- a/resources/views/Staff/media_language/index.blade.php +++ b/resources/views/Staff/media_language/index.blade.php @@ -3,13 +3,13 @@ @section('breadcrumb')
  • @@ -17,22 +17,22 @@ @section('content')
    -

    @lang('common.media-languages')

    -

    @lang('staff.media-languages-desc')

    +

    {{ __('common.media-languages') }}

    +

    {{ __('staff.media-languages-desc') }}

    - @lang('common.add') - @lang(trans_choice('common.a-an-art',false)) - @lang('common.media-language') + {{ __('common.add') }} + {{ __(trans_choice('common.a-an-art',false)) }} + {{ __('common.media-language') }}
    @lang('user.sender')@lang('common.email'){{ __('user.sender') }}{{ __('common.email') }} Token@lang('user.created-on')@lang('user.expires-on')@lang('user.accepted-by')@lang('user.accepted-at'){{ __('user.created-on') }}{{ __('user.expires-on') }}{{ __('user.accepted-by') }}{{ __('user.accepted-at') }}
    - - - + + + @@ -49,7 +49,7 @@ diff --git a/resources/views/Staff/moderation/index.blade.php b/resources/views/Staff/moderation/index.blade.php index ad291c62c2..0701d6b998 100644 --- a/resources/views/Staff/moderation/index.blade.php +++ b/resources/views/Staff/moderation/index.blade.php @@ -1,18 +1,18 @@ @extends('layout.default') @section('title') - Moderation - @lang('staff.staff-dashboard') - {{ config('other.title') }} + Moderation - {{ __('staff.staff-dashboard') }} - {{ config('other.title') }} @endsection @section('breadcrumb')
  • @endsection @@ -23,16 +23,16 @@
    @lang('common.name')@lang('common.code')@lang('common.action'){{ __('common.name') }}{{ __('common.code') }}{{ __('common.action') }}
    - @lang('common.edit') + {{ __('common.edit') }}
    - - - - - - - - - - + + + + + + + + + + @@ -61,7 +61,7 @@ class="l-breadcrumb-item-link-title">{{ $p->user->username }} - @lang('common.moderation-approve') + {{ __('common.moderation-approve') }} @@ -70,7 +70,7 @@ class="l-breadcrumb-item-link-title">{{ $p->user->username }} class="btn btn-labeled btn-danger"> - @lang('common.moderation-postpone') + {{ __('common.moderation-postpone') }}
    @lang('torrent.uploaded')@lang('common.name')@lang('common.category')@lang('common.type')@lang('common.resolution')@lang('torrent.size')@lang('torrent.uploader')@lang('common.moderation-approve')@lang('common.moderation-postpone')@lang('common.moderation-reject'){{ __('torrent.uploaded') }}{{ __('common.name') }}{{ __('common.category') }}{{ __('common.type') }}{{ __('common.resolution') }}{{ __('torrent.size') }}{{ __('torrent.uploader') }}{{ __('common.moderation-approve') }}{{ __('common.moderation-postpone') }}{{ __('common.moderation-reject') }}
    - - - + + + @@ -48,8 +48,8 @@ @csrf @method('DELETE') @lang('common.edit') - + class="btn btn-warning">{{ __('common.edit') }} + diff --git a/resources/views/Staff/poll/create.blade.php b/resources/views/Staff/poll/create.blade.php index d4d6af85d3..c17f516d7f 100644 --- a/resources/views/Staff/poll/create.blade.php +++ b/resources/views/Staff/poll/create.blade.php @@ -7,17 +7,17 @@ @section('breadcrumb')
  • @endsection @@ -26,14 +26,14 @@
    -

    @lang('poll.create-poll')

    +

    {{ __('poll.create-poll') }}

    - @lang('common.create') - @lang(trans_choice('common.a-an-art',false)) - @lang('poll.poll') + {{ __('common.create') }} + {{ __(trans_choice('common.a-an-art',false)) }} + {{ __('poll.poll') }}
    @include('Staff.poll.forms.make') diff --git a/resources/views/Staff/poll/edit.blade.php b/resources/views/Staff/poll/edit.blade.php index 7e6c5cc501..756f56fd88 100644 --- a/resources/views/Staff/poll/edit.blade.php +++ b/resources/views/Staff/poll/edit.blade.php @@ -7,17 +7,17 @@ @section('breadcrumb')
  • @endsection @@ -26,12 +26,12 @@
    -

    @lang('poll.edit-poll')

    +

    {{ __('poll.edit-poll') }}

    - @lang('poll.edit-poll') {{$poll->title}} + {{ __('poll.edit-poll') }} {{$poll->title}}
    @include('Staff.poll.forms.update') diff --git a/resources/views/Staff/poll/forms/make.blade.php b/resources/views/Staff/poll/forms/make.blade.php index 2993485a51..a71e2e5a07 100644 --- a/resources/views/Staff/poll/forms/make.blade.php +++ b/resources/views/Staff/poll/forms/make.blade.php @@ -12,21 +12,21 @@ @csrf
    - +
    - +
    - + @@ -35,20 +35,20 @@
    - - + +

    - +
    diff --git a/resources/views/Staff/poll/forms/update.blade.php b/resources/views/Staff/poll/forms/update.blade.php index 3e544a1ab5..056745d089 100644 --- a/resources/views/Staff/poll/forms/update.blade.php +++ b/resources/views/Staff/poll/forms/update.blade.php @@ -12,7 +12,7 @@ @csrf
    - +
    @lang('common.title')@lang('common.date')@lang('common.action'){{ __('common.title') }}{{ __('common.date') }}{{ __('common.action') }}