format muhahaha

This commit is contained in:
Andras Bacsai
2023-08-11 20:48:52 +02:00
parent c762195c8a
commit 82a01b4483
109 changed files with 295 additions and 244 deletions

View File

@@ -42,7 +42,7 @@ class General extends Component
public function save_init_script($script)
{
$this->database->init_scripts = filter($this->database->init_scripts, fn($s) => $s['filename'] !== $script['filename']);
$this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']);
$this->database->init_scripts = array_merge($this->database->init_scripts, [$script]);
$this->database->save();
$this->emit('success', 'Init script saved successfully.');
@@ -53,8 +53,8 @@ class General extends Component
$collection = collect($this->database->init_scripts);
$found = $collection->firstWhere('filename', $script['filename']);
if ($found) {
ray($collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray());
$this->database->init_scripts = $collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray();
ray($collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray());
$this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray();
$this->database->save();
$this->refresh();
$this->emit('success', 'Init script deleted successfully.');