@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function apply($query) |
| 23 | 23 | { |
| 24 | - return $query->whereHas('groups', function ($q) { |
|
| 24 | + return $query->whereHas('groups', function($q) { |
|
| 25 | 25 | $q->where('id', '=', $this->group_id); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -191,8 +191,8 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -33,7 +33,7 @@ |
||
| 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 | ]; |
@@ -33,7 +33,7 @@ |
||
| 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 | ]; |
@@ -33,7 +33,7 @@ |
||
| 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 | ]; |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | public function get($key, $default = null, $is_array = false) |
| 103 | 103 | { |
| 104 | 104 | // return value from cache or fetch it and return it |
| 105 | - return Cache::tags(self::$cache_tag)->remember($key, $this->cache_time, function () use ($key, $default, $is_array) { |
|
| 105 | + return Cache::tags(self::$cache_tag)->remember($key, $this->cache_time, function() use ($key, $default, $is_array) { |
|
| 106 | 106 | // fetch the values from storage |
| 107 | 107 | if (Config::has('config.'.$key)) { |
| 108 | 108 | $config_data = Config::get('config.'.$key, $default); |
@@ -79,8 +79,8 @@ |
||
| 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 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | public function register() |
| 48 | 48 | { |
| 49 | - \App::bind('settings', function () { |
|
| 49 | + \App::bind('settings', function() { |
|
| 50 | 50 | return new \App\Settings; |
| 51 | 51 | }); |
| 52 | 52 | } |