From 462a158981029175cca63431891a9c50bd6c1c4a Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 12 Sep 2024 11:11:42 +0200 Subject: [PATCH] fix: run cs:fix Signed-off-by: Marcel Klehr --- lib/BackgroundJobs/ClassifierJob.php | 6 +++--- lib/Controller/AdminController.php | 2 +- lib/Migration/InstallDeps.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/BackgroundJobs/ClassifierJob.php b/lib/BackgroundJobs/ClassifierJob.php index 6bd13e6b..144efbd9 100644 --- a/lib/BackgroundJobs/ClassifierJob.php +++ b/lib/BackgroundJobs/ClassifierJob.php @@ -71,15 +71,15 @@ protected function runClassifier(string $model, array $argument): void { try { $this->logger->debug('Running ' . $model . ' classifier'); $this->classify($files); - } catch(\RuntimeException $e) { + } catch (\RuntimeException $e) { $this->logger->warning('Temporary problem with ' . $model . ' classifier, trying again soon', ['exception' => $e]); - } catch(\ErrorException $e) { + } catch (\ErrorException $e) { $this->settingsService->setSetting($model.'.status', 'false'); $this->logger->warning('Problem with ' . $model . ' classifier', ['exception' => $e]); $this->logger->debug('Removing '.static::class.' with argument ' . var_export($argument, true) . 'from oc_jobs'); $this->jobList->remove(static::class, $argument); throw $e; - } catch(\Throwable $e) { + } catch (\Throwable $e) { $this->settingsService->setSetting($model.'.status', 'false'); throw $e; } diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index e7fd7dc8..6c99eb02 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -136,7 +136,7 @@ public function hasJobs(string $task): JSONResponse { } $iterator = $this->jobList->getJobsIterator($tasks[$task], null, 0); $lastRun = []; - foreach($iterator as $job) { + foreach ($iterator as $job) { $lastRun[] = $job->getLastRun(); } $count = count($lastRun); diff --git a/lib/Migration/InstallDeps.php b/lib/Migration/InstallDeps.php index c6b2f0c4..7e477b23 100644 --- a/lib/Migration/InstallDeps.php +++ b/lib/Migration/InstallDeps.php @@ -90,7 +90,7 @@ public function run(IOutput $output): void { $this->runFfmpegInstall($binaryPath); $this->runTfjsGpuInstall($binaryPath); $this->setNiceBinaryPath(); - } catch(\Throwable $e) { + } catch (\Throwable $e) { $output->warning('Failed to automatically install dependencies for recognize. Check the recognize admin panel for potential problems.'); $this->logger->error('Failed to automatically install dependencies for recognize. Check the recognize admin panel for potential problems.', ['exception' => $e]); }