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 (#26)
by Choraimy
08:11
created

CreatesCustomUrls::shortenTo()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LaraCrafts\UrlShortener\Http\Concerns;
4
5
trait CreatesCustomUrls
6
{
7
    /**
8
     * Shorten the given URL to the given identifier.
9
     *
10
     * @param \Psr\Http\Message\UriInterface|string $url
11
     * @param string $identifier
12
     * @param array $options
13
     * @return string
14
     */
15
    public function shortenTo($url, string $identifier, array $options = [])
16
    {
17
        return $this->shortenToAsync($url, $identifier, $options)->wait();
18
    }
19
20
    /**
21
     * Shorten the given URL to the given identifier asynchronously.
22
     *
23
     * @param \Psr\Http\Message\UriInterface|string $url
24
     * @param string $identifier
25
     * @param array $options
26
     * @return \GuzzleHttp\Promise\PromiseInterface
27
     */
28
    abstract public function shortenToAsync($url, string $identifier, array $options = []);
29
}
30