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

@@ -7,7 +7,6 @@ use App\Models\Team;
use App\Notifications\Test;
use Livewire\Attributes\Validate;
use Livewire\Component;
use Throwable;
class Discord extends Component
{
@@ -63,11 +62,9 @@ class Discord extends Component
$this->team = auth()->user()->currentTeam();
$this->settings = $this->team->discordNotificationSettings;
$this->syncData();
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function syncData(bool $toModel = false)
@@ -120,24 +117,20 @@ class Discord extends Component
'discordWebhookUrl.required' => 'Discord Webhook URL is required.',
]);
$this->saveModel();
} catch (Throwable $e) {
} catch (\Throwable $e) {
$this->discordEnabled = false;
return handleError($e, $this);
}
return null;
}
public function instantSave()
{
try {
$this->syncData(true);
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function submit()
@@ -146,11 +139,9 @@ class Discord extends Component
$this->resetErrorBag();
$this->syncData(true);
$this->saveModel();
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function saveModel()
@@ -165,11 +156,9 @@ class Discord extends Component
try {
$this->team->notify(new Test(channel: 'discord'));
$this->dispatch('success', 'Test notification sent.');
} catch (Throwable $e) {
} catch (\Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function render()