Completed
Push — route_cleanup ( fa8e4e )
by Tony
02:59
created

PortController::edit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Dingo\Api\Http;
6
use Dingo\Api\Routing\Helpers;
7
use Illuminate\Http\Request;
8
9
class PortController extends Controller
10
{
11
    use Helpers;
12
13
    /**
14
     * Display a listing of the resource.
15
     *
16
     * @return \Illuminate\Http\Response
17
     */
18
    public function index()
19
    {
20
        $api = $this->api->be(auth()->user());
0 ignored issues
show
Bug introduced by
The method user() does not seem to exist on object<Illuminate\Contracts\Auth\Factory>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
21
        $ports = $api->get('/api/ports?include=device');
22
23
        return view('ports.list', ['ports'=>$ports]);
24
    }
25
26
    /**
27
     * Display the specified resource.
28
     *
29
     * @param  int  $id
30
     * @return \Illuminate\Http\Response
31
     */
32
    public function show($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

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

Loading history...
33
    {
34
        // show a single device
35
    }
36
37
    /**
38
     * Show the form for editing the specified resource.
39
     *
40
     * @param  int  $id
41
     * @return \Illuminate\Http\Response
42
     */
43
    public function edit($id)
0 ignored issues
show
Unused Code introduced by
The parameter $id is not used and could be removed.

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

Loading history...
44
    {
45
        //edit device form??
46
    }
47
48
    /**
49
     * Update the specified resource in storage.
50
     *
51
     * @param  \Illuminate\Http\Request  $request
52
     * @param  int  $id
53
     * @return \Illuminate\Http\Response
54
     */
55
    public function update(Request $request, $id)
1 ignored issue
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from 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.

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

Loading history...
56
    {
57
        //process device modify
58
    }
59
}
60