User::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Wallhaven;
4
5
/**
6
 * User
7
 *
8
 * @package Wallhaven
9
 */
10
class User
11
{
12
    /**
13
     * @var string Username.
14
     */
15
    private $username;
16
17
    /**
18
     * @param string $username Username.
19
     */
20
    public function __construct($username)
21
    {
22
        $this->username = $username;
23
    }
24
25
    /**
26
     * @return string Username.
27
     */
28
    public function getUsername()
29
    {
30
        return $this->username;
31
    }
32
33
    /**
34
     * @return string Username.
35
     */
36
    public function __toString()
37
    {
38
        return $this->username;
39
    }
40
}
41