Completed
Push — fixes ( 6830e4...798510 )
by Tony
03:34
created

PortController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
c 2
b 1
f 0
lcom 1
cbo 3
dl 0
loc 51
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A index() 0 7 1
A show() 0 4 1
A edit() 0 4 1
A update() 0 4 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Auth;
6
use Dingo\Api\Http;
7
use Dingo\Api\Routing\Helpers;
8
use Illuminate\Http\Request;
9
10
class PortController extends Controller
11
{
12
    use Helpers;
13
14
    /**
15
     * Display a listing of the resource.
16
     *
17
     * @return \Illuminate\Http\Response
18
     */
19
    public function index()
20
    {
21
        $api = $this->api->be(Auth::user());
22
        $ports = $api->get('/api/ports?include=device');
23
24
        return view('ports.list', ['ports' => $ports]);
25
    }
26
27
    /**
28
     * Display the specified resource.
29
     *
30
     * @param  int $id
31
     * @return \Illuminate\Http\Response
32
     */
33
    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...
34
    {
35
        // show a single device
36
    }
37
38
    /**
39
     * Show the form for editing the specified resource.
40
     *
41
     * @param  int $id
42
     * @return \Illuminate\Http\Response
43
     */
44
    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...
45
    {
46
        //edit device form??
47
    }
48
49
    /**
50
     * Update the specified resource in storage.
51
     *
52
     * @param  \Illuminate\Http\Request $request
53
     * @param  int $id
54
     * @return \Illuminate\Http\Response
55
     */
56
    public function update(Request $request, $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...
57
    {
58
        //process device modify
59
    }
60
}
61