testing php storm code cleanup and styling

This commit is contained in:
Andras Bacsai
2023-08-08 11:51:36 +02:00
parent a8ee779b31
commit f2228cec7b
368 changed files with 23834 additions and 2623 deletions

View File

@@ -23,10 +23,12 @@ class Add extends Component
'value' => 'value',
'is_build_time' => 'build',
];
public function mount()
{
$this->parameters = getRouteParameters();
}
public function submit()
{
ray('submitting');
@@ -39,6 +41,7 @@ class Add extends Component
]);
$this->clear();
}
public function clear()
{
$this->key = '';

View File

@@ -11,14 +11,17 @@ class All extends Component
public $resource;
public string|null $modalId = null;
protected $listeners = ['refreshEnvs', 'submit'];
public function mount()
{
$this->modalId = new Cuid2(7);
}
public function refreshEnvs()
{
$this->resource->refresh();
}
public function submit($data)
{
try {
@@ -27,16 +30,16 @@ class All extends Component
$this->emit('error', 'Environment variable already exists.');
return;
}
$environment = new EnvironmentVariable();
$environment = new EnvironmentVariable();
$environment->key = $data['key'];
$environment->value = $data['value'];
$environment->is_build_time = $data['is_build_time'];
$environment->is_preview = $data['is_preview'];
if($this->resource->type() === 'application') {
if ($this->resource->type() === 'application') {
$environment->application_id = $this->resource->id;
}
if($this->resource->type() === 'standalone-postgresql') {
if ($this->resource->type() === 'standalone-postgresql') {
$environment->standalone_postgresql_id = $this->resource->id;
}
$environment->save();

View File

@@ -21,17 +21,20 @@ class Show extends Component
'value' => 'value',
'is_build_time' => 'build',
];
public function mount()
{
$this->modalId = new Cuid2(7);
$this->parameters = getRouteParameters();
}
public function submit()
{
$this->validate();
$this->env->save();
$this->emit('success', 'Environment variable updated successfully.');
}
public function delete()
{
$this->env->delete();