Passed
Push — master ( d6782e...149d2c )
by Caen
12:13 queued 11s
created

ForwardsHyperlinks   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A image() 0 3 1
A hasSiteUrl() 0 3 1
A relativeLink() 0 3 1
A url() 0 3 1
A formatLink() 0 3 1
1
<?php
2
3
namespace Hyde\Framework\Foundation\Concerns;
4
5
/**
6
 * @internal Single-use trait for the HydeKernel class.
7
 *
8
 * @see \Hyde\Framework\HydeKernel
9
 */
10
trait ForwardsHyperlinks
11
{
12
    public function formatLink(string $destination): string
13
    {
14
        return $this->hyperlinks->formatLink($destination);
15
    }
16
17
    public function relativeLink(string $destination): string
18
    {
19
        return $this->hyperlinks->relativeLink($destination);
20
    }
21
22
    public function image(string $name, bool $preferQualifiedUrl = false): string
23
    {
24
        return $this->hyperlinks->image($name, $preferQualifiedUrl);
25
    }
26
27
    public function hasSiteUrl(): bool
28
    {
29
        return $this->hyperlinks->hasSiteUrl();
30
    }
31
32
    public function url(string $path = '', ?string $default = null): string
33
    {
34
        return $this->hyperlinks->url($path, $default);
35
    }
36
}
37