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

HttpGetResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 25
ccs 10
cts 10
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setNeedAuth() 0 4 1
A needAuth() 0 4 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