From 51ef8baf11cec3d3532ff44cfcfebfd32e69a1cf Mon Sep 17 00:00:00 2001 From: kaioken Date: Mon, 10 Jun 2024 21:18:31 -0400 Subject: [PATCH 1/2] refact: create tags --- src/Domains/Social/Tags/Actions/CreateTagAction.php | 5 +++-- src/Domains/Social/Tags/DataTransferObjects/Tag.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Domains/Social/Tags/Actions/CreateTagAction.php b/src/Domains/Social/Tags/Actions/CreateTagAction.php index d9829b0a5..2b10c29ea 100644 --- a/src/Domains/Social/Tags/Actions/CreateTagAction.php +++ b/src/Domains/Social/Tags/Actions/CreateTagAction.php @@ -9,8 +9,9 @@ class CreateTagAction { - public function __construct(private TagData $tagData) - { + public function __construct( + protected TagData $tagData + ) { } public function execute(): Tag diff --git a/src/Domains/Social/Tags/DataTransferObjects/Tag.php b/src/Domains/Social/Tags/DataTransferObjects/Tag.php index 26578b56e..a93110042 100644 --- a/src/Domains/Social/Tags/DataTransferObjects/Tag.php +++ b/src/Domains/Social/Tags/DataTransferObjects/Tag.php @@ -17,7 +17,7 @@ public function __construct( public Companies $company, public string $name, public ?string $slug = null, - public ?int $weight = null + public ?int $weight = 0 ) { } } From 95c892e34bd7a062b509988a61516b07b8e1e248 Mon Sep 17 00:00:00 2001 From: kaioken Date: Mon, 10 Jun 2024 21:19:23 -0400 Subject: [PATCH 2/2] refact: create tags --- src/Domains/Social/Tags/DataTransferObjects/Tag.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Domains/Social/Tags/DataTransferObjects/Tag.php b/src/Domains/Social/Tags/DataTransferObjects/Tag.php index a93110042..dd41a0fd9 100644 --- a/src/Domains/Social/Tags/DataTransferObjects/Tag.php +++ b/src/Domains/Social/Tags/DataTransferObjects/Tag.php @@ -17,7 +17,7 @@ public function __construct( public Companies $company, public string $name, public ?string $slug = null, - public ?int $weight = 0 + public int $weight = 0 ) { } }