@@ -73,7 +73,7 @@ |
||
| 73 | 73 | */ |
| 74 | 74 | public function show(Request $request, $id) |
| 75 | 75 | { |
| 76 | - $widget = Widgets::find($id); |
|
| 76 | + $widget = Widgets::find($id); |
|
| 77 | 77 | return array('widget' => $widget); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -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 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | foreach (Settings::get('alert.macros.group', []) as $macro => $value) { |
| 172 | - $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 172 | + $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 173 | 173 | if (!str_contains($macro, ' ')) { |
| 174 | 174 | $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern); |
| 175 | 175 | } |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | // fill in parameters |
| 227 | - foreach ((array)$this->params as $value) { |
|
| 227 | + foreach ((array) $this->params as $value) { |
|
| 228 | 228 | if (!is_numeric($value) && !starts_with($value, "'")) { |
| 229 | 229 | $value = "'".$value."'"; |
| 230 | 230 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $related = $this->getRelation('deviceCountRelation')->first(); |
| 252 | 252 | |
| 253 | 253 | // then return the count directly |
| 254 | - return ($related) ? (int)$related->count : 0; |
|
| 254 | + return ($related) ? (int) $related->count : 0; |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | /** |
@@ -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 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /* |
| 20 | 20 | * Authenticate the user's personal channel... |
| 21 | 21 | */ |
| 22 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
| 22 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
| 23 | 23 | return (int) $user->id === (int) $userId; |
| 24 | 24 | }); |
| 25 | 25 | } |
@@ -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 | ]; |