Inline many variables.

This commit is contained in:
Lucas Michot
2024-10-31 18:20:11 +01:00
parent aa7fa16c74
commit 1ec224fde1
20 changed files with 34 additions and 79 deletions

View File

@@ -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)