Completed
Push — master ( ad1ec6...dc2720 )
by Rémi
03:15
created

UndefinedApplicationUser   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 66
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 66
ccs 11
cts 13
cp 0.8462
rs 10

6 Methods

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