GeneralDecorator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getComponentName() 0 4 1
1
<?php
2
/**
3
 * @author @fabfuel <[email protected]>
4
 * @created 21.06.15, 08:59 
5
 */
6
namespace Fabfuel\Prophiler\Decorator;
7
8
use Fabfuel\Prophiler\ProfilerInterface;
9
10
class GeneralDecorator extends AbstractDecorator
11
{
12
    /**
13
     * @param object $decorated
14
     * @param ProfilerInterface $profiler
15
     */
16 2
    public function __construct($decorated, ProfilerInterface $profiler)
17
    {
18 2
        $this->setDecorated($decorated);
19 2
        $this->setProfiler($profiler);
20 2
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public function getComponentName()
26
    {
27 1
        return current(explode('\\', get_class($this->getDecorated()), 2));
28
    }
29
}
30