Completed
Pull Request — master (#42)
by Eric
11:17
created

Repository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 4
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Lug package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Lug\Component\Resource\Repository\Doctrine\MongoDB;
13
14
use Doctrine\ODM\MongoDB\DocumentManager;
15
use Doctrine\ODM\MongoDB\DocumentRepository;
16
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
17
use Doctrine\ODM\MongoDB\UnitOfWork;
18
use Lug\Component\Resource\Model\ResourceInterface;
19
use Lug\Component\Resource\Repository\RepositoryInterface;
20
21
/**
22
 * @author GeLo <[email protected]>
23
 */
24
class Repository extends DocumentRepository implements RepositoryInterface
25
{
26
    use RepositoryTrait {
27
        __construct as private constructTrait;
28
    }
29
30
    /**
31
     * @param DocumentManager   $dm
32
     * @param UnitOfWork        $uow
33
     * @param ClassMetadata     $class
34
     * @param ResourceInterface $resource
35
     */
36 16
    public function __construct(
37
        DocumentManager $dm,
38
        UnitOfWork $uow,
39
        ClassMetadata $class,
40
        ResourceInterface $resource
41
    ) {
42 16
        $this->constructTrait($dm, $uow, $class, $resource);
43 16
    }
44
}
45