Total Complexity | 1 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
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 = []) |
||
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 |