Completed
Push — develop ( 5f1168...aa9d13 )
by Daniel
05:30
created

PortController::index()   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
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Dingo\Api\Http;
6
use Dingo\Api\Routing\Router;
7
use Dingo\Api\Routing\Helpers;
8
use App\Http\Requests;
9
use Illuminate\Http\Request;
10
use JWTAuth;
11
12
class PortController extends Controller
13
{
14
    use Helpers;
15
16
    /**
17
     * Constructor
18
     */
19
    public function __construct(Request $request) {
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...
20
        $this->middleware('auth');
21
    }
22
23
    /**
24
     * Display a listing of the resource.
25
     *
26
     * @return \Illuminate\Http\Response
27
     */
28
    public function index()
29
    {
30
        $ports = $this->api->be(auth()->user())->get('/api/ports');
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...
31
        return view('ports.list', ['ports'=>$ports]);
32
    }
33
34
    /**
35
     * Display the specified resource.
36
     *
37
     * @param  int  $id
38
     * @return \Illuminate\Http\Response
39
     */
40
    public function show($id)
1 ignored issue
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...
41
    {
42
        // show a single device
43
    }
44
45
    /**
46
     * Show the form for editing the specified resource.
47
     *
48
     * @param  int  $id
49
     * @return \Illuminate\Http\Response
50
     */
51
    public function edit($id)
1 ignored issue
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...
52
    {
53
        //edit device form??
54
    }
55
56
    /**
57
     * Update the specified resource in storage.
58
     *
59
     * @param  \Illuminate\Http\Request  $request
60
     * @param  int  $id
61
     * @return \Illuminate\Http\Response
62
     */
63
    public function update(Request $request, $id)
2 ignored issues
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...
64
    {
65
        //process device modify
66
    }
67
}
68