Completed
Pull Request — develop (#200)
by Tony
05:44
created

WidgetDataController::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
/**
3
 * WidgetDataController.php
4
 *
5
 * Provides data for widgets
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 * @package    LibreNMS
21
 * @link       http://librenms.org
22
 * @copyright  2017 Tony Murray
23
 * @author     Tony Murray <[email protected]>
24
 */
25
26
namespace App\Api\Controllers;
27
28
use App\Data\WidgetDataFactory;
29
use Illuminate\Http\Request;
30
31
class WidgetDataController extends Controller
32
{
33
    /**
34
     * Display a listing of the resource.
35
     *
36
     * @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...
37
     */
38
    public function index()
39
    {
40
        //
41
    }
42
43
    /**
44
     * Show the form for creating a new resource.
45
     *
46
     * @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...
47
     */
48
    public function create()
49
    {
50
        //
51
    }
52
53
    /**
54
     * Store a newly created resource in storage.
55
     *
56
     * @param  \Illuminate\Http\Request $request
57
     * @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...
58
     */
59
    public function store(Request $request)
60
    {
61
        //
62
    }
63
64
    /**
65
     * Display the specified resource.
66
     *
67
     * @param Request $request
68
     * @param  int $id
69
     * @return array
70
     */
71
    public function show(Request $request, $id)
72
    {
73
        return WidgetDataFactory::createById($id)->get($request);
74
    }
75
76
    /**
77
     * Show the form for editing the specified resource.
78
     *
79
     * @param  int $id
80
     * @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...
81
     */
82
    public function edit($id)
83
    {
84
        //
85
    }
86
87
    /**
88
     * Update the specified resource in storage.
89
     *
90
     * @param  \Illuminate\Http\Request $request
91
     * @param  int $id
92
     * @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...
93
     */
94
    public function update(Request $request, $id)
95
    {
96
        //
97
    }
98
99
    /**
100
     * Remove the specified resource from storage.
101
     *
102
     * @param  int $id
103
     * @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...
104
     */
105
    public function destroy($id)
106
    {
107
        //
108
    }
109
}
110