Completed
Pull Request — master (#80)
by Hiraku
02:20
created

HttpGetResponse::setNeedAuth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * hirak/prestissimo
4
 * @author Hiraku NAKANO
5
 * @license MIT https://github.com/hirak/prestissimo
6
 */
7
namespace Hirak\Prestissimo;
8
9
class HttpGetResponse
10
{
11
    public $errno;
12
    public $error;
13
    public $info;
14
15
    protected $needAuth = false;
16
17 1
    public function __construct($errno, $error, array $info)
18
    {
19 1
        $this->errno = $errno;
20 1
        $this->error = $error;
21 1
        $this->info = $info;
22 1
    }
23
24 1
    public function setNeedAuth()
25
    {
26 1
        $this->needAuth = true;
27 1
    }
28
29 1
    public function needAuth()
30
    {
31 1
        return $this->needAuth;
32
    }
33
}
34