Completed
Push — laravel-53 ( d20994...55a2d7 )
by Tony
03:18
created
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/Http/Controllers/UserPortController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param AdminOnlyRequest $request
47 47
      * @param $user_id
48 48
      * @param $port_id
49
-     * @return mixed
49
+     * @return \Illuminate\Http\RedirectResponse
50 50
      */
51 51
     public function store(AdminOnlyRequest $request, $user_id)
52 52
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param AdminOnlyRequest $request
70 70
      * @param $user_id
71 71
      * @param $port_id
72
-     * @return mixed
72
+     * @return \Illuminate\Http\RedirectResponse
73 73
      */
74 74
     public function destroy(AdminOnlyRequest $request, $user_id, $port_id)
75 75
     {
Please login to merge, or discard this patch.
app/Http/Controllers/UserDeviceController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param AdminOnlyRequest $request
47 47
      * @param $user_id
48 48
      * @param $port_id
49
-     * @return mixed
49
+     * @return \Illuminate\Http\RedirectResponse
50 50
      */
51 51
     public function store(AdminOnlyRequest $request, $user_id)
52 52
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param AdminOnlyRequest $request
70 70
      * @param $user_id
71 71
      * @param $port_id
72
-     * @return mixed
72
+     * @return \Illuminate\Http\RedirectResponse
73 73
      */
74 74
     public function destroy(AdminOnlyRequest $request, $user_id, $port_id)
75 75
     {
Please login to merge, or discard this patch.
app/Api/Controllers/DashboardWidgetController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      */
74 74
     public function show(Request $request, $id)
75 75
     {
76
-        $widget  = Widgets::find($id);
76
+        $widget = Widgets::find($id);
77 77
         return array('widget' => $widget);
78 78
     }
79 79
 
Please login to merge, or discard this patch.
app/Http/Controllers/DeviceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
      *
19 19
      * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
20 20
      */
21
-    public function index(DeviceDataTable $dataTable, $group_id=-1)
21
+    public function index(DeviceDataTable $dataTable, $group_id = -1)
22 22
     {
23 23
         $group_name = "";
24
-        if($group_id >= 0) {
24
+        if ($group_id >= 0) {
25 25
             $dataTable->addScope(new \App\DataTables\Scopes\DeviceGroup($group_id));
26 26
             $group_name = DeviceGroup::find($group_id)->name;
27 27
         }
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
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * Store a newly created resource in storage.
58 58
      *
59 59
      * @param  \Illuminate\Http\Request  $request
60
-     * @return \Illuminate\Http\Response
60
+     * @return \Illuminate\Http\JsonResponse
61 61
      */
62 62
     public function store(Request $request)
63 63
     {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * Display the specified resource.
71 71
      *
72 72
      * @param  int  $id
73
-     * @return \Illuminate\Http\Response
73
+     * @return \Illuminate\Http\RedirectResponse
74 74
      */
75 75
     public function show($id)
76 76
     {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @param  \Illuminate\Http\Request  $request
96 96
      * @param  int  $id
97
-     * @return \Illuminate\Http\Response
97
+     * @return \Illuminate\Http\JsonResponse
98 98
      */
99 99
     public function update(Request $request, $id)
100 100
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      * Remove the specified resource from storage.
109 109
      *
110 110
      * @param  int  $id
111
-     * @return \Illuminate\Http\Response
111
+     * @return \Illuminate\Http\JsonResponse
112 112
      */
113 113
     public function destroy($id)
114 114
     {
Please login to merge, or discard this patch.
app/Models/DeviceGroup.php 2 patches
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.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         }
170 170
 
171 171
         foreach (Settings::get('alert.macros.group', []) as $macro => $value) {
172
-            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value);  // this might need something more complex
172
+            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex
173 173
             if (!str_contains($macro, ' ')) {
174 174
                 $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern);
175 175
             }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         }
225 225
 
226 226
         // fill in parameters
227
-        foreach ((array)$this->params as $value) {
227
+        foreach ((array) $this->params as $value) {
228 228
             if (!is_numeric($value) && !starts_with($value, "'")) {
229 229
                 $value = "'".$value."'";
230 230
             }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         $related = $this->getRelation('deviceCountRelation')->first();
252 252
 
253 253
         // then return the count directly
254
-        return ($related) ? (int)$related->count : 0;
254
+        return ($related) ? (int) $related->count : 0;
255 255
     }
256 256
 
257 257
     /**
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/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         Route::group([
55 55
             'middleware' => 'web',
56 56
             'namespace' => $this->namespace,
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
             require base_path('routes/web.php');
59 59
         });
60 60
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'middleware' => ['api', 'jwt-auth'],
73 73
             'namespace' => $this->namespace,
74 74
             'prefix' => 'api',
75
-        ], function ($router) {
75
+        ], function($router) {
76 76
             require base_path('routes/api.php');
77 77
         });
78 78
     }
Please login to merge, or discard this patch.