Completed
Pull Request — master (#1717)
by Maciej
12:25 queued 01:05
created

DefaultRepositoryFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A instantiateRepository() 0 4 1
1
<?php
2
3
namespace Doctrine\ODM\MongoDB\Repository;
4
5
use Doctrine\ODM\MongoDB\DocumentManager;
6
use Doctrine\ODM\MongoDB\Mapping\ClassMetadata;
7
8
/**
9
 * This factory is used to create default repository objects for documents at runtime.
10
 */
11
final class DefaultRepositoryFactory extends AbstractRepositoryFactory
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16 329
    protected function instantiateRepository($repositoryClassName, DocumentManager $documentManager, ClassMetadata $metadata)
17
    {
18 329
        return new $repositoryClassName($documentManager, $documentManager->getUnitOfWork(), $metadata);
19
    }
20
}
21