CoverActionData   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A make() 0 3 1
A __construct() 0 12 1
1
<?php
2
3
namespace Mostafaznv\Larupload\DTOs;
4
5
use Mostafaznv\Larupload\DTOs\Style\ImageStyle;
6
use Mostafaznv\Larupload\Enums\LaruploadFileType;
7
use Mostafaznv\Larupload\Enums\LaruploadImageLibrary;
8
use Mostafaznv\Larupload\Enums\LaruploadNamingMethod;
9
10
class CoverActionData
11
{
12
    public function __construct(
13
        public readonly string                $disk,
14
        public readonly LaruploadNamingMethod $namingMethod,
15
        public readonly ?string               $lang,
16
        public readonly ImageStyle            $style,
17
        public readonly ?LaruploadFileType    $type,
18
        public readonly bool                  $generateCover,
19
        public readonly bool                  $withDominantColor,
20
        public readonly int                   $dominantColorQuality,
21
        public readonly LaruploadImageLibrary $imageProcessingLibrary,
22
        public array                          $output
23
    ) {}
24
25
    public static function make(string $disk, LaruploadNamingMethod $namingMethod, string $lang, ImageStyle $style, ?LaruploadFileType $type, bool $generateCover, bool $withDominantColor, int $dominantColorQuality, LaruploadImageLibrary $imageProcessingLibrary, array $output): static
26
    {
27
        return new static($disk, $namingMethod, $lang, $style, $type, $generateCover, $withDominantColor, $dominantColorQuality, $imageProcessingLibrary, $output);
28
    }
29
}
30