Completed
Push — graph-cache ( 447735 )
by Tony
10:09
created
app/DataTables/General/EventlogDataTable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      */
106 106
     public function getAjax()
107 107
     {
108
-        return url('eventlog?device_id=' . $this->device_id);
108
+        return url('eventlog?device_id='.$this->device_id);
109 109
     }
110 110
 
111 111
     public function forDevice($device_id)
Please login to merge, or discard this patch.
app/Data/RRDXport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         } elseif ($format == 'csv') {
68 68
             return $this->csvSerialize();
69 69
         }
70
-        return null;  // shouldn't get here
70
+        return null; // shouldn't get here
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     private function getOutput()
79 79
     {
80
-        return Cache::tags('graphs')->remember($this->key, 5, function () {
80
+        return Cache::tags('graphs')->remember($this->key, 5, function() {
81 81
             $output = $this->run();
82 82
             $output = preg_replace('/\'/', '"', $output);
83 83
             $output = preg_replace('/about\:/', '"meta":', $output);
Please login to merge, or discard this patch.
app/Data/RRD.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
     public static function escape($string, $length = null)
192 192
     {
193 193
         $result = shorten_interface_type($string);
194
-        $result = str_replace("'", '', $result);            # remove quotes
195
-        $result = str_replace('%', '%%', $result);          # double percent signs
194
+        $result = str_replace("'", '', $result); # remove quotes
195
+        $result = str_replace('%', '%%', $result); # double percent signs
196 196
         if (is_numeric($length) && strlen($string) > $length) {
197 197
             $extra = substr_count($string, ':', 0, $length);
198 198
             $result = substr(str_pad($result, $length), 0, ($length + $extra));
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             }
202 202
         }
203 203
 
204
-        $result = str_replace(':', '\:', $result);          # escape colons
204
+        $result = str_replace(':', '\:', $result); # escape colons
205 205
         return $result.' ';
206 206
     }
207 207
 }
Please login to merge, or discard this patch.
app/Data/RRDGraph.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     {
58 58
         $this->checkFormatSupported($format);
59 59
 
60
-        return Cache::tags('graphs')->remember($this->key, 5, function () {
60
+        return Cache::tags('graphs')->remember($this->key, 5, function() {
61 61
             return base64_encode($this->run());
62 62
         });
63 63
     }
Please login to merge, or discard this patch.
app/Graphs/Device/Storage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'storage' => function (Builder $query) {
36
+                'storage' => function(Builder $query) {
37 37
                     $query->whereIn('storage_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.
app/Graphs/Device/Processor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'processors' => function (Builder $query) {
36
+                'processors' => function(Builder $query) {
37 37
                     $query->whereIn('processor_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.
app/Graphs/Device/Bits.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         if ($this->hasIDs()) {
35 35
             return [
36
-                'ports' => function (Builder $query) {
36
+                'ports' => function(Builder $query) {
37 37
                     $query->whereIn('port_id', $this->getIDs());
38 38
                 },
39 39
             ];
Please login to merge, or discard this patch.
app/Http/Controllers/DeviceController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
19 19
      */
20
-    public function index(DeviceDataTable $dataTable, $group_id=-1)
20
+    public function index(DeviceDataTable $dataTable, $group_id = -1)
21 21
     {
22 22
         $group_name = "";
23
-        if($group_id >= 0) {
23
+        if ($group_id >= 0) {
24 24
             $dataTable->addScope(new \App\DataTables\Scopes\DeviceGroup($group_id));
25 25
             $group_name = DeviceGroup::find($group_id)->name;
26 26
         }
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 
80 80
         $page_setup['navbar'] = [
81 81
             'Overview' => $device_url,
82
-            'Graphs'   => $device_url . '/graphs',
83
-            'Health'   => $device_url . '/health',
82
+            'Graphs'   => $device_url.'/graphs',
83
+            'Health'   => $device_url.'/health',
84 84
         ];
85 85
         return view('devices.show', compact(['device', 'page_setup', 'request', 'page']));
86 86
     }
Please login to merge, or discard this patch.