Completed
Pull Request — master (#1219)
by Maciej
13:47
created

PersistentCollection::remove()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 13
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 2.0116

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 13
loc 13
ccs 6
cts 7
cp 0.8571
rs 9.4285
cc 2
eloc 7
nc 2
nop 1
crap 2.0116
1
<?php
2
/*
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the MIT license. For more information, see
17
 * <http://www.doctrine-project.org>.
18
 */
19
20
namespace Doctrine\ODM\MongoDB;
21
22
use Doctrine\Common\Collections\Collection as BaseCollection;
23
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
24
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionInterface;
25
use Doctrine\ODM\MongoDB\PersistentCollection\PersistentCollectionTrait;
26
use Doctrine\ODM\MongoDB\Utility\CollectionHelper;
27
28
/**
29
 * A PersistentCollection represents a collection of elements that have persistent state.
30
 *
31
 * @since 1.0
32
 */
33
class PersistentCollection implements PersistentCollectionInterface
34
{
35
    use PersistentCollectionTrait;
36
37
    /**
38
     * @param BaseCollection $coll
39
     * @param DocumentManager $dm
40
     * @param UnitOfWork $uow
41
     */
42 392
    public function __construct(BaseCollection $coll, DocumentManager $dm, UnitOfWork $uow)
43
    {
44 392
        $this->coll = $coll;
45 392
        $this->dm = $dm;
46 392
        $this->uow = $uow;
47 392
    }
48
}
49