PortController   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 51
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 3

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
0 ignored issues
show
Documentation introduced by
Should the return type not be \Illuminate\View\View|\I...\Contracts\View\Factory?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
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
0 ignored issues
show
Documentation introduced by
Should the return type not be \Illuminate\Http\Response|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
32
     */
33
    public function show($id)
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
0 ignored issues
show
Documentation introduced by
Should the return type not be \Illuminate\Http\Response|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
43
     */
44
    public function edit($id)
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
0 ignored issues
show
Documentation introduced by
Should the return type not be \Illuminate\Http\Response|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
55
     */
56
    public function update(Request $request, $id)
57
    {
58
        //process device modify
59
    }
60
}
61