RandomColorGenerator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getNextColor() 0 5 1
1
<?php
2
3
namespace SixtyNine\Cloud\Color;
4
5
class RandomColorGenerator extends ColorGenerator
6
{
7
    /**
8
     * @return string
9
     */
10 3
    public function getNextColor()
11
    {
12 3
        $colors = $this->palette->getColors();
13 3
        return $colors[rand(0, count($colors) - 1)];
14
    }
15
}