Completed
Push — laravel-5.4 ( 381f13 )
by Tony
02:37
created
app/DataTables/General/IPv6DataTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
     {
41 41
         return $this->datatables
42 42
             ->eloquent($this->query())
43
-            ->editColumn('hostname', function ($data) {
43
+            ->editColumn('hostname', function($data) {
44 44
                 $hostname = is_null($data->device) ? trans('devices.text.deleted') : $data->device->hostname;
45 45
                 return '<a href="'.url("devices/".$data->device_id).'">'.$hostname.'</a>';
46 46
             })
47
-            ->editColumn('ifName', function ($data) {
47
+            ->editColumn('ifName', function($data) {
48 48
                 $ifName = is_null($data->ifName) ? trans('devices.text.deleted') : $data->ifName;
49 49
                 return '<a href="'.url("devices/".$data->device_id."/ports/".$data->port_id).'">'.$ifName.'</a>';
50 50
             })
Please login to merge, or discard this patch.
app/Models/DeviceGroup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         }
173 173
 
174 174
         foreach (Settings::get('alert.macros.group', []) as $macro => $value) {
175
-            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value);  // this might need something more complex
175
+            $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex
176 176
             if (!str_contains($macro, ' ')) {
177 177
                 $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern);
178 178
             }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         $sql = $this->pattern;
299 299
 
300 300
         // fill in parameters
301
-        foreach ((array)$this->params as $value) {
301
+        foreach ((array) $this->params as $value) {
302 302
             if (!is_numeric($value) && !starts_with($value, "'")) {
303 303
                 $value = "'".$value."'";
304 304
             }
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
         $related = $this->getRelation('deviceCountRelation')->first();
324 324
 
325 325
         // then return the count directly
326
-        return ($related) ? (int)$related->count : 0;
326
+        return ($related) ? (int) $related->count : 0;
327 327
     }
328 328
 
329 329
     /**
Please login to merge, or discard this patch.
app/DataTables/General/SyslogDataTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function query()
54 54
     {
55
-        $syslog = Syslog::with(['device' => function ($query) {
55
+        $syslog = Syslog::with(['device' => function($query) {
56 56
             return $query->addSelect(['device_id', 'hostname']);
57 57
         }])->select('syslog.*');
58 58
         return $this->applyScopes($syslog);
Please login to merge, or discard this patch.
app/DataTables/General/ArpDataTable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,21 +41,21 @@
 block discarded – undo
41 41
     {
42 42
         return $this->datatables
43 43
             ->eloquent($this->query())
44
-            ->editColumn('hostname', function ($data) {
44
+            ->editColumn('hostname', function($data) {
45 45
                 $hostname = is_null($data->device) ? trans('devices.text.deleted') : $data->device->hostname;
46 46
                 return '<a href="'.url("devices/".$data->device_id).'">'.$hostname.'</a>';
47 47
             })
48
-            ->editColumn('ifName', function ($data) {
48
+            ->editColumn('ifName', function($data) {
49 49
                 $ifName = is_null($data->ifName) ? trans('devices.text.deleted') : $data->ifName;
50 50
                 return '<a href="'.url("devices/".$data->device_id."/ports/".$data->port_id).'">'.$ifName.'</a>';
51 51
             })
52
-            ->addColumn('remote_device', function ($data) {
52
+            ->addColumn('remote_device', function($data) {
53 53
                 $remote_device = IPv4::where('ipv4_addresses.ipv4_address', $data->ipv4_address)->with('port.device')->first();
54 54
                 $remote_id = empty($remote_device->port->device->device_id) ? '' : $remote_device->port->device->device_id;
55 55
                 $remote_hostname = empty($remote_device->port->device->hostname) ? '' : $remote_device->port->device->hostname;
56 56
                 return '<a href="'.url("devices/".$remote_id).'">'.$remote_hostname.'</a>';
57 57
             })
58
-            ->addColumn('remote_interface', function ($data) {
58
+            ->addColumn('remote_interface', function($data) {
59 59
                 $remote_device = IPv4::where('ipv4_addresses.ipv4_address', $data->ipv4_address)->with('port.device')->first();
60 60
                 $remote_id = empty($remote_device->port->device->device_id) ? '' : $remote_device->port->device->device_id;
61 61
                 $remote_port_id = empty($remote_device->port->port_id) ? '' : $remote_device->port->port_id;
Please login to merge, or discard this patch.
app/DataTables/General/UserDataTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     {
40 40
         return $this->datatables
41 41
             ->eloquent($this->query())
42
-            ->editColumn('level', function ($user) {
42
+            ->editColumn('level', function($user) {
43 43
                 return trans('user.level.'.$user->level);
44 44
             })
45 45
             ->editColumn('actions', 'datatables.user.actions')
Please login to merge, or discard this patch.