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   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 32
ccs 0
cts 12
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A shorten() 0 3 1
A driver() 0 3 1
A __construct() 0 4 1
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