Completed
Push — develop ( fbf31c...a8c0b8 )
by Tony
19:53
created
app/Console/Commands/DeleteUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function handle()
63 63
     {
64 64
         $user = $this->argument('user');
65
-        $user_list = User::select('username')->where('username', 'like', '%' . $user . '%')->orWhere('realname', 'like', '%' . $user . '%')->get();
65
+        $user_list = User::select('username')->where('username', 'like', '%'.$user.'%')->orWhere('realname', 'like', '%'.$user.'%')->get();
66 66
         $names = [];
67 67
 
68 68
         if (count($user_list) < 1) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         else {
79 79
             $name = $names[0];
80 80
         }
81
-        if ($this->confirm('Do you wish to remove ' . $name . '?')) {
81
+        if ($this->confirm('Do you wish to remove '.$name.'?')) {
82 82
             User::where('username', $name)->delete();
83 83
             $this->info('User deleted.');
84 84
         }
Please login to merge, or discard this patch.
app/Api/Controllers/WidgetController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * Display a listing of all widgets
17 17
      *
18
-     * @return \Illuminate\Http\Response
18
+     * @return \Illuminate\Database\Eloquent\Collection
19 19
      */
20 20
     public function index(Request $request)
21 21
     {
Please login to merge, or discard this patch.
app/Api/Controllers/DashboardController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             'name' => 'required|max:255',
52 52
             'access' => 'required',
53 53
         ]);
54
-        if($validation->passes())
54
+        if ($validation->passes())
55 55
         {
56 56
             $dashboard = new dashboard;
57 57
             $dashboard->dashboard_name = $request->name;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
         else {
80 80
             $errors = $validation->errors();
81
-            return response()->json($errors,422);
81
+            return response()->json($errors, 422);
82 82
         }
83 83
     }
84 84
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             'name' => 'required|max:255',
124 124
             'access' => 'required',
125 125
         ]);
126
-        if($validation->passes())
126
+        if ($validation->passes())
127 127
         {
128 128
             $dashboard = Dashboard::find($id);
129 129
             $dashboard->dashboard_name = $request->name;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         }
139 139
         else {
140 140
             $errors = $validation->errors();
141
-            return response()->json($errors,422);
141
+            return response()->json($errors, 422);
142 142
         }
143 143
     }
144 144
 
Please login to merge, or discard this patch.
app/Api/Controllers/DashboardWidgetController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function store(Request $request)
48 48
     {
49
-        $row                         = Dashboard::find($request->dashboard_id)->widgets()->max('row')+1;
49
+        $row                         = Dashboard::find($request->dashboard_id)->widgets()->max('row') + 1;
50 50
         $user_widget                 = new UsersWidgets;
51 51
         $user_widget->user_id        = $request->user()->user_id;
52 52
         $user_widget->widget_id      = $request->widget_id;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     public function show(Request $request, $id)
75 75
     {
76 76
         $widget  = Widgets::find($id);
77
-        $content = $this->api->be(auth()->user())->get('/api/dashboard-widget/' . $id . '/content');
77
+        $content = $this->api->be(auth()->user())->get('/api/dashboard-widget/'.$id.'/content');
78 78
         return array('widget' => $widget, 'content' => $content);
79 79
     }
80 80
 
Please login to merge, or discard this patch.
app/Api/Transformers/NotificationTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function transform(Notification $notification)
32 32
     {
33 33
         return [
34
-            'id'       => (int)$notification->notifications_id,
34
+            'id'       => (int) $notification->notifications_id,
35 35
             'title'    => $notification->title,
36 36
             'body'     => $notification->body,
37 37
             'source'   => $notification->source,
Please login to merge, or discard this patch.
app/Models/UsersWidgets.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     // ---- Define Relationships ----
65 65
 
66 66
     /**
67
-     * @return \Illuminate\Database\Eloquent\Relations\HasOne
67
+     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
68 68
      */
69 69
     public function user()
70 70
     {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     }
81 81
 
82 82
     /**
83
-     * @return \Illuminate\Database\Eloquent\Relations\HasOne
83
+     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
84 84
      */
85 85
     public function dashboard()
86 86
     {
Please login to merge, or discard this patch.
app/Settings.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
      * Or when the user is not a global admin.
186 186
      *
187 187
      * @param string $key The path to check
188
-     * @return bool|string false or the source: config | auth
188
+     * @return string|false false or the source: config | auth
189 189
      */
190 190
     public function isReadOnly($key)
191 191
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
      */
190 190
     public function isReadOnly($key)
191 191
     {
192
-        if(Config::has('config.'.$key)) {
192
+        if (Config::has('config.'.$key)) {
193 193
             return 'config';
194 194
         }
195 195
         $user = \Auth::user();
Please login to merge, or discard this patch.
app/Models/Alerting/Log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
     public function getTimeLoggedAttribute($date)
97 97
     {
98 98
         if ($date) {
99
-            return strtotime($date)*1000;
99
+            return strtotime($date) * 1000;
100 100
         }
101 101
     }
102 102
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Alerting/StatsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function index(Request $request)
40 40
     {
41
-        $data = Log::join('alert_rules', 'alert_rules.id', '=', 'alert_log.rule_id')->where('state', '!=', '0')->groupBy('time_logged')->groupBy('alert_rules.severity')->select('time_logged','alert_rules.severity',\DB::raw('COUNT(alert_log.id) as total'))->get();
41
+        $data = Log::join('alert_rules', 'alert_rules.id', '=', 'alert_log.rule_id')->where('state', '!=', '0')->groupBy('time_logged')->groupBy('alert_rules.severity')->select('time_logged', 'alert_rules.severity', \DB::raw('COUNT(alert_log.id) as total'))->get();
42 42
         $output = array();
43 43
         foreach ($data as $log) {
44 44
             $output[$log->severity]['label'] = $log->severity;
Please login to merge, or discard this patch.