Apply fixes from StyleCI

This commit is contained in:
HDVinnie
2019-01-13 13:31:42 +00:00
committed by StyleCI Bot
parent 3830ce6dc4
commit 2697b36a46
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -26,7 +26,6 @@ use App\Repositories\TorrentFacetedRepository;
class RssController extends Controller
{
/**
* @var TorrentFacetedRepository
*/
@@ -384,6 +383,7 @@ class RssController extends Controller
{
$rss = auth()->user()->rss()->where('is_private', '=', 1)->findOrFail($id);
$rss->delete();
return redirect()->route('rss.index.hash', ['hash' => 'private'])
->with($this->toastr->success('RSS Feed Deleted!', 'Yay!', ['options']));
}
@@ -217,6 +217,7 @@ class RssController extends Controller
{
$rss = auth()->user()->rss()->where('is_private', '=', 0)->findOrFail($id);
$rss->delete();
return redirect()->route('Staff.rss.index')
->with($this->toastr->success('RSS Feed Deleted!', 'Yay!', ['options']));
}
+1 -3
View File
@@ -872,13 +872,11 @@ class TorrentController extends Controller
*/
public function download($slug, $id, $rsskey = null)
{
$user = auth()->user();
if (!$user && $rsskey) {
if (! $user && $rsskey) {
$user = User::where('rsskey', '=', $rsskey)->firstOrFail();
}
$torrent = Torrent::withAnyStatus()->findOrFail($id);
// User's ratio is too low
+2
View File
@@ -81,6 +81,7 @@ class Rss extends Model
// Went with attribute to avoid () calls in views. Uniform ->object_torrent vs ->json_torrent.
if ($this->json_torrent) {
$expected = $this->expected_fields;
return (object) array_merge($expected, $this->json_torrent);
}
@@ -99,6 +100,7 @@ class Rss extends Model
'mal' => null, 'categories' => null, 'types' => null, 'genres' => null, 'freeleech' => null,
'doubleupload' => null, 'featured' => null, 'stream' => null, 'highspeed' => null, 'internal' => null,
'alive' => null, 'dying' => null, 'dead' => null, 'sd' => null, ];
return $expected_fields;
}