Completed
Push — ezp-30639-deprecated-view-acti... ( 6b3a78...0a459a )
by
unknown
16:22
created

ProxyDomainMapperFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Repository\ProxyFactory;
10
11
use eZ\Publish\API\Repository\Repository;
12
13
/**
14
 * @internal
15
 */
16
final class ProxyDomainMapperFactory implements ProxyDomainMapperFactoryInterface
17
{
18
    /** @var \eZ\Publish\Core\Repository\ProxyFactory\ProxyGenerator */
19
    private $proxyGenerator;
20
21
    public function __construct(ProxyGenerator $proxyGenerator)
22
    {
23
        $this->proxyGenerator = $proxyGenerator;
24
    }
25
26
    public function create(Repository $repository): ProxyDomainMapperInterface
27
    {
28
        return new ProxyDomainMapper($repository, $this->proxyGenerator);
29
    }
30
}
31