| Total Complexity | 4 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class UpdateCategoryRequest |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | * @Type("string") |
||
| 15 | * @Assert\NotBlank() |
||
| 16 | * @Assert\Uuid() |
||
| 17 | */ |
||
| 18 | private $id; |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | * @Type("string") |
||
| 22 | * @Assert\NotBlank() |
||
| 23 | * @Assert\Length(max=255) |
||
| 24 | */ |
||
| 25 | private $name; |
||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | * @Type("string") |
||
| 29 | * @Assert\Length(max=255) |
||
| 30 | */ |
||
| 31 | private $description; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * UpdateCategoryRequest constructor. |
||
| 35 | * @param string $id |
||
| 36 | * @param string $name |
||
| 37 | * @param string $description |
||
| 38 | */ |
||
| 39 | 1 | public function __construct(string $id, |
|
| 40 | string $name, |
||
| 41 | string $description |
||
| 42 | ) |
||
| 43 | { |
||
| 44 | |||
| 45 | 1 | $this->id = $id; |
|
| 46 | 1 | $this->name = $name; |
|
| 47 | 1 | $this->description = $description; |
|
| 48 | 1 | } |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @return UuidInterface |
||
| 52 | */ |
||
| 53 | 1 | public function getId(): UuidInterface |
|
| 54 | { |
||
| 55 | 1 | return Uuid::fromString($this->id); |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 1 | public function getName(): string |
|
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return ?string |
||
| 68 | */ |
||
| 69 | 1 | public function getDescription(): ?string |
|
| 72 | } |
||
| 73 | } |
||
| 74 |