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.

ErrorResult::text()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: robbie
5
 * Date: 01/12/14
6
 * Time: 01:29
7
 */
8
9
namespace RobbieP\ZbarQrdecoder\Result;
10
11
12
class ErrorResult implements ResultInterface {
13
14
    const NOT_FOUND = 'NOT_FOUND';
15
16
    public  $code;
17
    public  $text;
18
    public  $format;
19
20
    /**
21
     * @param $error
22
     */
23
    function __construct($error)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
24
    {
25
        $this->text($error);
26
        $this->format(self::NOT_FOUND);
27
        $this->code = 400;
28
    }
29
30
    /**
31
     * @param $text
32
     */
33
    public function text($text)
34
    {
35
        $this->text = $text;
36
    }
37
38
    /**
39
     * @param $format
40
     */
41
    public function format($format)
42
    {
43
        $this->format = $format;
44
    }
45
}