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

SetUsernameAndPassword::identifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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
}