Inline many variables.
This commit is contained in:
@@ -602,11 +602,10 @@ $schema://$host {
|
||||
throw new \Exception($error);
|
||||
}
|
||||
$cpu = json_decode($cpu, true);
|
||||
$parsedCollection = collect($cpu)->map(function ($metric) {
|
||||
|
||||
return collect($cpu)->map(function ($metric) {
|
||||
return [(int) $metric['time'], (float) $metric['percent']];
|
||||
});
|
||||
|
||||
return $parsedCollection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -837,9 +836,7 @@ $schema://$host {
|
||||
{
|
||||
return Attribute::make(
|
||||
get: function ($value) {
|
||||
$sanitizedValue = preg_replace('/[^A-Za-z0-9\-_]/', '', $value);
|
||||
|
||||
return $sanitizedValue;
|
||||
return preg_replace('/[^A-Za-z0-9\-_]/', '', $value);
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1096,9 +1093,7 @@ $schema://$host {
|
||||
|
||||
public function installDocker()
|
||||
{
|
||||
$activity = InstallDocker::run($this);
|
||||
|
||||
return $activity;
|
||||
return InstallDocker::run($this);
|
||||
}
|
||||
|
||||
public function validateDockerEngine($throwError = false)
|
||||
|
||||
Reference in New Issue
Block a user