GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 24-24 lines in 2 locations

src/Converter/HEXToRGBConverter.php 1 location

@@ 12-35 (lines=24) @@
9
use Artack\Color\Color\RGB;
10
use Webmozart\Assert\Assert;
11
12
class HEXToRGBConverter implements Convertible
13
{
14
    public function convert(Color $color): Color
15
    {
16
        /* @var HEX $color */
17
        Assert::isInstanceOf($color, HEX::class, sprintf('color should be an instance of [%s]', HEX::class));
18
19
        $red = hexdec($color->getRed());
20
        $green = hexdec($color->getGreen());
21
        $blue = hexdec($color->getBlue());
22
23
        return new RGB($red, $green, $blue);
24
    }
25
26
    public static function supportsFrom(): string
27
    {
28
        return HEX::class;
29
    }
30
31
    public static function supportsTo(): string
32
    {
33
        return RGB::class;
34
    }
35
}
36

src/Converter/RGBToHEXConverter.php 1 location

@@ 12-35 (lines=24) @@
9
use Artack\Color\Color\RGB;
10
use Webmozart\Assert\Assert;
11
12
class RGBToHEXConverter implements Convertible
13
{
14
    public function convert(Color $color): Color
15
    {
16
        /* @var RGB $color */
17
        Assert::isInstanceOf($color, RGB::class, sprintf('color should be an instance of [%s]', RGB::class));
18
19
        $red = dechex($color->getRed());
20
        $green = dechex($color->getGreen());
21
        $blue = dechex($color->getBlue());
22
23
        return new HEX($red, $green, $blue);
24
    }
25
26
    public static function supportsFrom(): string
27
    {
28
        return RGB::class;
29
    }
30
31
    public static function supportsTo(): string
32
    {
33
        return HEX::class;
34
    }
35
}
36