Client::getUsername()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SimpleDIC\Dummy;
4
5
class Client
6
{
7
    /**
8
     * @var string $username
9
     */
10
    private $username;
11
12
    /**
13
     * @var string $password
14
     */
15
    private $password;
16
17
    /**
18
     * Client constructor.
19
     *
20
     * @param string $username
21
     * @param string $password
22
     */
23
    public function __construct($username, $password)
24
    {
25
        $this->username = $username;
26
        $this->password = $password;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getUsername()
33
    {
34
        return $this->username;
35
    }
36
37
    public function __sleep()
38
    {
39
        throw new \RuntimeException('This class cannot be serialized.');
40
    }
41
}
42