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
Pull Request — master (#10)
by
unknown
05:09
created

AbstractResult::format()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace RobbieP\ZbarQrdecoder\Result;
4
5
abstract class AbstractResult
6
{
7
    /**
8
     * @var int
9
     */
10
    protected $code = 0;
11
12
    /**
13
     * @var string
14
     */
15
    protected $text;
16
17
    /**
18
     * @var string
19
     */
20
    protected $format;
21
22
    /**
23
     * @return bool
24
     */
25
    public function hasResult()
26
    {
27
        return $this->code === 200;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getText()
34
    {
35
        return $this->text;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getFormat()
42
    {
43
        return $this->format;
44
    }
45
46
    /**
47
     * Will determine what type of barcode and set the correct text response
48
     *
49
     * @param string $text
50
     */
51
    protected function text($text)
52
    {
53
        $this->text = $text;
54
    }
55
56
    protected function format($format)
57
    {
58
        $this->format = $format;
59
    }
60
61
    public function __toString()
62
    {
63
        return $this->text;
64
    }
65
}
66