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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 24
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A shortenTo() 0 3 1
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