Passed
Branch master (aef0c6)
by
unknown
04:26
created

RequestOptions   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 49
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 3
1
<?php
2
/**
3
 * Class RequestOptions
4
 *
5
 * @filesource   RequestOptions.php
6
 * @created      15.02.2016
7
 * @package      chillerlan\TinyCurl
8
 * @author       Smiley <[email protected]>
9
 * @copyright    2016 Smiley
10
 * @license      MIT
11
 */
12
13
namespace chillerlan\TinyCurl;
14
15
/**
16
 *
17
 */
18
class RequestOptions{
19
20
	/**
21
	 * @var string
22
	 */
23
	public $user_agent = 'chillerLAN-php-curl';
24
25
	/**
26
	 * @var int
27
	 */
28
	public $timeout = 10;
29
30
	/**
31
	 * options for each curl instance
32
	 *
33
	 * @var array
34
	 */
35
	public $curl_options = [];
36
37
	/**
38
	 * CA Root Certificates for use with CURL/SSL
39
	 *
40
	 * @var string
41
	 * @link https://curl.haxx.se/ca/cacert.pem
42
	 */
43
	public $ca_info = null;
44
45
	/**
46
	 * @var int
47
	 */
48
	public $max_redirects = 0;
49
50
	/**
51
	 * RequestOptions constructor.
52
	 *
53
	 * @param array $properties
54
	 */
55
	public function __construct(array $properties = []){
56
57
		foreach($properties as $key => $value){
58
			if(property_exists($this, $key)){
59
				$this->{$key} = $value;
60
			}
61
		}
62
63
	}
64
65
66
}
67