Completed
Push — 1.x ( 04552a...1a3bca )
by Yuu
8s
created

EntityManagerInject   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A setEntityManager() 0 4 1
1
<?php
2
/**
3
 * This file is part of the Ray.DoctrineOrmModule package
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace Ray\DoctrineOrmModule;
8
9
use Doctrine\ORM\EntityManagerInterface;
10
use Ray\Di\Di\Inject;
11
12
trait EntityManagerInject
13
{
14
    /**
15
     * @var EntityManagerInterface
16
     */
17
    protected $entityManager;
18
19
    /**
20
     * @param EntityManagerInterface $entityManager
21
     *
22
     * @Inject
23
     */
24 6
    public function setEntityManager(EntityManagerInterface $entityManager)
25
    {
26 6
        $this->entityManager = $entityManager;
27 6
    }
28
}
29