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

@@ -4,9 +4,7 @@ namespace App\Livewire\SharedVariables\Environment;
use App\Models\Application;
use App\Models\Project;
use Exception;
use Livewire\Component;
use Throwable;
class Show extends Component
{
@@ -25,7 +23,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'],
@@ -36,11 +34,9 @@ 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,9 +3,7 @@
namespace App\Livewire\SharedVariables\Project;
use App\Models\Project;
use Exception;
use Livewire\Component;
use Throwable;
class Show extends Component
{
@@ -18,7 +16,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'],
@@ -29,24 +27,20 @@ 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::query()->where('team_id', $teamId)->where('uuid', $projectUuid)->first();
$project = Project::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,9 +3,7 @@
namespace App\Livewire\SharedVariables\Team;
use App\Models\Team;
use Exception;
use Livewire\Component;
use Throwable;
class Index extends Component
{
@@ -18,7 +16,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'],
@@ -29,11 +27,9 @@ 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()