clean-code #4
@@ -8,7 +8,7 @@ use Codeception\Test\Unit;
|
||||
abstract class AbstractColorModelUnit extends Unit
|
||||
{
|
||||
|
||||
abstract public function testConstruct();
|
||||
abstract public function testConstruct(): void;
|
||||
|
||||
/**
|
||||
* @return float[][]
|
||||
|
||||
@@ -8,7 +8,7 @@ use TorstenHettstedt\Colors\ColorModels\CyanMagentaYellowKey;
|
||||
class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
{
|
||||
|
||||
public function testConstruct()
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -23,7 +23,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetCyanWithValidValue(float $value)
|
||||
public function testSetCyanWithValidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -36,7 +36,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetMagentaWithValidValue(float $value)
|
||||
public function testSetMagentaWithValidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -49,7 +49,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetYellowWithValidValue(float $value)
|
||||
public function testSetYellowWithValidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -62,7 +62,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetKeyWithValidValue(float $value)
|
||||
public function testSetKeyWithValidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -75,7 +75,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetCyanWithInvalidValue(float $value)
|
||||
public function testSetCyanWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -88,7 +88,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetMagentaWithInvalidValue(float $value)
|
||||
public function testSetMagentaWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -101,7 +101,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetYellowWithInvalidValue(float $value)
|
||||
public function testSetYellowWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
@@ -114,7 +114,7 @@ class CyanMagentaYellowKeyTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetKeyWithInvalidValue(float $value)
|
||||
public function testSetKeyWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new CyanMagentaYellowKey();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use TorstenHettstedt\Colors\ColorModels\HueSaturationValue;
|
||||
class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
{
|
||||
|
||||
public function testConstruct()
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -22,7 +22,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetHueWithValidValue(float $value)
|
||||
public function testSetHueWithValidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -35,7 +35,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetHueWithInvalidValue(float $value)
|
||||
public function testSetHueWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -48,7 +48,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetSaturationWithValidValue(float $value)
|
||||
public function testSetSaturationWithValidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -61,7 +61,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetSaturationWithInvalidValue(float $value)
|
||||
public function testSetSaturationWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -74,7 +74,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetValueWithValidValue(float $value)
|
||||
public function testSetValueWithValidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
@@ -87,7 +87,7 @@ class HueSaturationValueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetValueWithInvalidValue(float $value)
|
||||
public function testSetValueWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new HueSaturationValue();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use TorstenHettstedt\Colors\ColorModels\RedGreenBlue;
|
||||
class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
{
|
||||
|
||||
public function testConstruct()
|
||||
public function testConstruct(): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -22,7 +22,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetRedWithValidValue(float $value)
|
||||
public function testSetRedWithValidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -35,7 +35,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetRedWithInvalidValue(float $value)
|
||||
public function testSetRedWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -47,7 +47,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetGreenWithValidValue(float $value)
|
||||
public function testSetGreenWithValidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -60,7 +60,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetGreenWithInvalidValue(float $value)
|
||||
public function testSetGreenWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -73,7 +73,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider validValueProvider
|
||||
*/
|
||||
public function testSetBlueWithValidValue(float $value)
|
||||
public function testSetBlueWithValidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
@@ -86,7 +86,7 @@ class RedGreenBlueTest extends AbstractColorModelUnit
|
||||
*
|
||||
* @dataProvider invalidValueProvider
|
||||
*/
|
||||
public function testSetBlueWithInvalidValue(float $value)
|
||||
public function testSetBlueWithInvalidValue(float $value): void
|
||||
{
|
||||
$color = new RedGreenBlue();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class CyanMagentaYellowKeyTransformerTest extends Unit
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testToRedGreenBlue(array $cmyk, array $rgb)
|
||||
public function testToRedGreenBlue(array $cmyk, array $rgb): void
|
||||
{
|
||||
$this->color = $this->make(CyanMagentaYellowKey::class, $cmyk);
|
||||
|
||||
@@ -66,7 +66,7 @@ class CyanMagentaYellowKeyTransformerTest extends Unit
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testToCyanMagentaYellowKey(array $cmyk)
|
||||
public function testToCyanMagentaYellowKey(array $cmyk): void
|
||||
{
|
||||
|
||||
$this->color = $this->make(CyanMagentaYellowKey::class, $cmyk);
|
||||
@@ -90,7 +90,7 @@ class CyanMagentaYellowKeyTransformerTest extends Unit
|
||||
* @dataProvider validHsvValuesProvider
|
||||
*
|
||||
*/
|
||||
public function testToHueSaturationValue(array $cmyk, array $hsv)
|
||||
public function testToHueSaturationValue(array $cmyk, array $hsv): void
|
||||
{
|
||||
$this->color = $this->make(CyanMagentaYellowKey::class, $cmyk);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class HueSaturationValueTransformerTest extends Unit
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testToRedGreenBlue(array $hsv, array $rgb)
|
||||
public function testToRedGreenBlue(array $hsv, array $rgb): void
|
||||
{
|
||||
$this->color = $this->make(HueSaturationValue::class, $hsv);
|
||||
|
||||
@@ -67,7 +67,7 @@ class HueSaturationValueTransformerTest extends Unit
|
||||
* @dataProvider validCmykValuesProvider
|
||||
*
|
||||
*/
|
||||
public function testToCyanMagentaYellowKey(array $hsv, array $cmyk)
|
||||
public function testToCyanMagentaYellowKey(array $hsv, array $cmyk): void
|
||||
{
|
||||
|
||||
$this->color = $this->make(HueSaturationValue::class, $hsv);
|
||||
@@ -88,7 +88,7 @@ class HueSaturationValueTransformerTest extends Unit
|
||||
* @throws Exception
|
||||
* @dataProvider validCmykValuesProvider
|
||||
*/
|
||||
public function testToHueSaturationValue(array $hsv)
|
||||
public function testToHueSaturationValue(array $hsv): void
|
||||
{
|
||||
$this->color = $this->make(HueSaturationValue::class, $hsv);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class RedGreenBlueTransformerTest extends Unit
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function testToRedGreenBlue(array $rgb)
|
||||
public function testToRedGreenBlue(array $rgb): void
|
||||
{
|
||||
$this->color = $this->make(RedGreenBlue::class, $rgb);
|
||||
|
||||
@@ -66,7 +66,7 @@ class RedGreenBlueTransformerTest extends Unit
|
||||
* @dataProvider validCmykValuesProvider
|
||||
*
|
||||
*/
|
||||
public function testToCyanMagentaYellowKey(array $rgb, array $cmyk)
|
||||
public function testToCyanMagentaYellowKey(array $rgb, array $cmyk): void
|
||||
{
|
||||
|
||||
$this->color = $this->make(RedGreenBlue::class, $rgb);
|
||||
@@ -88,7 +88,7 @@ class RedGreenBlueTransformerTest extends Unit
|
||||
* @throws Exception
|
||||
* @dataProvider validHsvValuesProvider
|
||||
*/
|
||||
public function testToHueSaturationValue(array $rgb, array $hsv)
|
||||
public function testToHueSaturationValue(array $rgb, array $hsv): void
|
||||
{
|
||||
$this->color = $this->make(RedGreenBlue::class, $rgb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user