diff --git a/src/DTOs/OptimizeResult.php b/src/DTOs/OptimizeResult.php index 3efa9a0..c8f47d3 100644 --- a/src/DTOs/OptimizeResult.php +++ b/src/DTOs/OptimizeResult.php @@ -3,7 +3,7 @@ namespace Mostafaznv\PdfOptimizer\DTOs; -class OptimizeResult +readonly class OptimizeResult { public function __construct( public bool $status, diff --git a/src/DTOs/PdfOptimizerJobData.php b/src/DTOs/PdfOptimizerJobData.php index 0d7c8aa..706ae21 100644 --- a/src/DTOs/PdfOptimizerJobData.php +++ b/src/DTOs/PdfOptimizerJobData.php @@ -2,23 +2,23 @@ namespace Mostafaznv\PdfOptimizer\DTOs; - use Illuminate\Support\Str; use Mostafaznv\PdfOptimizer\Laravel\Concerns\Disk; use Mostafaznv\PdfOptimizer\Laravel\Concerns\File; use Psr\Log\LoggerInterface; -class PdfOptimizerJobData + +readonly class PdfOptimizerJobData { public function __construct( - public readonly string $id, - public readonly array $commands, - public readonly string $input, - public readonly string $output, - public readonly ?File $file = null, - public readonly ?Disk $disk = null, - public readonly ?LoggerInterface $logger = null, - public readonly int $timeout = 900 + public string $id, + public array $commands, + public string $input, + public string $output, + public ?File $file = null, + public ?Disk $disk = null, + public ?LoggerInterface $logger = null, + public int $timeout = 900 ) {} public static function make(array $commands, string $input, string $output, File $file, ?Disk $disk = null, ?LoggerInterface $logger = null, int $timeout = 900): self diff --git a/src/DTOs/QueueData.php b/src/DTOs/QueueData.php index 9b1a86e..bfad1cb 100644 --- a/src/DTOs/QueueData.php +++ b/src/DTOs/QueueData.php @@ -3,7 +3,7 @@ namespace Mostafaznv\PdfOptimizer\DTOs; -class QueueData +readonly class QueueData { public function __construct( public bool $enabled = false,