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.

Input::format()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Fab\Clarifai;
4
5
class Input
6
{
7
    /**
8
     * The image URL.
9
     * @var string
10
     */
11
    protected $url;
12
13
    /**
14
     * Instantiate a new input from an url.
15
     *
16
     * @param  string $url The image URL.
17
     * @return Input
18
     */
19 5
    public static function fromUrl($url)
20
    {
21 5
        $input = new static();
22 5
        $input->setUrl($url);
23
24 5
        return $input;
25
    }
26
27
    /**
28
     * Get the image URL.
29
     *
30
     * @return string
31
     */
32 1
    public function getUrl()
33
    {
34 1
        return $this->url;
35
    }
36
37 5
    public function setUrl($url)
38
    {
39 5
        $this->url = $url;
40
41 5
        return $this;
42
    }
43
44
    /**
45
     * Format the input for querying the Clarifai API.
46
     *
47
     * @return array
48
     */
49 4
    public function format()
50
    {
51
        return [
52
            'data' => [
53
                'image' => [
54 4
                    'url' => $this->url,
55
                ]
56
            ]
57
        ];
58
    }
59
}
60