Completed
Pull Request — master (#1984)
by Maciej
19:41
created

PersistentCollection::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ODM\MongoDB;
6
7
use Doctrine\Common\Collections\Collection as BaseCollection;
8
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface;
9
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionTrait;
10
11
/**
12
 * A PersistentCollection represents a collection of elements that have persistent state.
13
 */
14
final class PersistentCollection implements PersistentCollectionInterface
15
{
16
    use PersistentCollectionTrait;
17
18
    /**
19
     * @param BaseCollection $coll
20
     */
21 442
    public function __construct(BaseCollection $coll, DocumentManager $dm, UnitOfWork $uow)
22
    {
23 442
        $this->coll = $coll;
24 442
        $this->dm   = $dm;
25 442
        $this->uow  = $uow;
26 442
    }
27
}
28