rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -4,7 +4,9 @@ namespace App\Livewire\SharedVariables\Environment;
use App\Models\Application;
use App\Models\Project;
use Exception;
use Livewire\Component;
use Throwable;
class Show extends Component
{
@@ -23,7 +25,7 @@ class Show extends Component
try {
$found = $this->environment->environment_variables()->where('key', $data['key'])->first();
if ($found) {
throw new \Exception('Variable already exists.');
throw new Exception('Variable already exists.');
}
$this->environment->environment_variables()->create([
'key' => $data['key'],
@@ -34,9 +36,11 @@ class Show extends Component
'team_id' => currentTeam()->id,
]);
$this->environment->refresh();
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function mount()

View File

@@ -3,7 +3,9 @@
namespace App\Livewire\SharedVariables\Project;
use App\Models\Project;
use Exception;
use Livewire\Component;
use Throwable;
class Show extends Component
{
@@ -16,7 +18,7 @@ class Show extends Component
try {
$found = $this->project->environment_variables()->where('key', $data['key'])->first();
if ($found) {
throw new \Exception('Variable already exists.');
throw new Exception('Variable already exists.');
}
$this->project->environment_variables()->create([
'key' => $data['key'],
@@ -27,20 +29,24 @@ class Show extends Component
'team_id' => currentTeam()->id,
]);
$this->project->refresh();
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function mount()
{
$projectUuid = request()->route('project_uuid');
$teamId = currentTeam()->id;
$project = Project::where('team_id', $teamId)->where('uuid', $projectUuid)->first();
$project = Project::query()->where('team_id', $teamId)->where('uuid', $projectUuid)->first();
if (! $project) {
return redirect()->route('dashboard');
}
$this->project = $project;
return null;
}
public function render()

View File

@@ -3,7 +3,9 @@
namespace App\Livewire\SharedVariables\Team;
use App\Models\Team;
use Exception;
use Livewire\Component;
use Throwable;
class Index extends Component
{
@@ -16,7 +18,7 @@ class Index extends Component
try {
$found = $this->team->environment_variables()->where('key', $data['key'])->first();
if ($found) {
throw new \Exception('Variable already exists.');
throw new Exception('Variable already exists.');
}
$this->team->environment_variables()->create([
'key' => $data['key'],
@@ -27,9 +29,11 @@ class Index extends Component
'team_id' => currentTeam()->id,
]);
$this->team->refresh();
} catch (\Throwable $e) {
} catch (Throwable $e) {
return handleError($e, $this);
}
return null;
}
public function mount()