Completed
Push — master ( 003c1a...870291 )
by Tomáš
06:24
created

ControllerDoctrineTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 17
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setDoctrine() 0 4 1
A getDoctrine() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Symplify
7
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
8
 */
9
10
namespace Symplify\ControllerAutowire\Controller\Doctrine;
11
12
use Doctrine\Common\Persistence\ManagerRegistry;
13
14
trait ControllerDoctrineTrait
15
{
16
    /**
17
     * @var ManagerRegistry
18
     */
19
    private $doctrine;
20
21
    public function setDoctrine(ManagerRegistry $doctrine)
22
    {
23
        $this->doctrine = $doctrine;
24
    }
25
26
    protected function getDoctrine() : ManagerRegistry
27
    {
28
        return $this->doctrine;
29
    }
30
}
31