Completed
Push — master ( 2d41d6...fe639d )
by Karsten
03:12
created

MongoDbEntityConfigReaderImpl   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 50%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEntityConfig() 0 6 1
1
<?php
2
/**
3
 * File was created 11.02.2016 17:26
4
 */
5
6
namespace PeekAndPoke\Component\Slumber\Data\MongoDb;
7
8
use PeekAndPoke\Component\Slumber\Core\LookUp\EntityConfigReader;
9
10
/**
11
 * @author Karsten J. Gerber <[email protected]>
12
 */
13
class MongoDbEntityConfigReaderImpl implements MongoDbEntityConfigReader
14
{
15
    /** @var EntityConfigReader */
16
    private $delegate;
17
18
    public function __construct(EntityConfigReader $delegate)
19
    {
20
        $this->delegate = $delegate;
21
    }
22
23
    /**
24
     * @param \ReflectionClass $subject
25
     *
26
     * @return MongoDbEntityConfig
27
     */
28 2
    public function getEntityConfig(\ReflectionClass $subject)
29
    {
30 2
        $parent = $this->delegate->getEntityConfig($subject);
31
32 2
        return MongoDbEntityConfig::from($parent);
33
    }
34
}
35