Adopt PSR-2 coding style

The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
This commit is contained in:
Laravel Shift
2018-07-18 20:13:14 +00:00
parent 3a273990d5
commit 5c1c56d2ca
50 changed files with 180 additions and 203 deletions
+15 -16
View File
@@ -292,7 +292,6 @@ class RequestController extends Controller
return redirect()->route('requests')
->with(Toastr::error($v->errors()->toJson(), 'Whoops!', ['options']));
} else {
$tr->save();
$requestsBounty = new TorrentRequestBounty();
@@ -497,27 +496,27 @@ class RequestController extends Controller
'info_hash' => "required|exists:torrents,info_hash",
]);
if ($v->passes()) {
$torrent = Torrent::where('info_hash', $request->input('info_hash'))->firstOrFail();
if ($v->passes()) {
$torrent = Torrent::where('info_hash', $request->input('info_hash'))->firstOrFail();
if ($user->id == $torrent->user_id) {
$this->addRequestModeration($request->input('request_id'), $request->input('info_hash'));
if ($user->id == $torrent->user_id) {
$this->addRequestModeration($request->input('request_id'), $request->input('info_hash'));
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::success('Your request fill is pending approval by the Requestor.', 'Yay!', ['options']));
} elseif ($user->id != $torrent->user_id && Carbon::now()->addDay() > $torrent->created_at) {
$this->addRequestModeration($request->input('request_id'), $request->input('info_hash'));
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::success('Your request fill is pending approval by the Requestor.', 'Yay!', ['options']));
} elseif ($user->id != $torrent->user_id && Carbon::now()->addDay() > $torrent->created_at) {
$this->addRequestModeration($request->input('request_id'), $request->input('info_hash'));
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::success('Your request fill is pending approval by the Requestor.', 'Yay!', ['options']));
} else {
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::error('You cannot fill this request for some weird reason', 'Whoops!', ['options']));
}
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::success('Your request fill is pending approval by the Requestor.', 'Yay!', ['options']));
} else {
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::error('You failed to adhere to the requirements.', 'Whoops!', ['options']));
->with(Toastr::error('You cannot fill this request for some weird reason', 'Whoops!', ['options']));
}
} else {
return redirect()->route('request', ['id' => $request->input('request_id')])
->with(Toastr::error('You failed to adhere to the requirements.', 'Whoops!', ['options']));
}
}
/**