Apply fixes from StyleCI

[ci skip] [skip ci]
This commit is contained in:
HDVinnie
2019-12-23 04:25:21 +00:00
committed by StyleCI Bot
parent b57ed65d93
commit d4f48c272f
5 changed files with 6 additions and 8 deletions
+2 -4
View File
@@ -2,12 +2,10 @@
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class BaseController extends Controller
{
public function sendResponse($result, $message)
{
$response = [
@@ -26,10 +24,10 @@ class BaseController extends Controller
'message' => $error,
];
if(!empty($errorMessages)){
if (! empty($errorMessages)) {
$response['data'] = $errorMessages;
}
return response()->json($response, $code);
}
}
}
@@ -411,6 +411,7 @@ class TorrentController extends BaseController
return $this->sendResponse('404', 'No Torrents Found');
}
}
/**
* Anonymize A Torrent Media Info.
*
+1 -1
View File
@@ -31,9 +31,9 @@ use App\Models\UserNotification;
use App\Models\UserPrivacy;
use App\Models\Warning;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Image;
use ZipArchive;
+2 -2
View File
@@ -15,7 +15,7 @@ class TorrentResource extends JsonResource
{
return [
'type' => 'torrent',
'id' => (string)$this->id,
'id' => (string) $this->id,
'attributes' => [
'name' => $this->name,
'release_year' => $this->release_year,
@@ -30,7 +30,7 @@ class TorrentResource extends JsonResource
'mal_id' => $this->mal,
'igdb_id' => $this->igdb,
'created_at' => $this->created_at->toDayDateTimeString(),
'download_link' => route('torrent.download.rsskey', ['id' => $this->id, 'rsskey' => auth('api')->user()->rsskey])
'download_link' => route('torrent.download.rsskey', ['id' => $this->id, 'rsskey' => auth('api')->user()->rsskey]),
],
];
}
-1
View File
@@ -10,7 +10,6 @@
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author HDVinnie
*/
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;