Completed
Push — master ( 08e890...83653b )
by Dev
02:28
created

MultipleCheckInHeaders::check()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 4
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PiedWeb\Curl;
4
5
/**
6
 * This class is an example.
7
 */
8
class MultipleCheckInHeaders
9
{
10
    protected $code;
11
12 6
    public function check($line)
13
    {
14 6
        if (Helper::checkStatusCode($line)) {
15 3
            $this->code = 200;
16
        }
17
18 6
        return 200 == $this->code && Helper::checkContentType($line);
19
    }
20
}
21