diff --git a/app/Helpers/Epc/EpcQrGenerator.php b/app/Helpers/Epc/EpcQrGenerator.php index 93d25fab76..a63446f24c 100644 --- a/app/Helpers/Epc/EpcQrGenerator.php +++ b/app/Helpers/Epc/EpcQrGenerator.php @@ -49,9 +49,9 @@ class EpcQrGenerator $this->validateFields(); try { - $qr = $writer->writeString($this->encodeMessage()); + $qr = $writer->writeString($this->encodeMessage()); } - catch(\Exception $e){ + catch(BaconQrCode\Exception\WriterException $e){ return ''; } return " diff --git a/app/Services/TaskScheduler/TaskSchedulerService.php b/app/Services/TaskScheduler/TaskSchedulerService.php index 497601e9c4..c0320a8b1c 100644 --- a/app/Services/TaskScheduler/TaskSchedulerService.php +++ b/app/Services/TaskScheduler/TaskSchedulerService.php @@ -40,12 +40,8 @@ use Symfony\Component\HttpFoundation\Request; class TaskSchedulerService { - public Scheduler $scheduler; - - public function __construct(Scheduler $scheduler) - { - $this->scheduler = $scheduler; - } + + public function __construct(public Scheduler $scheduler) {} public function store(Scheduler $scheduler, CreateScheduledTaskRequest $request) {