GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 0baec8...65564e )
by Jonny
04:04
created

Request::getType()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the php-phantomjs.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JonnyW\PhantomJs\Http;
11
12
/**
13
 * PHP PhantomJs
14
 *
15
 * @author Jon Wenmoth <[email protected]>
16
 */
17
class Request extends AbstractRequest
18
{
19
    /**
20
     * Request type
21
     *
22
     * @var string
23
     * @access protected
24
     */
25
    protected $type;
26
27
    /**
28
     * Get request type
29
     *
30
     * @access public
31
     * @return string
32
     */
33 26
    public function getType()
34
    {
35 26
        if (!$this->type) {
36 25
            return RequestInterface::REQUEST_TYPE_DEFAULT;
37
        }
38
39 1
        return $this->type;
40
    }
41
42
    /**
43
     * Set request type
44
     *
45
     * @access public
46
     * @param  string                                 $type
47
     * @return \JonnyW\PhantomJs\Http\AbstractRequest
48
     */
49 1
    public function setType($type)
50
    {
51 1
        $this->type = $type;
52
53 1
        return $this;
54
    }
55
}
56