Completed
Pull Request — 2.x (#251)
by
unknown
02:14
created

User   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 0
dl 0
loc 43
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRoles() 0 4 1
A getPassword() 0 4 1
A getSalt() 0 4 1
A getUsername() 0 4 1
A eraseCredentials() 0 3 1
A getLocale() 0 4 1
A setLocale() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\TranslationBundle\Tests\EventSubscriber;
13
14
use Symfony\Component\Security\Core\User\UserInterface;
15
16
/**
17
 * @author Jonathan Vautrin <[email protected]>
18
 */
19
class User implements UserInterface
20
{
21
    private $locale;
22
23
    public function __construct($locale)
24
    {
25
        $this->locale = $locale;
26
    }
27
28
    public function getRoles()
29
    {
30
        return [];
31
    }
32
33
    public function getPassword()
34
    {
35
        return null;
36
    }
37
38
    public function getSalt()
39
    {
40
        return null;
41
    }
42
43
    public function getUsername()
44
    {
45
        return null;
46
    }
47
48
    public function eraseCredentials()
49
    {
50
    }
51
52
    public function getLocale()
53
    {
54
        return $this->locale;
55
    }
56
57
    public function setLocale($locale)
58
    {
59
        $this->locale = $locale;
60
    }
61
}
62