Client   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 35
rs 10
wmc 3

3 Methods

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