Completed
Push — master ( 530f3a...b8358f )
by Siim
10:54
created

TranslatorTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTranslator() 0 3 1
A setTranslator() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 4.02.19
6
 * Time: 11:07
7
 */
8
9
namespace Sf4\Api\Utils\Traits;
10
11
use Symfony\Contracts\Translation\TranslatorInterface;
12
13
trait TranslatorTrait
14
{
15
16
    /** @var TranslatorInterface */
17
    protected $translator;
18
19
    /**
20
     * @return TranslatorInterface
21
     */
22
    public function getTranslator(): TranslatorInterface
23
    {
24
        return $this->translator;
25
    }
26
27
    /**
28
     * @param TranslatorInterface $translator
29
     */
30
    public function setTranslator(TranslatorInterface $translator): void
31
    {
32
        $this->translator = $translator;
33
    }
34
}
35