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.
Completed
Push — master ( 8dbce3...a69053 )
by Patrick
02:15
created

src/Transition/RGBTransition.php (3 issues)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Artack\Color\Transition;
6
7
use Artack\Color\Color\Color;
8
use Artack\Color\Color\RGB;
9
10
class RGBTransition implements TransitionInterface
11
{
12
    public static function interpolate(Color $startColor, Color $endColor, float $value, float $max): Color
13
    {
14
        $step = $value / $max;
15
16
        $red = $startColor->getRed() + ($endColor->getRed() - $startColor->getRed()) * $step;
0 ignored issues
show
The method getRed() does not exist on Artack\Color\Color\Color. It seems like you code against a sub-type of said class. However, the method does not exist in Artack\Color\Color\HSV. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        $red = $startColor->/** @scrutinizer ignore-call */ getRed() + ($endColor->getRed() - $startColor->getRed()) * $step;
Loading history...
17
        $green = $startColor->getGreen() + ($endColor->getGreen() - $startColor->getGreen()) * $step;
0 ignored issues
show
The method getGreen() does not exist on Artack\Color\Color\Color. It seems like you code against a sub-type of said class. However, the method does not exist in Artack\Color\Color\HSV. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        $green = $startColor->/** @scrutinizer ignore-call */ getGreen() + ($endColor->getGreen() - $startColor->getGreen()) * $step;
Loading history...
18
        $blue = $startColor->getBlue() + ($endColor->getBlue() - $startColor->getBlue()) * $step;
0 ignored issues
show
The method getBlue() does not exist on Artack\Color\Color\Color. It seems like you code against a sub-type of said class. However, the method does not exist in Artack\Color\Color\HSV. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

18
        $blue = $startColor->/** @scrutinizer ignore-call */ getBlue() + ($endColor->getBlue() - $startColor->getBlue()) * $step;
Loading history...
19
20
        return new RGB((int) round($red), (int) round($green), (int) round($blue));
21
    }
22
}
23