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 (#38)
by Choraimy
13:31 queued 06:07
created

UrlShortener::shorten()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace LaraCrafts\UrlShortener;
4
5
use LaraCrafts\UrlShortener\Contracts\Client;
6
7
class UrlShortener implements Client
8
{
9
    protected $driver;
10
    protected $options;
11
12
    /**
13
     * Create a new URL shortener.
14
     *
15
     * @param object $driver
16
     * @param array $options
17
     * @return void
18
     */
19
    public function __construct($driver, array $options = [])
20
    {
21
        $this->driver = $driver;
22
        $this->options = $options;
23
    }
24
25
    /**
26
     * {@inheritDoc}
27
     */
28
    public function driver()
29
    {
30
        return $this->driver;
31
    }
32
33
    /**
34
     * {@inheritDoc}
35
     */
36
    public function shorten($uri, array $options = [])
37
    {
38
        return new Builder($this, $uri, array_merge_recursive($this->options, $options));
39
    }
40
}
41