mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 10:08:31 -05:00
chore: adopt type hints
This commit is contained in:
@@ -23,11 +23,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Approved Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function approve($id)
|
||||
public function approve(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->approved = $topic->approved == 0 ? '1' : '0';
|
||||
@@ -40,11 +38,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Denied Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function deny($id)
|
||||
public function deny(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->denied = $topic->denied == 0 ? '1' : '0';
|
||||
@@ -57,11 +53,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Solved Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function solve($id)
|
||||
public function solve(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->solved = $topic->solved == 0 ? '1' : '0';
|
||||
@@ -74,11 +68,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Invalid Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function invalid($id)
|
||||
public function invalid(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->invalid = $topic->invalid == 0 ? '1' : '0';
|
||||
@@ -91,11 +83,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Bug Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function bug($id)
|
||||
public function bug(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->bug = $topic->bug == 0 ? '1' : '0';
|
||||
@@ -108,11 +98,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Suggestion Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function suggest($id)
|
||||
public function suggest(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->suggestion = $topic->suggestion == 0 ? '1' : '0';
|
||||
@@ -125,11 +113,9 @@ class TopicLabelController extends Controller
|
||||
/**
|
||||
* Apply/Remove Implemented Label.
|
||||
*
|
||||
* @param \App\Models\Topic $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function implement($id)
|
||||
public function implement(\App\Models\Topic $id): \Illuminate\Http\RedirectResponse
|
||||
{
|
||||
$topic = Topic::findOrFail($id);
|
||||
$topic->implemented = $topic->implemented == 0 ? '1' : '0';
|
||||
|
||||
Reference in New Issue
Block a user