Completed
Pull Request — master (#951)
by David
05:59
created

CustomEntityListenerServiceResolver   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 42
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A clear() 0 4 1
A resolve() 0 4 1
A register() 0 4 1
A registerService() 0 4 1
1
<?php
2
3
namespace Doctrine\Bundle\DoctrineBundle\Tests\DependencyInjection\Fixtures;
4
5
use Doctrine\Bundle\DoctrineBundle\Mapping\EntityListenerServiceResolver;
6
7
class CustomEntityListenerServiceResolver implements EntityListenerServiceResolver
8
{
9
    /** @var EntityListenerServiceResolver */
10
    private $resolver;
11
12
    public function __construct(EntityListenerServiceResolver $resolver)
13
    {
14
        $this->resolver = $resolver;
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    function clear($className = null)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
21
    {
22
        $this->resolver->clear($className);
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    function resolve($className)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
29
    {
30
        return $this->resolver->resolve($className);
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    function register($object)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
37
    {
38
        $this->resolver->register($object);
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function registerService($className, $serviceId)
45
    {
46
        $this->resolver->registerService($className, $serviceId);
47
    }
48
}
49