Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
7 / 7
CRAP
100.00% covered (success)
100.00%
1 / 1
ForwardsHyperlinks
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
7 / 7
7
100.00% covered (success)
100.00%
1 / 1
 formatLink
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 relativeLink
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 mediaLink
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 asset
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 url
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 route
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 hasSiteUrl
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Hyde\Foundation\Concerns;
6
7use Hyde\Support\Models\Route;
8
9/**
10 * @internal Single-use trait for the HydeKernel class.
11 *
12 * @see \Hyde\Foundation\HydeKernel
13 */
14trait ForwardsHyperlinks
15{
16    public function formatLink(string $destination): string
17    {
18        return $this->hyperlinks->formatLink($destination);
19    }
20
21    public function relativeLink(string $destination): string
22    {
23        return $this->hyperlinks->relativeLink($destination);
24    }
25
26    public function mediaLink(string $destination, bool $validate = false): string
27    {
28        return $this->hyperlinks->mediaLink($destination, $validate);
29    }
30
31    public function asset(string $name, bool $preferQualifiedUrl = false): string
32    {
33        return $this->hyperlinks->asset($name, $preferQualifiedUrl);
34    }
35
36    public function url(string $path = ''): string
37    {
38        return $this->hyperlinks->url($path);
39    }
40
41    public function route(string $key): ?Route
42    {
43        return $this->hyperlinks->route($key);
44    }
45
46    public function hasSiteUrl(): bool
47    {
48        return $this->hyperlinks->hasSiteUrl();
49    }
50}