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

@@ -14,7 +14,6 @@ use App\Models\StandaloneMongodb;
use App\Models\StandaloneMysql;
use App\Models\StandalonePostgresql;
use App\Models\StandaloneRedis;
use Illuminate\Support\Str;
use Livewire\Component;
class FileStorage extends Component
@@ -37,9 +36,9 @@ class FileStorage extends Component
public function mount()
{
$this->resource = $this->fileStorage->service;
if (Str::of($this->fileStorage->fs_path)->startsWith('.')) {
if (str($this->fileStorage->fs_path)->startsWith('.')) {
$this->workdir = $this->resource->service?->workdir();
$this->fs_path = Str::of($this->fileStorage->fs_path)->after('.');
$this->fs_path = str($this->fileStorage->fs_path)->after('.');
} else {
$this->workdir = null;
$this->fs_path = $this->fileStorage->fs_path;