Completed
Push — master ( 927297...2c9465 )
by Rémi
02:48
created

UndefinedApplicationUser   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 84.62%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 6
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 65
ccs 11
cts 13
cp 0.8462
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A getName() 0 4 1
A getPreferredLanguage() 0 4 1
A getOriginalUser() 0 4 1
A isDefined() 0 4 1
1
<?php
2
3
namespace MessageApp\User;
4
5
use MessageApp\Parser\LocalizedUser;
6
7
class UndefinedApplicationUser implements ApplicationUser, LocalizedUser
8
{
9
    /**
10
     * @var object
11
     */
12
    protected $originalUser;
13
14
    /**
15
     * Constructor
16
     *
17
     * @param object $originalUser
18
     */
19 6
    public function __construct($originalUser)
20
    {
21 6
        $this->originalUser = $originalUser;
22 6
    }
23
24
    /**
25
     * Returns the id
26
     *
27
     * @return string|int
28
     */
29 3
    public function getId()
30
    {
31 3
        return null;
32
    }
33
34
    /**
35
     * Returns the name
36
     *
37
     * @return string
38
     */
39 3
    public function getName()
40
    {
41 3
        return null;
42
    }
43
44
    /**
45
     * Returns the preferred language
46
     *
47
     * @return string
48
     */
49 3
    public function getPreferredLanguage()
50
    {
51 3
        return 'en';
52
    }
53
54
    /**
55
     * Gets the original User
56
     *
57
     * @return object
58
     */
59 3
    public function getOriginalUser()
60
    {
61 3
        return $this->originalUser;
62
    }
63
64
    /**
65
     * @inheritDoc
66
     */
67
    public function isDefined()
68
    {
69
        return false;
70
    }
71
}
72