Revert "rector: arrrrr"

This reverts commit 16c0cd10d8.
This commit is contained in:
Andras Bacsai
2025-01-07 15:31:43 +01:00
parent da07b4fdcf
commit 1fe4dd722b
349 changed files with 3689 additions and 4184 deletions

View File

@@ -8,7 +8,6 @@ use App\Models\SwarmDocker;
use Livewire\Attributes\Locked;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Throwable;
class Show extends Component
{
@@ -41,11 +40,9 @@ class Show extends Component
}
$this->destination = $destination;
$this->syncData();
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function syncData(bool $toModel = false)
@@ -68,17 +65,15 @@ class Show extends Component
try {
$this->syncData(true);
$this->dispatch('success', 'Destination saved.');
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function delete()
{
try {
if ($this->destination->getMorphClass() === StandaloneDocker::class) {
if ($this->destination->getMorphClass() === \App\Models\StandaloneDocker::class) {
if ($this->destination->attachedTo()) {
return $this->dispatch('error', 'You must delete all resources before deleting this destination.');
}
@@ -88,7 +83,7 @@ class Show extends Component
$this->destination->delete();
return redirect()->route('destination.index');
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
}