diff --git a/composer.json b/composer.json index d1911e3..cf28185 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,6 @@ ], "require": { "php": "^8.2", - "dragon-code/simple-dto": "^2.3", "dragon-code/support": "^6.0" }, "require-dev": { diff --git a/src/Data/RGB.php b/src/Data/RGB.php new file mode 100644 index 0000000..e1b7daf --- /dev/null +++ b/src/Data/RGB.php @@ -0,0 +1,23 @@ +red, + $this->green, + $this->blue, + ]; + } +} diff --git a/src/Dto/RGB.php b/src/Dto/RGB.php deleted file mode 100644 index 3ee5512..0000000 --- a/src/Dto/RGB.php +++ /dev/null @@ -1,25 +0,0 @@ -red, - $this->green, - $this->blue, - ]; - } -} diff --git a/src/Helpers/Weight.php b/src/Helpers/Weight.php index 1c563ca..cad9954 100644 --- a/src/Helpers/Weight.php +++ b/src/Helpers/Weight.php @@ -4,7 +4,7 @@ namespace DragonCode\WhichColor\Helpers; -use DragonCode\WhichColor\Dto\RGB; +use DragonCode\WhichColor\Data\RGB; class Weight { diff --git a/src/Services/Color.php b/src/Services/Color.php index 15b3f3f..3dcf82b 100644 --- a/src/Services/Color.php +++ b/src/Services/Color.php @@ -4,7 +4,7 @@ namespace DragonCode\WhichColor\Services; -use DragonCode\WhichColor\Dto\RGB; +use DragonCode\WhichColor\Data\RGB; use DragonCode\WhichColor\Helpers\Weight; class Color diff --git a/src/Services/Converter.php b/src/Services/Converter.php index 47389b4..2d90e0e 100644 --- a/src/Services/Converter.php +++ b/src/Services/Converter.php @@ -7,7 +7,7 @@ use DragonCode\Support\Facades\Helpers\Arr; use DragonCode\Support\Facades\Helpers\Str; use DragonCode\Support\Facades\Instances\Instance; -use DragonCode\WhichColor\Dto\RGB; +use DragonCode\WhichColor\Data\RGB; use ReflectionException; class Converter @@ -27,7 +27,7 @@ public function hex2rgb(array|RGB|string|null $hex = '#000000'): RGB [$red, $green, $blue] = $this->parseArray($hex); - return RGB::make(compact('red', 'green', 'blue')); + return new RGB($red, $green, $blue); } /**