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

ProxyDomainMapperFactory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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