DefaultOption   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 50
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getOption() 0 4 1
A setValue() 0 4 1
A getValue() 0 4 1
1
<?php
2
3
/*
4
 * A PSR7 aware cURL client (https://github.com/juliangut/spiral).
5
 *
6
 * @license BSD-3-Clause
7
 * @link https://github.com/juliangut/spiral
8
 * @author Julián Gutiérrez <[email protected]>
9
 */
10
11
namespace Jgut\Spiral\Option;
12
13
/**
14
 * Default cURL option.
15
 */
16
class DefaultOption implements OptionInterface
17
{
18
    /**
19
     * Option.
20
     *
21
     * @var int
22
     */
23
    protected $option;
24
25
    /**
26
     * Option value.
27
     *
28
     * @var mixed
29
     */
30
    protected $value;
31
32
    /**
33
     * Create cURL option.
34
     *
35
     * @param int $option
36
     */
37
    public function __construct($option)
38
    {
39
        $this->option = $option;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getOption()
46
    {
47
        return $this->option;
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function setValue($value)
54
    {
55
        $this->value = $value;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61
    public function getValue()
62
    {
63
        return $this->value;
64
    }
65
}
66