Completed
Push — master ( e13ad7...8c1ba7 )
by Eric
04:05
created

ApiCompleteTaskController::destroy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 9.4285
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Http\Requests\DestroyCompletedTask;
6
use App\Http\Requests\StoreCompletedTask;
7
use App\Task;
8
use Illuminate\Http\Request;
9
10
class ApiCompleteTaskController extends Controller
11
{
12
    public function store(StoreCompletedTask $request, Task $task)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

12
    public function store(/** @scrutinizer ignore-unused */ StoreCompletedTask $request, Task $task)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
13
    {
14
        $task->completed = true;
15
        $task->save();
16
        return $task;
17
    }
18
19
    public function destroy(DestroyCompletedTask $request, Task $task)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

19
    public function destroy(/** @scrutinizer ignore-unused */ DestroyCompletedTask $request, Task $task)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
    {
21
        $task->completed = false;
22
        $task->save();
23
        return $task;
24
    }
25
}
26