mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-29 06:51:30 -05:00
refactor: better php8 usage
- Change simple property init and assign to constructor promotion - Remove unused variable in catch() - Change docs types to union types, where possible
This commit is contained in:
@@ -28,8 +28,6 @@ class ModerationController extends Controller
|
||||
{
|
||||
/**
|
||||
* ModerationController Constructor.
|
||||
*
|
||||
* @param \App\Repositories\ChatRepository $chatRepository
|
||||
*/
|
||||
public function __construct(private ChatRepository $chatRepository)
|
||||
{
|
||||
@@ -37,10 +35,8 @@ class ModerationController extends Controller
|
||||
|
||||
/**
|
||||
* Torrent Moderation Panel.
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$current = Carbon::now();
|
||||
$pending = Torrent::with(['user', 'category', 'type'])->pending()->get();
|
||||
@@ -96,7 +92,6 @@ class ModerationController extends Controller
|
||||
/**
|
||||
* Postpone A Torrent.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
@@ -133,7 +128,6 @@ class ModerationController extends Controller
|
||||
/**
|
||||
* Reject A Torrent.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user