refactor: Update code to use str() instead of Str::of() for string manipulation

This commit is contained in:
Andras Bacsai
2024-06-25 10:37:10 +02:00
parent 1266810c4d
commit 2c92cc40e1
38 changed files with 101 additions and 126 deletions

View File

@@ -174,7 +174,7 @@ class EnvironmentVariable extends Model
if (str($environment_variable)->startsWith('{{'.$type) && str($environment_variable)->endsWith('}}')) {
$variable = Str::after($environment_variable, "{$type}.");
$variable = Str::before($variable, '}}');
$variable = Str::of($variable)->trim()->value;
$variable = str($variable)->trim()->value;
if (! collect(SHARED_VARIABLE_TYPES)->contains($type)) {
return $variable;
}
@@ -220,7 +220,7 @@ class EnvironmentVariable extends Model
protected function key(): Attribute
{
return Attribute::make(
set: fn (string $value) => Str::of($value)->trim(),
set: fn (string $value) => str($value)->trim(),
);
}
}