Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 10 | public function search(string $search): string |
|
27 | { |
||
28 | 10 | $link = $this->selectLink($search); |
|
29 | 10 | $downloadUrl = $link->getUri(); |
|
30 | |||
31 | 10 | if (empty($downloadUrl)) { |
|
32 | throw new RuntimeException('The link was found but it does not contains the url to download'); |
||
33 | } |
||
34 | |||
35 | 10 | return $downloadUrl; |
|
36 | } |
||
52 |