Completed
Push — master ( d83f32...d4821e )
by Rémi
04:29
created

HttpStatus   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 23
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isError() 0 4 1
1
<?php
2
3
namespace Twitter\API\REST\Response;
4
5
class HttpStatus
6
{
7
    /** @var int */
8
    private $status;
9
10
    /**
11
     * HttpStatus constructor.
12
     *
13
     * @param int $status
14
     */
15 66
    public function __construct($status)
16
    {
17 66
        $this->status = $status;
18 66
    }
19
20
    /**
21
     * @return bool
22
     */
23 30
    public function isError()
24
    {
25 30
        return $this->status !== 200;
26
    }
27
}
28