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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 2
cbo 0
dl 0
loc 34
rs 10

3 Methods

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