Completed
Pull Request — develop (#184)
by Neil
25:03
created
app/Http/Controllers/General/SearchController.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 
26 26
 namespace App\Http\Controllers\General;
27 27
 
28
+use App\DataTables\General\ArpDataTable;
28 29
 use App\DataTables\General\IPv4DataTable;
29 30
 use App\DataTables\General\IPv6DataTable;
30 31
 use App\DataTables\General\MacDataTable;
31
-use App\DataTables\General\ArpDataTable;
32 32
 use App\Http\Controllers\Controller;
33 33
 use Illuminate\Http\Request;
34 34
 
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Update a notifications status.
46 46
      *
47
-     * @return \Illuminate\Http\Response
47
+     * @return \Illuminate\Http\JsonResponse
48 48
      */
49 49
     public function update($id, $action)
50 50
     {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Create a new notification
57 57
      *
58
-     * @return \Illuminate\Http\Response
58
+     * @return \Illuminate\Http\JsonResponse
59 59
      */
60 60
     public function create(Request $request)
61 61
     {
Please login to merge, or discard this patch.
app/DataTables/DeviceDataTable.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
 
26 26
 namespace App\DataTables;
27 27
 
28
-use App\Models\DeviceGroup;
29 28
 use App\Models\Device;
30 29
 
31 30
 class DeviceDataTable extends BaseDataTable
Please login to merge, or discard this patch.
app/Http/Controllers/DeviceGroupController.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * Store a newly created resource in storage.
59 59
      *
60 60
      * @param  \Illuminate\Http\Request $request
61
-     * @return \Illuminate\Http\Response
61
+     * @return \Illuminate\Http\JsonResponse
62 62
      */
63 63
     public function store(DeviceGroupRequest $request)
64 64
     {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * Display the specified resource.
72 72
      *
73 73
      * @param  int $id
74
-     * @return \Illuminate\Http\Response
74
+     * @return \Illuminate\Http\RedirectResponse
75 75
      */
76 76
     public function show($id)
77 77
     {
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      *
96 96
      * @param  \Illuminate\Http\Request $request
97 97
      * @param  int $id
98
-     * @return \Illuminate\Http\Response
98
+     * @return \Illuminate\Http\JsonResponse
99 99
      */
100 100
     public function update(DeviceGroupRequest $request, $id)
101 101
     {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      *
111 111
      * @param \Illuminate\Http\Request $request
112 112
      * @param  int $id
113
-     * @return \Illuminate\Http\Response
113
+     * @return \Illuminate\Http\JsonResponse
114 114
      * @throws \Exception
115 115
      */
116 116
     public function destroy(AdminOnlyRequest $request, $id)
Please login to merge, or discard this patch.
app/Models/DeviceGroup.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@
 block discarded – undo
203 203
      * Convert a v1 device group pattern to v2 style
204 204
      *
205 205
      * @param $pattern
206
-     * @return array
206
+     * @return string
207 207
      */
208 208
     private function convertV1Pattern($pattern)
209 209
     {
Please login to merge, or discard this patch.
app/QueryBuilderFilter.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@
 block discarded – undo
38 38
         return json_encode(self::generateMacroFilter('alert.macros.rule', self::generateTableFilter()));
39 39
     }
40 40
 
41
+    /**
42
+     * @param string $setting
43
+     */
41 44
     private static function generateMacroFilter($setting, $filter = [])
42 45
     {
43 46
         foreach (Settings::get($setting, []) as $key => $value) {
Please login to merge, or discard this patch.
app/Graphs/BaseGraph.php 2 patches
Doc Comments   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Get json output.
82 82
      *
83
-     * @return array
83
+     * @return string
84 84
      */
85 85
     public function json(Request $request)
86 86
     {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     /**
97 97
      * Get csv output.
98 98
      *
99
-     * @return array
99
+     * @return string|null
100 100
      */
101 101
     public function csv(Request $request)
102 102
     {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * Get png output.
113 113
      *
114
-     * @return array
114
+     * @return string|null
115 115
      */
116 116
     public function png(Request $request)
117 117
     {
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
     }
160 160
 
161 161
     /**
162
-     * @param $cmd
163
-     * @return mixed|string
162
+     * @param string $cmd
163
+     * @return string
164 164
      */
165 165
     public function runRRDGraph($cmd)
166 166
     {
@@ -176,6 +176,7 @@  discard block
 block discarded – undo
176 176
     /**
177 177
      * Run the RRD Xport query
178 178
      *
179
+     * @param string $query
179 180
      * @return string
180 181
      */
181 182
     public function runRRDXport($query)
@@ -196,6 +197,7 @@  discard block
 block discarded – undo
196 197
     /**
197 198
      * Run the RRD Xport query
198 199
      *
200
+     * @param string $response
199 201
      * @return string
200 202
      */
201 203
     public function parseRRDJson($response)
@@ -224,6 +226,7 @@  discard block
 block discarded – undo
224 226
     /**
225 227
      * Parse RRD output to csv
226 228
      *
229
+     * @param string $response
227 230
      * @return string
228 231
      */
229 232
     public function parseRRDCsv($response, $headers)
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,13 +23,11 @@
 block discarded – undo
23 23
 
24 24
 namespace App\Graphs;
25 25
 
26
+use App\Models\Device;
26 27
 use Carbon\Carbon;
27 28
 use Illuminate\Http\Request;
28
-use Symfony\Component\Process\Process;
29
-use Symfony\Component\Process\ProcessBuilder;
30 29
 use Symfony\Component\Process\Exception\ProcessFailedException;
31
-use App\Models\Device;
32
-use Settings;
30
+use Symfony\Component\Process\Process;
33 31
 
34 32
 class BaseGraph
35 33
 {
Please login to merge, or discard this patch.
app/Graphs/Device_bits.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -23,11 +23,6 @@
 block discarded – undo
23 23
 
24 24
 namespace App\Graphs;
25 25
 
26
-use Illuminate\Http\Request;
27
-use App\Models\Device;
28
-use Settings;
29
-use App\Models\Port;
30
-
31 26
 class Device_bits extends BaseGraph
32 27
 {
33 28
 
Please login to merge, or discard this patch.
app/Graphs/Device_processor.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,7 @@
 block discarded – undo
23 23
 
24 24
 namespace App\Graphs;
25 25
 
26
-use Illuminate\Http\Request;
27 26
 use App\Models\Device;
28
-use App\Models\Processor;
29 27
 use Settings;
30 28
 
31 29
 class Device_processor extends BaseGraph
Please login to merge, or discard this patch.