Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
4 / 4 |
CRAP | |
100.00% |
7 / 7 |
ColorRgb | |
100.00% |
1 / 1 |
|
100.00% |
4 / 4 |
4 | |
100.00% |
7 / 7 |
__construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
4 / 4 |
|||
getRed | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
getGreen | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
getBlue | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
<?php | |
declare(strict_types=1); | |
namespace App\Model; | |
class ColorRgb | |
{ | |
/** | |
* @var int | |
*/ | |
private $red; | |
/** | |
* @var int | |
*/ | |
private $green; | |
/** | |
* @var int | |
*/ | |
private $blue; | |
public function __construct($red, $green, $blue) | |
{ | |
$this->red = $red; | |
$this->green = $green; | |
$this->blue = $blue; | |
} | |
public function getRed(): int | |
{ | |
return $this->red; | |
} | |
public function getGreen(): int | |
{ | |
return $this->green; | |
} | |
public function getBlue(): int | |
{ | |
return $this->blue; | |
} | |
} |