RGBColorExtractor   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A extract() 0 4 1
1
<?php
2
3
namespace Toothless\TinyImage\Extractor;
4
5
/**
6
 * Class RGBColorExtractor
7
 */
8
class RGBColorExtractor implements ColorExtractorInterface
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13 8
    public function extract($content)
14
    {
15 8
        return substr(bin2hex($content), 0, 6);
16
    }
17
}
18