Completed
Pull Request — develop (#98)
by Neil
22:06
created
app/Api/Controllers/Alerting/AlertsController.php 1 patch
Unused Use Statements   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,12 +17,11 @@
 block discarded – undo
17 17
  
18 18
 namespace App\Api\Controllers\Alerting;
19 19
 
20
-use App\Api\Transformers\AlertsTransformer;
20
+use App\Api\Controllers\Controller;
21
+use App\Models\Alerting\Alerts;
21 22
 use Dingo\Api\Http;
22 23
 use Dingo\Api\Routing\Helpers;
23 24
 use Illuminate\Http\Request;
24
-use App\Api\Controllers\Controller;
25
-use App\Models\Alerting\Alerts;
26 25
 
27 26
 class AlertsController extends Controller
28 27
 {
Please login to merge, or discard this patch.
app/Http/Controllers/Alerting/AlertsController.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,9 +19,8 @@
 block discarded – undo
19 19
 
20 20
 use Illuminate\Http\Request;
21 21
 
22
-use App\Http\Requests;
23
-use App\Http\Controllers\Controller;
24 22
 use App\DataTables\AlertsDataTable;
23
+use App\Http\Controllers\Controller;
25 24
 
26 25
 class AlertsController extends Controller
27 26
 {
Please login to merge, or discard this patch.
app/Api/Transformers/AlertsTransformer.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(Alerts $alerts)
32 32
     {
33 33
         return [
34
-            'id'        => (int)$alerts->id,
34
+            'id'        => (int) $alerts->id,
35 35
             'device_id' => $alerts->device_id,
36 36
             'rule_id'   => $alerts->rule_id,
37 37
             'state'     => $alerts->state,
Please login to merge, or discard this patch.
app/DataTables/AlertsDataTable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
                                     @else
43 43
                                         <div class="label label-primary">UNKNOWN</div>
44 44
                                     @endif')
45
-            ->editColumn('rule.name', function ($this) {
46
-                return '<a href="' . url("alerting/rules/".$this['rule']['id']) . '">' . $this['rule']['name'] . '</a>';
45
+            ->editColumn('rule.name', function($this) {
46
+                return '<a href="'.url("alerting/rules/".$this['rule']['id']).'">'.$this['rule']['name'].'</a>';
47 47
             })
48
-            ->editColumn('device.hostname', function ($this) {
49
-                return '<a href="' . url("devices/".$this['device']['device_id']) . '">' . $this['device']['hostname'] . '</a>';
48
+            ->editColumn('device.hostname', function($this) {
49
+                return '<a href="'.url("devices/".$this['device']['device_id']).'">'.$this['device']['hostname'].'</a>';
50 50
             })
51
-            ->addColumn('actions', function ($this) {
51
+            ->addColumn('actions', function($this) {
52 52
                 return '';
53 53
             })
54 54
             ->make(true);
Please login to merge, or discard this patch.