From 40753a63d9b853d2a7a3a6271ff68fa7816150c8 Mon Sep 17 00:00:00 2001 From: Luca Patera Date: Mon, 15 Jul 2024 20:41:56 +0200 Subject: [PATCH] Refactor OptimizeStickerJob --- app/Jobs/OptimizeStickerJob.php | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/app/Jobs/OptimizeStickerJob.php b/app/Jobs/OptimizeStickerJob.php index 384b7eb..35af515 100644 --- a/app/Jobs/OptimizeStickerJob.php +++ b/app/Jobs/OptimizeStickerJob.php @@ -16,9 +16,9 @@ use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; use Illuminate\Support\Str; -use Intervention\Image\Exception\InvalidArgumentException; use Intervention\Image\Exception\NotReadableException; use Intervention\Image\Facades\Image; +use InvalidArgumentException; use SergiX44\Nutgram\Nutgram; use SergiX44\Nutgram\Telegram\Properties\ChatAction; use SergiX44\Nutgram\Telegram\Properties\ParseMode; @@ -29,23 +29,12 @@ class OptimizeStickerJob implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - private int $chatID; - private int $replyID; - private string $fileID; - private int $fileSize; - - /** - * @param int $chatID - * @param int $replyID - * @param string $fileID - * @param int $fileSize - */ - public function __construct(int $chatID, int $replyID, string $fileID, int $fileSize) - { - $this->chatID = $chatID; - $this->replyID = $replyID; - $this->fileID = $fileID; - $this->fileSize = $fileSize; + public function __construct( + protected int $chatID, + protected int $replyID, + protected string $fileID, + protected int $fileSize, + ) { } /**