User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFullName() 0 2 1
A __toString() 0 3 2
1
<?php
2
namespace Germania\Users;
3
4
5
6
class User extends UserAbstract implements UserInterface
7
{
8
9
    /**
10
     * @return string The user display or login name
11
     */
12 15
    public function __toString()
13
    {
14 15
        return $this->getDisplayName() ?: $this->getLoginName();
15
    }
16
17
18
    /**
19
     * Returns a concatenation of the users' first and last name.
20
     *
21
     * @return string
22
     * @uses   getFirstName()
23
     * @uses   getLastName()
24
     */
25 5
    public function getFullName() {
26 5
        return trim($this->getFirstName() . ' ' . $this->getLastName());
27
    }
28
29
30
31
}
32