Conditions | 5 |
Paths | 12 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 6.6 |
Changes | 0 |
1 | <?php |
||
21 | function __construct($config = []) |
||
22 | { |
||
23 | !isset($config[Arg::HEADERS]) && |
||
24 | 3 | $config[Arg::HEADERS] = new Http\HttpHeaders; |
|
25 | |||
26 | 3 | is_array($config[Arg::HEADERS]) && |
|
27 | $config[Arg::HEADERS] = new Http\HttpHeaders($config[Arg::HEADERS]); |
||
28 | |||
29 | isset($config[Arg::URI]) && !($config[Arg::URI] instanceof Http\Uri) && |
||
30 | $config[Arg::URI] = new Http\HttpUri($config[Arg::URI]); |
||
31 | |||
32 | 9 | $this->config = $config; |
|
33 | } |
||
75 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.