Test Failed
Push — master ( 7541d3...176ac5 )
by Burak
05:28
created

ThreadController::destroy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 1
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Http\Controllers\FrontEnd;
4
5
use App\Http\Controllers\Controller;
6
use App\Interfaces\MessageServiceInterface;
7
use App\Models\Thread;
8
use Illuminate\Http\Request;
9
10
class ThreadController extends Controller
11
{
12
    /**
13
     * @var MessageServiceInterface
14
     */
15
    public MessageServiceInterface $service;
16
17
    /**
18
     * @param MessageServiceInterface $service
19
     */
20
    public function __construct(MessageServiceInterface $service)
21
    {
22
        $this->service = $service;
23
    }
24
25
    /**
26
     * Display a listing of the resource.
27
     *
28
     * @return \Illuminate\Http\Response
29
     */
30
    public function index()
31
    {
32
        //
33
    }
34
35
    /**
36
     * Show the form for creating a new resource.
37
     *
38
     * @return \Illuminate\Http\Response
39
     */
40
    public function create()
41
    {
42
        //
43
    }
44
45
    /**
46
     * Store a newly created resource in storage.
47
     *
48
     * @param  \Illuminate\Http\Request  $request
49
     * @return \Illuminate\Http\Response
50
     */
51
    public function store(Request $request)
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

51
    public function store(/** @scrutinizer ignore-unused */ Request $request)

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...
52
    {
53
        //
54
    }
55
56
    /**
57
     * Display the specified resource.
58
     *
59
     * @param  string $thread
60
     * @return \Illuminate\Http\Response
61
     */
62
    public function show(string $thread)
63
    {
64
        $thread = $this->service->thread($thread);
65
66
        return view('thread', compact('thread'));
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('thread', compact('thread')) returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
67
    }
68
69
    /**
70
     * Show the form for editing the specified resource.
71
     *
72
     * @param  int  $id
73
     * @return \Illuminate\Http\Response
74
     */
75
    public function edit($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id 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

75
    public function edit(/** @scrutinizer ignore-unused */ $id)

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...
76
    {
77
        //
78
    }
79
80
    /**
81
     * Update the specified resource in storage.
82
     *
83
     * @param  \Illuminate\Http\Request  $request
84
     * @param  int  $id
85
     * @return \Illuminate\Http\Response
86
     */
87
    public function update(Request $request, $id)
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

87
    public function update(/** @scrutinizer ignore-unused */ Request $request, $id)

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...
Unused Code introduced by
The parameter $id 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

87
    public function update(Request $request, /** @scrutinizer ignore-unused */ $id)

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...
88
    {
89
        //
90
    }
91
92
    /**
93
     * Remove the specified resource from storage.
94
     *
95
     * @param  int  $id
96
     * @return \Illuminate\Http\Response
97
     */
98
    public function destroy($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id 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

98
    public function destroy(/** @scrutinizer ignore-unused */ $id)

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...
99
    {
100
        //
101
    }
102
}
103