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

@@ -16,6 +16,7 @@ class Danger extends Component
$this->modalId = new Cuid2(7);
$this->parameters = getRouteParameters();
}
public function delete()
{
$destination = $this->resource->destination->getMorphClass()::where('id', $this->resource->destination->id)->first();

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();

View File

@@ -25,6 +25,7 @@ class ResourceLimits extends Component
'resource.limits_cpuset' => 'cpuset',
'resource.limits_cpu_shares' => 'cpu shares',
];
public function submit()
{
try {

View File

@@ -22,10 +22,12 @@ class Add extends Component
'mount_path' => 'mount',
'host_path' => 'host',
];
public function mount()
{
$this->parameters = getRouteParameters();
}
public function submit()
{
$this->validate();
@@ -35,6 +37,7 @@ class Add extends Component
'host_path' => $this->host_path,
]);
}
public function clear()
{
$this->name = '';

View File

@@ -9,10 +9,12 @@ class All extends Component
{
public $resource;
protected $listeners = ['refreshStorages', 'submit'];
public function refreshStorages()
{
$this->resource->refresh();
}
public function submit($data)
{
try {

View File

@@ -19,16 +19,19 @@ class Show extends Component
'mount_path' => 'mount',
'host_path' => 'host',
];
public function mount()
{
$this->modalId = new Cuid2(7);
}
public function submit()
{
$this->validate();
$this->storage->save();
$this->emit('success', 'Storage updated successfully');
}
public function delete()
{
$this->storage->delete();