Passed
Push — master ( 9ca6d3...427e8a )
by Caen
03:12 queued 12s
created

ForwardsHyperlinks   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 6

6 Methods

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