Completed
Push — master ( badf96...ca0d3c )
by
unknown
07:34
created

SetUsernameAndPassword   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A identifier() 0 4 1
A value() 0 4 1
1
<?php
2
3
namespace Net\Bazzline\Component\Curl\Option;
4
5
class SetUsernameAndPassword implements OptionInterface
6
{
7
    /** @var string */
8
    private $password;
9
10
    /** @var string */
11
    private $username;
12
13
    /**
14
     * @param string $username
15
     * @param string $password
16
     */
17
    public function __construct($username, $password)
18
    {
19
        $this->password = $password;
20
        $this->username = $username;
21
    }
22
23
    /**
24
     * @return int
25
     */
26
    public function identifier()
27
    {
28
        return CURLOPT_USERPWD;
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function value()
35
    {
36
        return $this->username . ':' . $this->password;
37
    }
38
}