Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot
2022-04-15 03:06:49 +00:00
parent 199f3a9fcd
commit 8a83d61241
+2 -2
View File
@@ -724,13 +724,13 @@ class TorrentController extends Controller
$torrent = Torrent::withAnyStatus()->findOrFail($id);
$hasHistory = $user->history()->where([['info_hash', '=', $torrent->info_hash], ['seeder', '=', 1]])->count();
// User's ratio is too low
if ($user->getRatio() < \config('other.ratio') && ! ($torrent->user_id === $user->id || $hasHistory ) ) {
if ($user->getRatio() < \config('other.ratio') && ! ($torrent->user_id === $user->id || $hasHistory)) {
return \to_route('torrent', ['id' => $torrent->id])
->withErrors('Your Ratio Is Too Low To Download!');
}
// User's download rights are revoked
if ($user->can_download == 0 && ! ($torrent->user_id === $user->id || $hasHistory ) ) {
if ($user->can_download == 0 && ! ($torrent->user_id === $user->id || $hasHistory)) {
return \to_route('torrent', ['id' => $torrent->id])
->withErrors('Your Download Rights Have Been Revoked!');
}