ColorPair::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 3
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