Total Complexity | 5 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 1 | final class LinkRenderPresenterAction extends BaseLinkRender { |
|
15 | protected string $name = "presenterAction"; |
||
16 | |||
17 | private LinkGenerator $linkGenerator; |
||
18 | |||
19 | public function __construct(LinkGenerator $linkGenerator) { |
||
20 | 1 | $this->linkGenerator = $linkGenerator; |
|
21 | 1 | } |
|
22 | |||
23 | public function isApplicable(string $link): bool { |
||
24 | try { |
||
25 | 1 | $this->linkGenerator->link($link); |
|
26 | 1 | return true; |
|
27 | 1 | } catch(InvalidLinkException $e) { |
|
28 | 1 | return false; |
|
29 | } |
||
30 | } |
||
31 | |||
32 | public function renderLink(string $link): string { |
||
37 | } |
||
38 | } |
||
39 | } |
||
40 | ?> |