ColorPair   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Breadthe\PhpContrast;
4
5
class ColorPair
6
{
7
    public $ratio;
8
    public $color1;
9
    public $color2;
10
11
    public function __construct(float $ratio = null, string $color1 = null, string $color2 = null)
12
    {
13
        $this->ratio = $ratio;
14
        $this->color1 = $color1;
15
        $this->color2 = $color2;
16
    }
17
18
    /**
19
     * '000' => '#000000'
20
     * '000000' => '#000000'.
21
     */
22
//    protected function normalize($color)
23
//    {
24
//        return $color; //
25
//    }
26
}
27