User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 3
c 2
b 1
f 0
lcom 0
cbo 0
dl 0
loc 31
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUsername() 0 4 1
A __toString() 0 4 1
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