diff --git a/.cspell/bittorrent.txt b/.cspell/bittorrent.txt new file mode 100644 index 000000000..69e64e847 --- /dev/null +++ b/.cspell/bittorrent.txt @@ -0,0 +1,12 @@ +announce +bdecode +bencode +btih +infohash +leecher +leechers +numwant +peerlist +seedbox +seedboxes +seeders \ No newline at end of file diff --git a/.cspell/blade.txt b/.cspell/blade.txt new file mode 100644 index 000000000..010c79b99 --- /dev/null +++ b/.cspell/blade.txt @@ -0,0 +1,12 @@ +endcomponent +enderror +endfor +endforeach +endforelse +endisset +endphp +endsection +endslot +endswitch +forelse +isset \ No newline at end of file diff --git a/.cspell/brands.txt b/.cspell/brands.txt new file mode 100644 index 000000000..061e799d7 --- /dev/null +++ b/.cspell/brands.txt @@ -0,0 +1,16 @@ +authy +bdinfo +bitwarden +gnutella +igdb +imdb +jackett +kazaa +limewire +mal +mediainfo +phpstorm +shareaza +tmdb +tvdb +tvrage \ No newline at end of file diff --git a/.cspell/dependencies.txt b/.cspell/dependencies.txt new file mode 100644 index 000000000..177cb3edc --- /dev/null +++ b/.cspell/dependencies.txt @@ -0,0 +1,34 @@ +alpinejs +assada +axios +axllent +beanstalkd +commonmark +gabrielelana +getmeili +imagick +imgbb +joypixels +laravel +linkify +livewire +mailgun +mailpit +meilisearch +papertrail +phpredis +phpstan +phpunit +polycast +purgecss +reichel +ryoluo +spatie +stelmakh +sweetalert +symfony +theodorejb +typesense +vite +voku +zxcvbn \ No newline at end of file diff --git a/.cspell/dependency_terms.txt b/.cspell/dependency_terms.txt new file mode 100644 index 000000000..6db77bea4 --- /dev/null +++ b/.cspell/dependency_terms.txt @@ -0,0 +1,6 @@ +asciify +dontBackupDatabases +dontBackupFilesystem +htmlify +lexify +swal \ No newline at end of file diff --git a/.cspell/html.txt b/.cspell/html.txt new file mode 100644 index 000000000..d0aa7ddda --- /dev/null +++ b/.cspell/html.txt @@ -0,0 +1,27 @@ +autocorrect +autofocus +backref +contentlength +datalist +describedby +evenodd +formaction +formmethod +formnovalidate +inputmode +lightcoral +maxlength +minmax +nbsp +noopener +noreferrer +nowrap +progressbar +rowgroup +rowspan +stroke-linejoin +tabindex +valuemax +valuemin +valuenow +xlink \ No newline at end of file diff --git a/.cspell/irc.txt b/.cspell/irc.txt new file mode 100644 index 000000000..ae6b90229 --- /dev/null +++ b/.cspell/irc.txt @@ -0,0 +1,6 @@ +joinchannel +nickserv +nickservpass +privmsg +realname +servername \ No newline at end of file diff --git a/.cspell/laravel.txt b/.cspell/laravel.txt new file mode 100644 index 000000000..d3c29aeb0 --- /dev/null +++ b/.cspell/laravel.txt @@ -0,0 +1,22 @@ +arrayable +assertdontseetext +dispatchable +doesntcontain +doesntexist +dontbroadcasttocurrentuser +dontflash +dontreport +ehlo +encryptable +encrypter +mimetypes +mysql +ordoesnthave +pgsql +queueable +sasl +sslmode +sqlite +sqlsrv +stringable +wheredoesnthave diff --git a/.cspell/mysql.txt b/.cspell/mysql.txt new file mode 100644 index 000000000..4242293bb --- /dev/null +++ b/.cspell/mysql.txt @@ -0,0 +1,8 @@ +arrayagg +from_unixtime +inet6_ntoa +innodb +mysqld +mysqldump +timestampadd +timestampdiff \ No newline at end of file diff --git a/.cspell/people.txt b/.cspell/people.txt new file mode 100644 index 000000000..2db23213b --- /dev/null +++ b/.cspell/people.txt @@ -0,0 +1,7 @@ +hdvinnie +rhilip +roardom +sindre +sindresorhus +sorhus +vinnie \ No newline at end of file diff --git a/.cspell/php.txt b/.cspell/php.txt new file mode 100644 index 000000000..80e7fe0d4 --- /dev/null +++ b/.cspell/php.txt @@ -0,0 +1,10 @@ +autoload +autoloaded +autoloading +bcmath +classmap +fastcgi +igbinary +mbstring +opcache +phar \ No newline at end of file diff --git a/.cspell/php_constants.txt b/.cspell/php_constants.txt new file mode 100644 index 000000000..f5c4ed5f4 --- /dev/null +++ b/.cspell/php_constants.txt @@ -0,0 +1,4 @@ +ENT_NOQUOTES +PATHINFO_BASENAME +PREG_OFFSET_CAPTURE +PREG_SET_ORDER \ No newline at end of file diff --git a/.cspell/php_functions.txt b/.cspell/php_functions.txt new file mode 100644 index 000000000..36acd9573 --- /dev/null +++ b/.cspell/php_functions.txt @@ -0,0 +1,45 @@ +addslashes +closedir +ctype_digit +ctype_print +ctype_xdigit +fclose +fgets +fileperms +fpassthru +fsockopen +fwrite +getcwd +gethostbyaddr +htmlspecialchars +inet_ntop +inet_pton +intdiv +intval +isset +ksort +ltrim +microtime +opendir +pathinfo +preg_match +preg_match_all +preg_quote +preg_replace +preg_replace_callback +preg_split +rawurlencode +rtrim +scandir +strcasecmp +strpos +strrchr +strspn +strtolower +strtotime +strtoupper +sys_getloadavg +uniqid +unserialize +urldecode +usleep \ No newline at end of file diff --git a/.cspell/redis.txt b/.cspell/redis.txt new file mode 100644 index 000000000..216471914 --- /dev/null +++ b/.cspell/redis.txt @@ -0,0 +1,6 @@ +llen +lpop +lpush +rpush +sadd +srandmember \ No newline at end of file diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 000000000..9460f71f4 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,19 @@ +name: Check Spelling +on: [push, pull_request] +jobs: + spellcheck: + strategy: + matrix: + operating-system: + - ubuntu-22.04 + name: ${{ matrix.operating-system }} + runs-on: ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Run CSpell + uses: streetsidesoftware/cspell-action@v6 + with: + incremental_files_only: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 538fdb706..792e916f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Contributions are **welcome**. Please make all pull requests agaist the development branch (currently 8.x.x) and NOT master which is only for releases. +Contributions are **welcome**. Please make all pull requests against the development branch (currently 8.x.x) and NOT master which is only for releases. We accept contributions via Pull Requests on [Github](https://github.com/HDInnovations/UNIT3D). @@ -104,7 +104,7 @@ Any new pages should use the existing component styles unless a new block, eleme ## Other -- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. +- **Document any change in behavior** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. - **Create feature branches** - Don't ask us to pull from your master branch. diff --git a/app/Console/Commands/AutoDeactivateWarning.php b/app/Console/Commands/AutoDeactivateWarning.php index c46418929..381c94f95 100644 --- a/app/Console/Commands/AutoDeactivateWarning.php +++ b/app/Console/Commands/AutoDeactivateWarning.php @@ -96,6 +96,6 @@ class AutoDeactivateWarning extends Command } }, 'user_id'); - $this->comment('Automated Warning Deativation Command Complete'); + $this->comment('Automated Warning Deactivation Command Complete'); } } diff --git a/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php b/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php index e0b3ad965..7ce5af5b4 100644 --- a/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php +++ b/app/Console/Commands/AutoRecycleClaimedTorrentRequests.php @@ -36,7 +36,7 @@ class AutoRecycleClaimedTorrentRequests extends Command * * @var string */ - protected $description = 'Recycle Torrent Requests That Wwere Claimed But Not Filled Within 7 Days.'; + protected $description = 'Recycle Torrent Requests That Were Claimed But Not Filled Within 7 Days.'; /** * AutoRecycleClaimedTorrentRequests Constructor. diff --git a/app/Console/Commands/FetchMeta.php b/app/Console/Commands/FetchMeta.php index 60d10b040..86e8a7e09 100644 --- a/app/Console/Commands/FetchMeta.php +++ b/app/Console/Commands/FetchMeta.php @@ -36,7 +36,7 @@ class FetchMeta extends Command * * @var string */ - protected $description = 'Fetchs Meta Data For New System On Preexxsisting Torrents'; + protected $description = 'Fetches Meta Data For New System On Preexisting Torrents'; /** * Execute the console command. diff --git a/app/Console/Commands/GitUpdater.php b/app/Console/Commands/GitUpdater.php index 2c3d6d606..2eb8c898b 100644 --- a/app/Console/Commands/GitUpdater.php +++ b/app/Console/Commands/GitUpdater.php @@ -126,7 +126,7 @@ class GitUpdater extends Command $this->backup($paths); - $this->header('Reseting Repository'); + $this->header('Resetting Repository'); $this->commands([ 'git fetch origin', diff --git a/app/Helpers/BackupEncryption.php b/app/Helpers/BackupEncryption.php index 69d4e8da2..09d2c62e3 100644 --- a/app/Helpers/BackupEncryption.php +++ b/app/Helpers/BackupEncryption.php @@ -21,28 +21,28 @@ use ZipArchive; class BackupEncryption { /** - * Default encryption contants. + * Default encryption constants. * * @var int */ final public const ENCRYPTION_DEFAULT = ZipArchive::EM_AES_128; /** - * AES-128 encryption contants. + * AES-128 encryption constants. * * @var int */ final public const ENCRYPTION_WINZIP_AES_128 = ZipArchive::EM_AES_128; /** - * AES-192 encryption contants. + * AES-192 encryption constants. * * @var int */ final public const ENCRYPTION_WINZIP_AES_192 = ZipArchive::EM_AES_192; /** - * AES-256 encryption contants. + * AES-256 encryption constants. * * @var int */ diff --git a/app/Helpers/Bencode.php b/app/Helpers/Bencode.php index 7a49e8b69..6b6ec4606 100644 --- a/app/Helpers/Bencode.php +++ b/app/Helpers/Bencode.php @@ -175,7 +175,7 @@ class Bencode if ($isDict) { $ret = 'd'; - // this is required by the specs, and BitTornado actualy chokes on unsorted dictionaries + // this is required by the specs, and BitTornado actually chokes on unsorted dictionaries ksort($d, SORT_STRING); } @@ -223,7 +223,7 @@ class Bencode $size = 0; $count = 0; - // Multifile + // Multi-file if (isset($t['info']['files']) && \is_array($t['info']['files'])) { foreach ($t['info']['files'] as $file) { $count++; diff --git a/app/Helpers/Helpers.php b/app/Helpers/Helpers.php index 094e68e30..c2c7445be 100644 --- a/app/Helpers/Helpers.php +++ b/app/Helpers/Helpers.php @@ -129,6 +129,7 @@ if (!\function_exists('rating_color')) { if (!\function_exists('language_flag')) { function language_flag(?string $language): ?string { + // cspell:words Bokmal, Limburgish, Sinhala, $flag = match ($language) { 'English', 'English (US)' => 'us', 'English (GB)' => 'gb', @@ -145,7 +146,7 @@ if (!\function_exists('language_flag')) { 'Bosnian', 'Bosnian (BA)' => 'ba', 'Bulgarian', 'Bulgarian (BG)' => 'bg', 'Burmese' => 'mm', - 'Chinese', 'Mandarin', 'Mandarin (Hans)', 'Mandarin (Hant)', 'Cantonese', 'Cantonese (Hant)', 'Chinese (Simplied)', 'Chinese (Traditional)', 'Chinese (Simplified)', 'Chinese-yue-Hant', 'Chinese-cmn-Hans', 'Chinese-cmn-Hant' => 'cn', + 'Chinese', 'Mandarin', 'Mandarin (Hans)', 'Mandarin (Hant)', 'Cantonese', 'Cantonese (Hant)', /* cspell:disable */ 'Chinese (Simplied)' /* cspell:enable */, 'Chinese (Traditional)', 'Chinese (Simplified)', 'Chinese-yue-Hant', 'Chinese-cmn-Hans', 'Chinese-cmn-Hant' => 'cn', 'Chinese (HK)', 'Chinese-Hant-HK', 'Mandarin (HK)', 'Cantonese (HK)', 'Chinese-cmn-HK' => 'hk', 'Chinese (Taiwan)' => 'tw', 'Croatian', 'Croatian (HR)' => 'hr', diff --git a/app/Helpers/SystemInformation.php b/app/Helpers/SystemInformation.php index 766d5100e..3a14e14b0 100644 --- a/app/Helpers/SystemInformation.php +++ b/app/Helpers/SystemInformation.php @@ -45,6 +45,7 @@ class SystemInformation */ public function avg(): ?array { + // cspell:ignore loadavg if (is_readable('/proc/loadavg')) { $file = file_get_contents('/proc/loadavg'); @@ -160,7 +161,7 @@ class SystemInformation private function getDatabase(): string { if (!\in_array(config('database.default'), self::KNOWN_DATABASES, true)) { - return 'Unkown'; + return 'Unknown'; } return DB::select('select version()')[0]->{'version()'}; diff --git a/app/Helpers/TorrentHelper.php b/app/Helpers/TorrentHelper.php index cb67b7fa0..a29f0d120 100644 --- a/app/Helpers/TorrentHelper.php +++ b/app/Helpers/TorrentHelper.php @@ -45,7 +45,6 @@ class TorrentHelper public static function approveHelper(int $id): void { $appurl = config('app.url'); - $appname = config('app.name'); $torrent = Torrent::with('user')->withoutGlobalScope(ApprovedScope::class)->findOrFail($id); $torrent->created_at = Carbon::now(); @@ -55,7 +54,7 @@ class TorrentHelper $torrent->moderated_by = (int) auth()->id(); if (!$torrent->free) { - $autoFreeleechs = AutomaticTorrentFreeleech::query() + $autoFreeleeches = AutomaticTorrentFreeleech::query() ->orderBy('position') ->where(fn ($query) => $query->whereNull('category_id')->orWhere('category_id', '=', $torrent->category_id)) ->where(fn ($query) => $query->whereNull('type_id')->orWhere('type_id', '=', $torrent->type_id)) @@ -63,7 +62,7 @@ class TorrentHelper ->where(fn ($query) => $query->whereNull('size')->orWhere('size', '<', $torrent->size)) ->get(); - foreach ($autoFreeleechs as $autoFreeleech) { + foreach ($autoFreeleeches as $autoFreeleech) { if ($autoFreeleech->name_regex === null || preg_match($autoFreeleech->name_regex, $torrent->name)) { $torrent->free = $autoFreeleech->freeleech_percentage; diff --git a/app/Http/Controllers/API/TorrentController.php b/app/Http/Controllers/API/TorrentController.php index 2618d1a20..d631eac2a 100644 --- a/app/Http/Controllers/API/TorrentController.php +++ b/app/Http/Controllers/API/TorrentController.php @@ -115,7 +115,7 @@ class TorrentController extends BaseController return $this->sendError('Validation Error.', 'You Must Provide A Valid Torrent File For Upload!'); } - // Deplace and decode the torrent temporarily + // Move and decode the torrent temporarily $decodedTorrent = TorrentTools::normalizeTorrent($requestFile); $infohash = Bencode::get_infohash($decodedTorrent); diff --git a/app/Http/Controllers/AnnounceController.php b/app/Http/Controllers/AnnounceController.php index 22d050e18..b029e0e86 100644 --- a/app/Http/Controllers/AnnounceController.php +++ b/app/Http/Controllers/AnnounceController.php @@ -38,6 +38,8 @@ use Throwable; use Exception; use Illuminate\Support\Facades\Redis; +// cspell:ignore completei,downloadedi,incompletei,intervali + final class AnnounceController extends Controller { // Torrent Moderation Codes @@ -118,7 +120,7 @@ final class AnnounceController extends Controller $visible = true; } - // Process Annnounce Job. + // Process Announce Job. $this->processAnnounceJob($queries, $user, $group, $torrent, $visible); if ($visible) { @@ -130,6 +132,7 @@ final class AnnounceController extends Controller } catch (TrackerException $exception) { $response = $this->generateFailedAnnounceResponse($exception); } catch (Exception) { + // spell:disable-next-line $response = 'd14:failure reason21:Internal Server Error8:intervali5400e12:min intervali5400ee'; } @@ -455,7 +458,7 @@ final class AnnounceController extends Controller } /** - * Check A Peers Min Annnounce Interval. + * Check A Peers Min Announce Interval. * * @throws TrackerException * @throws Exception diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 710c3b6a4..d3a461ba3 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -84,7 +84,7 @@ class HomeController extends Controller ), 'articles' => $articles, 'topics' => Topic::query() - ->with(['user', 'user.group', 'latestPoster', 'reads' => fn ($query) => $query->whereBelongsto($user)]) + ->with(['user', 'user.group', 'latestPoster', 'reads' => fn ($query) => $query->whereBelongsTo($user)]) ->authorized(canReadTopic: true) ->latest() ->take(5) diff --git a/app/Http/Controllers/ReseedController.php b/app/Http/Controllers/ReseedController.php index 09667e40e..443dd7d3f 100644 --- a/app/Http/Controllers/ReseedController.php +++ b/app/Http/Controllers/ReseedController.php @@ -59,6 +59,6 @@ class ReseedController extends Controller } return to_route('torrents.show', ['id' => $torrent->id]) - ->withErrors('This torrent doesnt meet the rules for a reseed request.'); + ->withErrors('This torrent doesn\'t meet the rules for a reseed request.'); } } diff --git a/app/Http/Controllers/Staff/CommandController.php b/app/Http/Controllers/Staff/CommandController.php index 596f95801..2e4dd0e44 100644 --- a/app/Http/Controllers/Staff/CommandController.php +++ b/app/Http/Controllers/Staff/CommandController.php @@ -35,7 +35,7 @@ class CommandController extends Controller /** * Bring Site Into Maintenance Mode. */ - public function maintanceEnable(): \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse + public function maintenanceEnable(): \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse { Artisan::call('down'); @@ -46,7 +46,7 @@ class CommandController extends Controller /** * Bring Site Out Of Maintenance Mode. */ - public function maintanceDisable(): \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse + public function maintenanceDisable(): \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse { Artisan::call('up'); diff --git a/app/Http/Controllers/Staff/FlushController.php b/app/Http/Controllers/Staff/FlushController.php index 9c3e1b2eb..961b722b9 100644 --- a/app/Http/Controllers/Staff/FlushController.php +++ b/app/Http/Controllers/Staff/FlushController.php @@ -39,7 +39,7 @@ class FlushController extends Controller } /** - * Flsuh All Old Peers From Database. + * Flush All Old Peers From Database. * * @throws Exception */ diff --git a/app/Http/Controllers/Staff/ReportController.php b/app/Http/Controllers/Staff/ReportController.php index 251dfd8b4..69960882b 100644 --- a/app/Http/Controllers/Staff/ReportController.php +++ b/app/Http/Controllers/Staff/ReportController.php @@ -40,6 +40,7 @@ class ReportController extends Controller */ public function show(Report $report): \Illuminate\Contracts\View\Factory|\Illuminate\View\View { + // cspell:ignore punct preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', (string) $report->message, $match); return view('Staff.report.show', ['report' => $report, 'urls' => $match[0]]); diff --git a/app/Http/Controllers/TorrentBuffController.php b/app/Http/Controllers/TorrentBuffController.php index f057ff574..724e70aa5 100644 --- a/app/Http/Controllers/TorrentBuffController.php +++ b/app/Http/Controllers/TorrentBuffController.php @@ -271,11 +271,11 @@ class TorrentBuffController extends Controller } return to_route('torrents.show', ['id' => $torrent->id]) - ->withErrors('You Dont Have Enough Freeleech Tokens Or Already Have One Activated On This Torrent.'); + ->withErrors('You Don\'t Have Enough Freeleech Tokens Or Already Have One Activated On This Torrent.'); } /** - * Set Torrents Refudable Status. + * Set Torrents Refundable Status. */ public function setRefundable(Request $request, int $id): \Illuminate\Http\RedirectResponse { diff --git a/app/Http/Controllers/TorrentController.php b/app/Http/Controllers/TorrentController.php index d6118e420..58380c448 100644 --- a/app/Http/Controllers/TorrentController.php +++ b/app/Http/Controllers/TorrentController.php @@ -70,7 +70,7 @@ class TorrentController extends Controller } /** - * Display The Torrent reasource. + * Display The Torrent resource. * * @throws JsonException * @throws \MarcReichel\IGDBLaravel\Exceptions\MissingEndpointException diff --git a/app/Http/Controllers/User/ResurrectionController.php b/app/Http/Controllers/User/ResurrectionController.php index 779e3ef96..634bd722b 100644 --- a/app/Http/Controllers/User/ResurrectionController.php +++ b/app/Http/Controllers/User/ResurrectionController.php @@ -79,7 +79,7 @@ class ResurrectionController extends Controller } /** - * Cancel A Ressurection. + * Cancel A Resurrection. */ public function destroy(Request $request, User $user, Resurrection $resurrection): \Illuminate\Http\RedirectResponse { diff --git a/app/Http/Livewire/BbcodeInput.php b/app/Http/Livewire/BbcodeInput.php index 998cd4e52..2340f840f 100644 --- a/app/Http/Livewire/BbcodeInput.php +++ b/app/Http/Livewire/BbcodeInput.php @@ -10,7 +10,7 @@ declare(strict_types=1); * * @project UNIT3D Community Edition * - * @author Raordom + * @author Roardom * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 */ diff --git a/app/Http/Livewire/ForumCategoryTopicSearch.php b/app/Http/Livewire/ForumCategoryTopicSearch.php index 6073b2d9c..4dc68eee6 100644 --- a/app/Http/Livewire/ForumCategoryTopicSearch.php +++ b/app/Http/Livewire/ForumCategoryTopicSearch.php @@ -74,7 +74,7 @@ class ForumCategoryTopicSearch extends Component 'user.group', 'latestPoster', 'forum', - 'reads' => fn ($query) => $query->whereBelongsto(auth()->user()), + 'reads' => fn ($query) => $query->whereBelongsTo(auth()->user()), ]) ->whereRelation('forum', 'forum_category_id', '=', $this->category->id) ->authorized(canReadTopic: true) @@ -97,7 +97,7 @@ class ForumCategoryTopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '>', 'last_read_post_id') ) ) @@ -107,7 +107,7 @@ class ForumCategoryTopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '=', 'last_read_post_id') ) ) diff --git a/app/Http/Livewire/ForumTopicSearch.php b/app/Http/Livewire/ForumTopicSearch.php index 72435b1e2..27f78db25 100644 --- a/app/Http/Livewire/ForumTopicSearch.php +++ b/app/Http/Livewire/ForumTopicSearch.php @@ -79,7 +79,7 @@ class ForumTopicSearch extends Component 'user.group', 'latestPoster', 'forum:id,name', - 'reads' => fn ($query) => $query->whereBelongsto(auth()->user()), + 'reads' => fn ($query) => $query->whereBelongsTo(auth()->user()), ]) ->where('topics.forum_id', '=', $this->forum->id) ->authorized(canReadTopic: true) @@ -102,7 +102,7 @@ class ForumTopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '>', 'last_read_post_id') ) ) @@ -112,7 +112,7 @@ class ForumTopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '=', 'last_read_post_id') ) ) diff --git a/app/Http/Livewire/LaravelLogViewer.php b/app/Http/Livewire/LaravelLogViewer.php index 05c5cc326..cd8dab03c 100644 --- a/app/Http/Livewire/LaravelLogViewer.php +++ b/app/Http/Livewire/LaravelLogViewer.php @@ -92,7 +92,7 @@ class LaravelLogViewer extends Component for ($i = 0; $i < $numEntries; $i++) { // The context is the portion before the first stack trace $context = preg_split('/^\[stacktrace\]|Stack trace\:/ms', (string) $stacktraces[$i])[0]; - // The `context` consists of a message, an exception, a filename, and a linecount + // The `context` consists of a message, an exception, a filename, and a line count preg_match($contextPattern, $context, $contextMatches); $entries->push([ diff --git a/app/Http/Livewire/PersonCredit.php b/app/Http/Livewire/PersonCredit.php index b15590871..4d5cec06f 100644 --- a/app/Http/Livewire/PersonCredit.php +++ b/app/Http/Livewire/PersonCredit.php @@ -295,7 +295,7 @@ class PersonCredit extends Component ->values() ->groupBy(fn ($torrent) => $torrent->type->name) ->map( - fn ($torrentsBytype) => $torrentsBytype + fn ($torrentsByType) => $torrentsByType ->sortBy([ ['resolution.position', 'asc'], ['internal', 'desc'], diff --git a/app/Http/Livewire/SimilarTorrent.php b/app/Http/Livewire/SimilarTorrent.php index 90a79a0e2..6d20aff7a 100644 --- a/app/Http/Livewire/SimilarTorrent.php +++ b/app/Http/Livewire/SimilarTorrent.php @@ -365,7 +365,7 @@ class SimilarTorrent extends Component ->values() ->groupBy(fn ($torrent) => $torrent->type->name) ->map( - fn ($torrentsBytype) => $torrentsBytype + fn ($torrentsByType) => $torrentsByType ->sortBy([ ['resolution.position', 'asc'], ['name', 'asc'], diff --git a/app/Http/Livewire/SubscribedTopic.php b/app/Http/Livewire/SubscribedTopic.php index 4f11037ef..8f0e27f1d 100644 --- a/app/Http/Livewire/SubscribedTopic.php +++ b/app/Http/Livewire/SubscribedTopic.php @@ -37,7 +37,7 @@ class SubscribedTopic extends Component 'user.group', 'latestPoster', 'forum', - 'reads' => fn ($query) => $query->whereBelongsto(auth()->user()), + 'reads' => fn ($query) => $query->whereBelongsTo(auth()->user()), ]) ->whereRelation('subscribedUsers', 'users.id', '=', auth()->id()) ->authorized(canReadTopic: true) diff --git a/app/Http/Livewire/TopicSearch.php b/app/Http/Livewire/TopicSearch.php index 7cc0d941d..e71475f68 100644 --- a/app/Http/Livewire/TopicSearch.php +++ b/app/Http/Livewire/TopicSearch.php @@ -85,7 +85,7 @@ class TopicSearch extends Component 'user.group', 'latestPoster', 'forum', - 'reads' => fn ($query) => $query->whereBelongsto(auth()->user()), + 'reads' => fn ($query) => $query->whereBelongsTo(auth()->user()), ]) ->authorized(canReadTopic: true) ->when($this->search !== '', fn ($query) => $query->where('name', 'LIKE', '%'.$this->search.'%')) @@ -107,7 +107,7 @@ class TopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '>', 'last_read_post_id') ) ) @@ -117,7 +117,7 @@ class TopicSearch extends Component ->whereHas( 'reads', fn ($query) => $query - ->whereBelongsto(auth()->user()) + ->whereBelongsTo(auth()->user()) ->whereColumn('last_post_id', '=', 'last_read_post_id') ) ) diff --git a/app/Http/Livewire/TorrentSearch.php b/app/Http/Livewire/TorrentSearch.php index c36c682f9..11414b1bc 100644 --- a/app/Http/Livewire/TorrentSearch.php +++ b/app/Http/Livewire/TorrentSearch.php @@ -755,7 +755,7 @@ class TorrentSearch extends Component ->values() ->groupBy(fn ($torrent) => $torrent->type->name) ->map( - fn ($torrentsBytype) => $torrentsBytype + fn ($torrentsByType) => $torrentsByType ->sortBy([ ['resolution.position', 'asc'], ['name', 'asc'], diff --git a/app/Http/Requests/StoreTorrentRequest.php b/app/Http/Requests/StoreTorrentRequest.php index 587645805..9310e5a64 100644 --- a/app/Http/Requests/StoreTorrentRequest.php +++ b/app/Http/Requests/StoreTorrentRequest.php @@ -248,7 +248,7 @@ class StoreTorrentRequest extends FormRequest public function messages(): array { return [ - 'igdb.in' => 'The IGBB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not uploading a game.', + 'igdb.in' => 'The IGDB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not uploading a game.', 'tmdb.in' => 'The TMDB ID must be 0 if the media doesn\'t exist on TMDB or you\'re not uploading a tv show or movie.', 'imdb.in' => 'The IMDB ID must be 0 if the media doesn\'t exist on IMDB or you\'re not uploading a tv show or movie.', 'tvdb.in' => 'The TVDB ID must be 0 if the media doesn\'t exist on TVDB or you\'re not uploading a tv show.', diff --git a/app/Http/Requests/StoreTorrentRequestRequest.php b/app/Http/Requests/StoreTorrentRequestRequest.php index 280e7db4b..6938e5587 100644 --- a/app/Http/Requests/StoreTorrentRequestRequest.php +++ b/app/Http/Requests/StoreTorrentRequestRequest.php @@ -132,7 +132,7 @@ class StoreTorrentRequestRequest extends FormRequest public function messages(): array { return [ - 'igdb.in' => 'The IGBB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not requesting a game.', + 'igdb.in' => 'The IGDB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not requesting a game.', 'tmdb.in' => 'The TMDB ID must be 0 if the media doesn\'t exist on TMDB or you\'re not requesting a tv show or movie.', 'imdb.in' => 'The IMDB ID must be 0 if the media doesn\'t exist on IMDB or you\'re not requesting a tv show or movie.', 'tvdb.in' => 'The TVDB ID must be 0 if the media doesn\'t exist on TVDB or you\'re not requesting a tv show.', diff --git a/app/Listeners/RegisteredListener.php b/app/Listeners/RegisteredListener.php index 27c399e35..a05b331d3 100644 --- a/app/Listeners/RegisteredListener.php +++ b/app/Listeners/RegisteredListener.php @@ -38,7 +38,7 @@ readonly class RegisteredListener \sprintf('[url=%s]%s[/url], Welcome to ', $profileUrl, $user->username).config('other.title').'! Hope you enjoy the community.', \sprintf("[url=%s]%s[/url], We've been expecting you.", $profileUrl, $user->username), \sprintf("[url=%s]%s[/url] has arrived. Party's over.", $profileUrl, $user->username), - \sprintf("It's a bird! It's a plane! Nevermind, it's just [url=%s]%s[/url].", $profileUrl, $user->username), + \sprintf("It's a bird! It's a plane! Never mind, it's just [url=%s]%s[/url].", $profileUrl, $user->username), \sprintf('Ready player [url=%s]%s[/url].', $profileUrl, $user->username), \sprintf('A wild [url=%s]%s[/url] appeared.', $profileUrl, $user->username), 'Welcome to '.config('other.title').\sprintf(' [url=%s]%s[/url]. We were expecting you.', $profileUrl, $user->username), diff --git a/app/Models/Comment.php b/app/Models/Comment.php index b4ac4b419..5dd9e3e17 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -121,7 +121,7 @@ class Comment extends Model } /** - * Nootify Staff There Is Stale Tickets. + * Notify Staff There Is Stale Tickets. */ public static function checkForStale(Ticket $ticket): void { diff --git a/app/Models/DonationPackage.php b/app/Models/DonationPackage.php index 39662de05..6ac9ed7b3 100644 --- a/app/Models/DonationPackage.php +++ b/app/Models/DonationPackage.php @@ -38,7 +38,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; */ class DonationPackage extends Model { - /** @use HasFactory<\Database\Factories\DonationPackagefactory> */ + /** @use HasFactory<\Database\Factories\DonationPackageFactory> */ use HasFactory; use SoftDeletes; diff --git a/app/Models/Torrent.php b/app/Models/Torrent.php index 6ae01987e..1b6f73368 100644 --- a/app/Models/Torrent.php +++ b/app/Models/Torrent.php @@ -808,9 +808,9 @@ class Torrent extends Model */ public function isFreeleech(?User $user = null): bool { - $pfree = $user && ($user->group->is_freeleech || cache()->get('personal_freeleech:'.$user->id)); + $isFreeleech = $user && ($user->group->is_freeleech || cache()->get('personal_freeleech:'.$user->id)); - return $this->free || config('other.freeleech') || $pfree; + return $this->free || config('other.freeleech') || $isFreeleech; } /** diff --git a/app/Notifications/NewUnfollow.php b/app/Notifications/NewUnfollow.php index 95a7963d1..270fa79e1 100644 --- a/app/Notifications/NewUnfollow.php +++ b/app/Notifications/NewUnfollow.php @@ -26,7 +26,7 @@ class NewUnfollow extends Notification implements ShouldQueue use Queueable; /** - * NewUnfolllow Constructor. + * NewUnfollow Constructor. */ public function __construct(public string $type, public User $unfollower) { diff --git a/app/Notifications/UserBan.php b/app/Notifications/UserBan.php index 36d38a7ad..a8e1fd33b 100644 --- a/app/Notifications/UserBan.php +++ b/app/Notifications/UserBan.php @@ -47,12 +47,12 @@ class UserBan extends Notification */ public function toMail(object $notifiable): MailMessage { - $chatdUrl = config('unit3d.chat-link-url'); + $chatUrl = config('unit3d.chat-link-url'); return (new MailMessage()) ->greeting('You have been banned 😭') ->line('You have been banned from '.config('other.title').' for '.$this->ban->ban_reason) - ->action('Need Support?', $chatdUrl) + ->action('Need Support?', $chatUrl) ->line('Thank you for using 🚀'.config('other.title')); } } diff --git a/app/Notifications/UserMaxWarningsReached.php b/app/Notifications/UserMaxWarningsReached.php index 06aafda26..a7389b5e8 100644 --- a/app/Notifications/UserMaxWarningsReached.php +++ b/app/Notifications/UserMaxWarningsReached.php @@ -51,7 +51,7 @@ class UserMaxWarningsReached extends Notification return (new MailMessage()) ->greeting('Max Hit and Run Warnings Reached!') - ->line('You have hit the limit on active Hit and Run Warnings! Your download privilliges have been revoked!') + ->line('You have hit the limit on active Hit and Run Warnings! Your download privileges have been revoked!') ->action('View Unsatisfied Torrents to seed off your warnings or wait until they expire!', $profileUrl) ->line('Thank you for using 🚀'.config('other.title')); } @@ -65,7 +65,7 @@ class UserMaxWarningsReached extends Notification { return [ 'title' => 'Max Hit and Run Warnings Reached!', - 'body' => 'You have hit the limit on active Hit and Run Warnings! Your download privilliges have been revoked!', + 'body' => 'You have hit the limit on active Hit and Run Warnings! Your download privileges have been revoked!', 'url' => \sprintf('/users/%s', $this->user->username), ]; } diff --git a/app/Repositories/ChatRepository.php b/app/Repositories/ChatRepository.php index 4bcc49bb6..f31e5242c 100644 --- a/app/Repositories/ChatRepository.php +++ b/app/Repositories/ChatRepository.php @@ -351,9 +351,9 @@ class ChatRepository } } - foreach (config('censor.replace') as $word => $rword) { + foreach (config('censor.replace') as $word => $replacementWord) { if (Str::contains($message, $word)) { - $message = str_replace($word, $rword, (string) $message); + $message = str_replace($word, $replacementWord, (string) $message); } } diff --git a/app/Services/Tmdb/Client/Movie.php b/app/Services/Tmdb/Client/Movie.php index 8efadc5a2..8c29f848a 100644 --- a/app/Services/Tmdb/Client/Movie.php +++ b/app/Services/Tmdb/Client/Movie.php @@ -283,7 +283,7 @@ class Movie $titleSort = null; if ($this->data['release_date'] !== null) { - $re = '/((?.*)(?\:|and)(?.*)|(?.*))/m'; + $re = '/((?.*)(?\:|and)(?.*)|(?.*))/m'; preg_match($re, $this->data['title'], $matches); $year = (new DateTime($this->data['release_date']))->format('Y'); @@ -291,7 +291,7 @@ class Movie $titleSort = addslashes(str_replace( ['The ', 'An ', 'A ', '"'], [''], - Str::limit($matches['namesort'] ?? $this->data['title'].' '.$year, 100) + Str::limit($matches['nameSort'] ?? $this->data['title'].' '.$year, 100) )); } diff --git a/config/audit.php b/config/audit.php index d7e0cbb51..324867641 100644 --- a/config/audit.php +++ b/config/audit.php @@ -47,7 +47,7 @@ return [ /* |-------------------------------------------------------------------------- - | Recyle Old Audit Records + | Recycle Old Audit Records |-------------------------------------------------------------------------- | | In Days! diff --git a/config/backup.php b/config/backup.php index 18462423f..94b1491a6 100644 --- a/config/backup.php +++ b/config/backup.php @@ -104,7 +104,7 @@ return [ ], /* - * The database dump can be compressed to decrease diskspace usage. + * The database dump can be compressed to decrease disk space usage. * * Out of the box Laravel-backup supplies * Spatie\DbDumper\Compressors\GzipCompressor::class. diff --git a/config/email-blacklist.php b/config/email-blacklist.php index ada271103..b4411f529 100644 --- a/config/email-blacklist.php +++ b/config/email-blacklist.php @@ -16,7 +16,7 @@ declare(strict_types=1); return [ /* |-------------------------------------------------------------------------- - | Email Domain Blackist Validation + | Email Domain Blacklist Validation |-------------------------------------------------------------------------- | | The email domain blacklist validation rule uses a remote or local source diff --git a/config/graveyard.php b/config/graveyard.php index 353b7d307..d08d9ac74 100644 --- a/config/graveyard.php +++ b/config/graveyard.php @@ -30,7 +30,7 @@ return [ | Seedtime |-------------------------------------------------------------------------- | - | Time In Seconds Needed For Successful Ressurection (Default: 2592000seconds / 30days) + | Time In Seconds Needed For Successful Resurrection (Default: 2592000seconds / 30days) | */ diff --git a/config/hitrun.php b/config/hitrun.php index 2517fa825..b18662286 100644 --- a/config/hitrun.php +++ b/config/hitrun.php @@ -41,7 +41,7 @@ return [ | Max Warnings |-------------------------------------------------------------------------- | - | Max Warnings Before Download Privliges Disabled + | Max Warnings Before Download Privileges Disabled | */ diff --git a/config/livewire.php b/config/livewire.php index db5407ae2..ad0f2be41 100644 --- a/config/livewire.php +++ b/config/livewire.php @@ -2,6 +2,8 @@ declare(strict_types=1); +// cspell:ignore mpga + return [ /* |--------------------------------------------------------------------------- diff --git a/config/other.php b/config/other.php index 76f1fc487..47abab994 100644 --- a/config/other.php +++ b/config/other.php @@ -70,7 +70,7 @@ return [ /* |-------------------------------------------------------------------------- - | Freelech State + | Freeleech State |-------------------------------------------------------------------------- | | Global Freeleech diff --git a/cspell.json b/cspell.json new file mode 100644 index 000000000..4b5cb042c --- /dev/null +++ b/cspell.json @@ -0,0 +1,282 @@ +{ + "version": "0.2", + "language": "en", + "words": [ + "amoled", + "apikey", + "bbcode", + "chatbox", + "cinematographed", + "commentable", + "commenters", + "comparate", + "comparates", + "dcma", + "downloaders", + "fa-crosshairs", + "fa-wpforms", + "fbclid", + "followees", + "freeleech", + "freeleeches", + "gitupdate", + "hsts", + "leechtime", + "nord", + "participations", + "prewarn", + "prewarning", + "reindex", + "remux", + "rsses", + "rsskey", + "rsskeys", + "runbot", + "seedbonus", + "seedsize", + "shoutbox", + "stickied", + "stylesheet", + "subforum", + "sublicensable", + "supervisorctl", + "textareas", + "totp", + "trumpable", + "unactivated", + "unban", + "unbans", + "unbookmark", + "unbookmarked", + "unclaims", + "uncompromised", + "unconnectable", + "unfollow", + "unfollowed", + "unfollower", + "unfollows", + "unmark", + "unmoderated", + "unparticipated", + "unsatisfieds", + "unsnooze", + "unsticky", + "unvalidated", + "uploaders", + "upsert", + "upserting", + "upserts", + "webfonts", + "winzip", + "woot", + ], + "ignoreWords": [ + "abcdef0123456789", + "aboutus", + "activefl", + "apimatch", + "appurl", + "auth.appl-closed", + "auth.appl-intro", + "auth.appl-reason", + "autocat", + "autodis", + "autogroup", + "autoigdb", + "autoimdb", + "autokeywords", + "automal", + "autoreg", + "autores", + "autotmdb", + "autotvdb", + "banneduser", + "chatbody", + "chatrooms", + "chatstatus", + "chatstatuses", + "clientblacklist", + "doubleup", + "doubleupload", + "extremeuser", + "healthcheck", + "helpdesk", + "hiddencaptcha", + "highresolution", + "highspeed", + "hitandruns", + "hitrun", + "howto", + "insaneuser", + "javascripts", + "latestversion", + "linethrough", + "masspm", + "mediahub", + "modq", + "namedquote", + "nerdbot", + "nerdstat", + "nontouch", + "noteduser", + "openreg", + "orderedlistalpha", + "orderedlistnumerical", + "invites_restriced", + "personalrelease", + "poweruser", + "quicksearch", + "revokefeature", + "request.dont-have-bps", + "shoutout", + "shoutouts", + "signups", + "sitename", + "softdelete", + "sparkels", + "staffban", + "staffdeletedwarning", + "staffuser", + "staffwarning", + "statsgroupmenu", + "statsrequestmenu", + "statstorrentmenu", + "statsusermenu", + "stat.request-pending-aproval", + "systembot", + "testcode", + "testuser", + "torrenttitle", + "torrent.revokefeatured", + "unorderedlist", + "userban", + "userlist", + "userwarning", + "warneduser", + "watchlist", + "welcomepm", + ], + "ignoreRegExpList": [ + "bitcoin-address", + ], + "patterns": [ + { + "name": "bitcoin-address", + "pattern": "/[a-z0-9]{42}/", + } + ], + "ignorePaths": [ + "app/Console/Commands/DemoSeed.php", + "app/Helpers/Markdown.php", + "app/Helpers/MarkdownExtra.php", + "app/Helpers/MediaInfo.php", + "config/censor.php", + "config/language.php", + "config/secure-headers.php", + "database/migrations/20{1,2{0,1,2,3,4}}*", + "database/schema/mysql-schema.sql", + "database/seeders/DistributorsTableSeeder.php", + "database/seeders/MediaLanguagesSeeder.php", + "lang/", + "public/vendor/livewire/livewire.js", + "resources/js/unit3d/helper.js", + "resources/js/unit3d/parser.js", + "resources/js/vendor", + "resources/sass/vendor", + "resources/views/vendor/mail", + "tests/Unit/Helpers/MarkdownExtraTest.php", + "composer.json", + "package.json", + "phpstan.neon", + "pint.json", + "*.svg", + ], + "dictionaries": [ + "bittorrent", + "blade", + "brands", + "dependencies", + "dependency_terms", + "html", + "irc", + "laravel", + "mysql", + "people", + "php", + "php_constants", + "php_functions", + "redis", + ], + "dictionaryDefinitions": [ + { + "name": "bittorrent", + "path": "./.cspell/bittorrent.txt", + "addWords": false + }, + { + "name": "blade", + "path": "./.cspell/blade.txt", + "addWords": false + }, + { + "name": "brands", + "path": "./.cspell/brands.txt", + "addWords": false + }, + { + "name": "dependencies", + "path": "./.cspell/dependencies.txt", + "addWords": false + }, + { + "name": "dependency_terms", + "path": "./.cspell/dependency_terms.txt", + "addWords": false + }, + { + "name": "html", + "path": "./.cspell/html.txt", + "addWords": false + }, + { + "name": "irc", + "path": "./.cspell/irc.txt", + "addWords": false + }, + { + "name": "laravel", + "path": "./.cspell/laravel.txt", + "addWords": false + }, + { + "name": "mysql", + "path": "./.cspell/mysql.txt", + "addWords": false + }, + { + "name": "people", + "path": "./.cspell/people.txt", + "addWords": false + }, + { + "name": "php", + "path": "./.cspell/php.txt", + "addWords": false + }, + { + "name": "php_functions", + "path": "./.cspell/php_functions.txt", + "addWords": false + }, + { + "name": "php_constants", + "path": "./.cspell/php_constants.txt", + "addWords": false + }, + { + "name": "redis", + "path": "./.cspell/redis.txt", + "addWords": false + }, + ], +} diff --git a/database/seeders/PagesTableSeeder.php b/database/seeders/PagesTableSeeder.php index 242262369..4b8f0e3b0 100644 --- a/database/seeders/PagesTableSeeder.php +++ b/database/seeders/PagesTableSeeder.php @@ -20,6 +20,8 @@ use App\Models\Page; use Illuminate\Database\Seeder; use Illuminate\Support\Facades\DB; +// cspell:ignore orwill + class PagesTableSeeder extends Seeder { public function run(): void diff --git a/docker-compose.yml b/docker-compose.yml index 6e9ea122e..7b09e3ef2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +# cspell:ignore initdb,meili,mysqladmin,mysqld,wwwgroup,wwwuser services: nginx: image: 'nginx:latest' diff --git a/docs/README.md b/docs/README.md index eade43194..3499aa2f3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,3 +1,3 @@ # Wiki -This wiki serves as the central resource for setting up, managing, and optimising your UNIT3D installation. Whether you're working on local development, managing a production server, or contributing to the open-source community, you'll find a number of useful guides here. \ No newline at end of file +This wiki serves as the central resource for setting up, managing, and optimizing your UNIT3D installation. Whether you're working on local development, managing a production server, or contributing to the open-source community, you'll find a number of useful guides here. \ No newline at end of file diff --git a/docs/basic_tuning.md b/docs/basic_tuning.md index 94091f99d..4bf340768 100644 --- a/docs/basic_tuning.md +++ b/docs/basic_tuning.md @@ -1,5 +1,7 @@ # Basic Tuning + + > [!IMPORTANT] > These guides are intended for UNIT3D v8.0.0 + instances. While these are better than defaults be careful blindly following them. Proper tuning requires understanding your server, running tests and monitoring the results. @@ -13,7 +15,7 @@ If your Redis service is running on your web server, it is highly recommended that you use **Unix sockets** instead of **TCP ports** to communicate with your web server. -Based on the Redis official benchmark, you can **improve performance by upto 50%** using unix sockets (versus TCP ports) on Redis. +Based on the Redis official benchmark, you can **improve performance by up to 50%** using unix sockets (versus TCP ports) on Redis. Of course, unix sockets can only be used if both your Laravel application and Redis are running on the same server. @@ -96,7 +98,7 @@ sudo systemctl restart redis If your MySQL database is running on your web server, it is highly recommended that you use **Unix sockets** instead of **TCP ports** to communicate with your web server. -Based on Percona's benchmark, you can **improve performance by upto 50%** using unix sockets (versus TCP portson MySQL. +Based on Percona's benchmark, you can **improve performance by up to 50%** using unix sockets (versus TCP ports on MySQL). Of course, unix sockets can only be used if both your UNIT3D application and database are running on the same server which is by default. diff --git a/docs/local_development_arch_linux.md b/docs/local_development_arch_linux.md index 9d5b180d7..837986d60 100644 --- a/docs/local_development_arch_linux.md +++ b/docs/local_development_arch_linux.md @@ -1,5 +1,7 @@ # UNIT3D v8.x.x on Arch Linux with Laravel Sail + + _A guide by EkoNesLeg_ This guide outlines the steps to set up UNIT3D using Laravel Sail on Arch Linux. While the guide highlights the use of Arch Linux, the instructions can be adapted to other environments. diff --git a/docs/server_management.md b/docs/server_management.md index c548a9d25..352cf5fa6 100644 --- a/docs/server_management.md +++ b/docs/server_management.md @@ -1,5 +1,7 @@ # Server Management + + > [!IMPORTANT] > The following assumptions are made: > @@ -61,7 +63,7 @@ bun run build Use `certbot` to refresh the TLS certificate: ```sh - certbot --redirect --nginx -n --agree-tos --email=sysop@yourdomain.tld -d yourdomain.tld -d www.yourdomain.tld --rsa-key-size 2048 + certbot --redirect --nginx -n --agree-tos --email=sysop@your_domain.tld -d your_domain.tld -d www.your_domain.tld --rsa-key-size 2048 ``` 3. **Update the WebSocket Configuration:** diff --git a/docs/sharing_source_code.md b/docs/sharing_source_code.md index c913d4b1d..2098452a8 100644 --- a/docs/sharing_source_code.md +++ b/docs/sharing_source_code.md @@ -30,6 +30,7 @@ To create a tarball that includes only the modified source code and excludes sen Add the following to the file: + ```plaintext .env node_modules @@ -79,6 +80,7 @@ To create a tarball that includes only the modified source code and excludes sen lib/js/tests.html lib/js/tests/npm-debug.log ``` + ### 2.2 Create the Tarball diff --git a/docs/torrent_api.md b/docs/torrent_api.md index da2fe3468..d966e8cdd 100644 --- a/docs/torrent_api.md +++ b/docs/torrent_api.md @@ -20,7 +20,7 @@ There are several ways of passing the API token to UNIT3D. We'll discuss each of UNIT3D's API consumers may specify their token as an `api_token` query string value: ```php - $response = $client->request('GET', '/api/torrents?api_token=YOURTOKENHERE); + $response = $client->request('GET', '/api/torrents?api_token=YOUR_TOKEN_HERE); ``` - **Request Payload** @@ -33,7 +33,7 @@ There are several ways of passing the API token to UNIT3D. We'll discuss each of 'Accept' => 'application/json', ], 'form_params' => [ - 'api_token' => YOURTOKENHERE, + 'api_token' => 'YOUR_TOKEN_HERE', ], ]); ``` @@ -45,7 +45,7 @@ There are several ways of passing the API token to UNIT3D. We'll discuss each of ```php $response = $client->request('POST', '/api/torrents', [ 'headers' => [ - 'Authorization' => 'Bearer YOURTOKENHERE, + 'Authorization' => 'Bearer YOUR_TOKEN_HERE', 'Accept' => 'application/json', ], ]); @@ -78,9 +78,9 @@ Parameters: | `imdb` | int | IMDB ID | `tvdb` | int | TVDB ID | `mal` | int | MAL ID -| `igdb` | int | IGBD ID (Games only) +| `igdb` | int | IGDB ID (Games only) | `anonymous` | bool | Should the uploader's username be hidden? -| `stream` | bool | Is the torrent's content stream-optimised? +| `stream` | bool | Is the torrent's content stream-optimized? | `sd` | bool | Is the torrent's content standard definition? | `personal_release` | bool | Is the torrent's content created by the uploader? | `internal`* | bool | Is the torrent an internal release? @@ -147,7 +147,7 @@ Optional Parameters: | `doubleup` | bool | Filter by if the torrent offers double upload | `featured` | bool | Filter by if the torrent is featured on the front page | `refundable` | bool | Filter by if the torrent is refundable -| `stream` | bool | Filter by if the torrent's content is stream-optimised +| `stream` | bool | Filter by if the torrent's content is stream-optimized | `sd` | bool | Filter by if the torrent's content is standard definition | `highspeed` | bool | Filter by if the torrent has seeders whose IP address has been registered as a seedbox | `internal` | bool | Filter by if the torrent is an internal release diff --git a/docs/upgrading_php_version.md b/docs/upgrading_php_version.md index fce2b0d67..9e7352f59 100644 --- a/docs/upgrading_php_version.md +++ b/docs/upgrading_php_version.md @@ -1,5 +1,7 @@ # Upgrading PHP Version + + ## Upgrade to PHP 8 `sudo apt update` @@ -28,7 +30,7 @@ Next lets edit NGINX to use new PHP8 Find `fastcgi_pass unix:/var/run/php/***.sock;` -`***` will be your sitename, unit3d or php7.4 for the most part +`***` will be your site name, unit3d or php7.4 for the most part Replace `fastcgi_pass unix:/var/run/php/***.sock;` with `fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;`. @@ -36,7 +38,7 @@ Save and exit. Test config `sudo nginx -t` -*If you didnt mess up you will see +*If you didn't mess up you will see ``` nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -78,7 +80,7 @@ Next lets edit NGINX to use new PHP 8.1 Find `fastcgi_pass unix:/var/run/php/***.sock;` -`***` will be your sitename, unit3d or php8.0 for the most part +`***` will be your site name, unit3d or php8.0 for the most part Replace `fastcgi_pass unix:/var/run/php/***.sock;` with `fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;`. @@ -86,7 +88,7 @@ Save and exit. Test config `sudo nginx -t` -*If you didnt mess up you will see +*If you didn't mess up you will see ``` nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -129,7 +131,7 @@ Next lets edit NGINX to use new PHP 8.2 Find `fastcgi_pass unix:/var/run/php/***.sock;` -`***` will be your sitename, unit3d or php8.1 for the most part +`***` will be your site name, unit3d or php8.1 for the most part Replace `fastcgi_pass unix:/var/run/php/***.sock;` with `fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;`. @@ -137,7 +139,7 @@ Save and exit. Test config `sudo nginx -t` -*If you didnt mess up you will see +*If you didn't mess up you will see ``` nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -176,7 +178,7 @@ Next lets edit NGINX to use new PHP 8.3 Find `fastcgi_pass unix:/var/run/php/***.sock;` -`***` will be your sitename, unit3d or php8.2 for the most part +`***` will be your site name, unit3d or php8.2 for the most part Replace `fastcgi_pass unix:/var/run/php/***.sock;` with `fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;`. @@ -184,7 +186,7 @@ Save and exit. Test config `sudo nginx -t` -*If you didnt mess up you will see +*If you didn't mess up you will see ``` nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful diff --git a/public/img/meta/bluray.svg b/public/img/meta/blu-ray.svg similarity index 100% rename from public/img/meta/bluray.svg rename to public/img/meta/blu-ray.svg diff --git a/resources/sass/components/_swal.scss b/resources/sass/components/_swal.scss index 7fdf96780..b2c19273e 100644 --- a/resources/sass/components/_swal.scss +++ b/resources/sass/components/_swal.scss @@ -1,5 +1,5 @@ /* purgecss start ignore /* -/* Position top-end postioned swal2 notifications below the top nav */ +/* Position top-end positioned swal2 notifications below the top nav */ .swal2-top-end { margin-top: 40px; } diff --git a/resources/sass/components/_tooltips.scss b/resources/sass/components/_tooltips.scss index 4b9368ec0..46bec2668 100644 --- a/resources/sass/components/_tooltips.scss +++ b/resources/sass/components/_tooltips.scss @@ -106,4 +106,4 @@ opacity: 1; transition: opacity 0.15s; } -/* purgecss endss ignore */ +/* purgecss end ignore */ diff --git a/resources/views/Staff/command/index.blade.php b/resources/views/Staff/command/index.blade.php index 2ca7f7469..3bd9ad4bc 100644 --- a/resources/views/Staff/command/index.blade.php +++ b/resources/views/Staff/command/index.blade.php @@ -34,7 +34,7 @@
@csrf - +
{{ $entry['stacktrace'] }}
diff --git a/resources/views/livewire/two-factor-auth-form.blade.php b/resources/views/livewire/two-factor-auth-form.blade.php index 00e06dcbc..48a258792 100644 --- a/resources/views/livewire/two-factor-auth-form.blade.php +++ b/resources/views/livewire/two-factor-auth-form.blade.php @@ -21,7 +21,7 @@
- {{ __('When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from a syncronized 2fa app such as Google Authenticator, Authy, BitWarden, etc.') }} + {{ __('When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from a synchronized 2fa app such as Google Authenticator, Authy, BitWarden, etc.') }}
diff --git a/resources/views/mediahub/genre/index.blade.php b/resources/views/mediahub/genre/index.blade.php index 84e8e8e88..7d7967c31 100644 --- a/resources/views/mediahub/genre/index.blade.php +++ b/resources/views/mediahub/genre/index.blade.php @@ -27,7 +27,7 @@ @foreach ($genres as $genre)
  • {{ $genre->name }}

    diff --git a/resources/views/partials/top_nav.blade.php b/resources/views/partials/top_nav.blade.php index 6c122907a..b324a5d87 100755 --- a/resources/views/partials/top_nav.blade.php +++ b/resources/views/partials/top_nav.blade.php @@ -119,7 +119,7 @@ $tickets = DB::table('tickets') ->whereNull('closed_at') ->whereNull('staff_id') - ->orwhere(function ($query) { + ->orWhere(function ($query) { $query ->where('staff_id', '=', auth()->id()) ->Where('staff_read', '=', false); diff --git a/resources/views/torrent/partials/movie_meta.blade.php b/resources/views/torrent/partials/movie_meta.blade.php index a49177280..60ce6105c 100755 --- a/resources/views/torrent/partials/movie_meta.blade.php +++ b/resources/views/torrent/partials/movie_meta.blade.php @@ -156,6 +156,7 @@
  • imdb_id ?? 0) > 0) -
  • +
  • - +
  • @endif diff --git a/resources/views/torrent/partials/tv_meta.blade.php b/resources/views/torrent/partials/tv_meta.blade.php index 2afca6807..c28d8708c 100755 --- a/resources/views/torrent/partials/tv_meta.blade.php +++ b/resources/views/torrent/partials/tv_meta.blade.php @@ -155,6 +155,7 @@
  • imdb_id ?? 0) > 0) -
  • +
  • - +
  • @endif diff --git a/resources/views/torrent/show.blade.php b/resources/views/torrent/show.blade.php index 5af44b4b2..a0ba86b6f 100644 --- a/resources/views/torrent/show.blade.php +++ b/resources/views/torrent/show.blade.php @@ -82,6 +82,6 @@ {{-- Extra Meta Block --}} @include('torrent.partials.extra_meta') - {{-- Commments Block --}} + {{-- Comments Block --}} @include('torrent.partials.comments') @endsection diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php index a39d979f2..92b12b319 100644 --- a/resources/views/vendor/notifications/email.blade.php +++ b/resources/views/vendor/notifications/email.blade.php @@ -47,6 +47,7 @@ {{ config('app.name') }} @endif +{{-- cspell:words subcopy --}} {{-- Subcopy --}} @isset($actionText) @slot('subcopy') diff --git a/routes/web.php b/routes/web.php index 44cc6d099..1bb939f71 100644 --- a/routes/web.php +++ b/routes/web.php @@ -864,8 +864,8 @@ Route::middleware('language')->group(function (): void { // Commands Route::prefix('commands')->middleware('owner')->group(function (): void { Route::get('/', [App\Http\Controllers\Staff\CommandController::class, 'index'])->name('commands.index'); - Route::post('/maintance-enable', [App\Http\Controllers\Staff\CommandController::class, 'maintanceEnable']); - Route::post('/maintance-disable', [App\Http\Controllers\Staff\CommandController::class, 'maintanceDisable']); + Route::post('/maintenance-enable', [App\Http\Controllers\Staff\CommandController::class, 'maintenanceEnable']); + Route::post('/maintenance-disable', [App\Http\Controllers\Staff\CommandController::class, 'maintenanceDisable']); Route::post('/clear-cache', [App\Http\Controllers\Staff\CommandController::class, 'clearCache']); Route::post('/clear-view-cache', [App\Http\Controllers\Staff\CommandController::class, 'clearView']); Route::post('/clear-route-cache', [App\Http\Controllers\Staff\CommandController::class, 'clearRoute']); @@ -977,7 +977,7 @@ Route::middleware('language')->group(function (): void { }); // Laravel Log Viewer - Route::get('/laravel-log', App\Http\Livewire\LaravelLogViewer::class)->middleware('owner')->name('laravellog.index'); + Route::get('/laravel-log', App\Http\Livewire\LaravelLogViewer::class)->middleware('owner')->name('laravel-log.index'); // Leakers Route::prefix('leakers')->group(function (): void { @@ -1001,7 +1001,7 @@ Route::middleware('language')->group(function (): void { }); }); - // Media Lanuages (Languages Used To Populate Language Dropdowns For Subtitles / Audios / Etc.) + // Media Languages (Languages Used To Populate Language Dropdowns For Subtitles / Audios / Etc.) Route::prefix('media-languages')->group(function (): void { Route::name('media_languages.')->group(function (): void { Route::get('/', [App\Http\Controllers\Staff\MediaLanguageController::class, 'index'])->name('index'); @@ -1187,7 +1187,7 @@ Route::middleware('language')->group(function (): void { }); }); - // Internal Useres + // Internal Users Route::prefix('internal-users')->group(function (): void { Route::name('internal_users.')->group(function (): void { Route::post('/', [App\Http\Controllers\Staff\InternalUserController::class, 'store'])->name('store'); diff --git a/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php b/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php index 2268b4863..6237785ef 100644 --- a/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php +++ b/tests/Feature/Http/Controllers/PlaylistTorrentControllerTest.php @@ -48,7 +48,7 @@ test('destroy aborts with a 403', function (): void { $response->assertForbidden(); }); -test('massupsert validates with a form request', function (): void { +test('mass upsert validates with a form request', function (): void { $this->assertActionUsesFormRequest( PlaylistTorrentController::class, 'massUpsert', diff --git a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php index ec67e4b5d..662cee8c7 100644 --- a/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php +++ b/tests/Feature/Http/Controllers/Staff/CommandControllerTest.php @@ -99,7 +99,7 @@ test('index returns an ok response', function (): void { // TODO: perform additional assertions }); -test('maintance disable returns an ok response', function (): void { +test('maintenance disable returns an ok response', function (): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); $user = User::factory()->create(); @@ -113,7 +113,7 @@ test('maintance disable returns an ok response', function (): void { // TODO: perform additional assertions }); -test('maintance enable returns an ok response', function (): void { +test('maintenance enable returns an ok response', function (): void { $this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.'); $user = User::factory()->create(); diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php index 707627506..bb62c3e44 100644 --- a/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php +++ b/tests/Unit/Http/Requests/StoreTorrentRequestRequestTest.php @@ -78,7 +78,7 @@ test('messages', function (): void { $actual = $this->subject->messages(); expect($actual)->toEqual([ - 'igdb.in' => 'The IGBB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not requesting a game.', + 'igdb.in' => 'The IGDB ID must be 0 if the media doesn\'t exist on IGDB or you\'re not requesting a game.', 'tmdb.in' => 'The TMDB ID must be 0 if the media doesn\'t exist on TMDB or you\'re not requesting a tv show or movie.', 'imdb.in' => 'The IMDB ID must be 0 if the media doesn\'t exist on IMDB or you\'re not requesting a tv show or movie.', 'tvdb.in' => 'The TVDB ID must be 0 if the media doesn\'t exist on TVDB or you\'re not requesting a tv show.', diff --git a/tests/Unit/Http/Requests/StoreTorrentRequestTest.php b/tests/Unit/Http/Requests/StoreTorrentRequestTest.php index 84133b4cd..521bea881 100644 --- a/tests/Unit/Http/Requests/StoreTorrentRequestTest.php +++ b/tests/Unit/Http/Requests/StoreTorrentRequestTest.php @@ -127,7 +127,7 @@ test('messages', function (): void { $actual = $this->subject->messages(); expect($actual)->toEqual([ - 'igdb.in' => "The IGBB ID must be 0 if the media doesn't exist on IGDB or you're not uploading a game.", + 'igdb.in' => "The IGDB ID must be 0 if the media doesn't exist on IGDB or you're not uploading a game.", 'tmdb.in' => "The TMDB ID must be 0 if the media doesn't exist on TMDB or you're not uploading a tv show or movie.", 'imdb.in' => "The IMDB ID must be 0 if the media doesn't exist on IMDB or you're not uploading a tv show or movie.", 'tvdb.in' => "The TVDB ID must be 0 if the media doesn't exist on TVDB or you're not uploading a tv show.",