Completed
Pull Request — develop (#106)
by Neil
20:39
created

EventlogController::show()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * app/Api/Controllers/General/EventlogController.php
4
 *
5
 * API Controller for eventlog data
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  2016 Neil Lathwood
23
 * @author     Neil Lathwood <[email protected]>
24
 */
25
26
namespace App\Api\Controllers\General;
27
28
use App\Api\Controllers\Controller;
29
use App\Models\General\Eventlog;
30
use App\Models\Alerting\Log;
31
use Dingo\Api\Http;
32
use Dingo\Api\Routing\Helpers;
33
use Illuminate\Http\Request;
34
35
class EventlogController extends Controller
36
{
37
38
    use Helpers;
39
40
    /**
41
     * Display a listing of all alerts
42
     *
43
     * @param Request $request
44
     * @return \Illuminate\Http\Response
0 ignored issues
show
Documentation introduced by
Should the return type not be \Illuminate\Pagination\LengthAwarePaginator?

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...
45
     */
46
    public function index(Request $request)
47
    {
48
        $per_page = $request->per_page ?: 25;
49
        return Eventlog::query()->paginate($per_page);
50
    }
51
52
53
    /**
54
     * Show the form for creating a new resource.
55
     *
56
     * @return \Illuminate\Http\Response|null
57
     */
58
    public function create()
59
    {
60
        //
61
    }
62
63
    /**
64
     * Store a newly created resource in storage.
65
     *
66
     * @param  \Illuminate\Http\Request  $request
67
     * @return \Illuminate\Http\Response|null
68
     */
69
    public function store(Request $request)
70
    {
71
        //
72
    }
73
74
    /**
75
     * Display the specified resource.
76
     *
77
     * @param  int  $id
78
     * @return \Illuminate\Http\Response|null
79
     */
80
    public function show(Request $request, $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...
81
    {
82
        //
83
    }
84
85
    /**
86
     * Show the form for editing the specified resource.
87
     *
88
     * @param  int  $id
89
     * @return \Illuminate\Http\Response|null
90
     */
91
    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...
92
    {
93
        //
94
    }
95
96
    /**
97
     * Update the specified resource in storage.
98
     *
99
     * @param  \Illuminate\Http\Request  $request
100
     * @param  int  $id
101
     * @return \Illuminate\Http\Response|null
102
     */
103
    public function update(Request $request, $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...
104
    {
105
        //
106
    }
107
108
    /**
109
     * Remove the specified resource from storage.
110
     *
111
     * @param  int  $id
112
     * @return \Illuminate\Http\Response|null
113
     */
114
    public function destroy($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...
115
    {
116
        //
117
    }
118
119
}
120