Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
DariusIII
2019-06-03 12:13:07 +00:00
committed by StyleCI Bot
parent a67f04d60b
commit 74806b7983
3 changed files with 11 additions and 13 deletions
+1 -3
View File
@@ -5,14 +5,12 @@ namespace Blacklight;
use App\Models\Release;
use App\Models\Category;
use App\Models\Settings;
use Chumper\Zipper\Zipper;
use App\Models\UsenetGroup;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Arr;
use Blacklight\utility\Utility;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Cache;
use Illuminate\Database\Eloquent\Collection;
/**
* Class Releases.
+7 -7
View File
@@ -1,13 +1,13 @@
<?php
use App\Models\Release;
use Blacklight\NZB;
use Blacklight\utility\Utility;
use Chumper\Zipper\Zipper;
use Colors\Color;
use Blacklight\NZB;
use Blacklight\XXX;
use GuzzleHttp\Client;
use App\Models\Release;
use Chumper\Zipper\Zipper;
use Tuna\CloudflareMiddleware;
use Blacklight\utility\Utility;
use GuzzleHttp\Cookie\CookieJar;
use GuzzleHttp\Cookie\SetCookie;
use Illuminate\Support\Facades\DB;
@@ -367,8 +367,8 @@ if (! function_exists('makeFieldLinks')) {
{
$nzb = new NZB();
$zipped = new Zipper();
$zippedFileName = now()->format('Ymdhis') . '.nzb.zip';
$zippedFilePath = resource_path() . '/tmp/' . $zippedFileName;
$zippedFileName = now()->format('Ymdhis').'.nzb.zip';
$zippedFilePath = resource_path().'/tmp/'.$zippedFileName;
foreach ($guids as $guid) {
$nzbPath = $nzb->NZBPath($guid);
@@ -382,7 +382,7 @@ if (! function_exists('makeFieldLinks')) {
if ($r) {
$filename = $r['searchname'];
}
$zipped->make($zippedFilePath)->addString($filename . '.nzb', $nzbContents);
$zipped->make($zippedFilePath)->addString($filename.'.nzb', $nzbContents);
}
}
}
+3 -3
View File
@@ -7,13 +7,13 @@ use App\Models\User;
use App\Models\Release;
use App\Models\UserDownload;
use App\Models\UsersRelease;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Blacklight\utility\Utility;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\File;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class GetNzbController extends BasePageController
{
@@ -132,7 +132,7 @@ class GetNzbController extends BasePageController
$headers += ['X-DNZB-RCode' => '200',
'X-DNZB-RText' => 'OK, NZB content follows.', ];
return response()->streamDownload(function() use ($nzbPath) {
return response()->streamDownload(function () use ($nzbPath) {
readgzfile($nzbPath);
}, $cleanName.'.nzb', $headers);
}