CacheAggregator::getIcon()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @fabfuel <[email protected]>
4
 * @created: 22.06.15 08:04
5
 */
6
7
namespace Fabfuel\Prophiler\Aggregator\Cache;
8
9
use Fabfuel\Prophiler\Aggregator\AbstractAggregator;
10
use Fabfuel\Prophiler\Benchmark\BenchmarkInterface;
11
12
/**
13
 * Class CacheAggregator
14
 * @package Fabfuel\Prophiler\Aggregator\Cache
15
 */
16
class CacheAggregator extends AbstractAggregator
17
{
18
    /**
19
     * @param BenchmarkInterface $benchmark
20
     * @return bool
21
     */
22 1
    public function accept(BenchmarkInterface $benchmark)
23
    {
24 1
        return strpos($benchmark->getComponent(), 'Cache') === 0;
25
    }
26
27
    /**
28
     * @param BenchmarkInterface $benchmark
29
     * @return string
30
     */
31 1
    public function getCommand(BenchmarkInterface $benchmark)
32
    {
33 1
        return $benchmark->getName();
34
    }
35
36
    /**
37
     * Get the title of this data collector
38
     *
39
     * @return string
40
     */
41 1
    public function getTitle()
42
    {
43 1
        return 'Cache';
44
    }
45
46
    /**
47
     * Get the font-awesome icon class (e.g. fa-pie-chart)
48
     * http://fortawesome.github.io/Font-Awesome/icons/
49
     *
50
     * @return string
51
     */
52 1
    public function getIcon()
53
    {
54 1
        return '<i class="fa fa-stack-exchange"></i>';
55
    }
56
}
57