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

ControllerDoctrineTrait::setDoctrine()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 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