Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
LinkComponent
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 render
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\Framework\Views\Components;
6
7use Hyde\Hyde;
8use Illuminate\Support\Facades\View;
9use Illuminate\Contracts\View\View as ViewContract;
10use Illuminate\View\Component;
11
12class LinkComponent extends Component
13{
14    public readonly string $href;
15
16    public function __construct(string $href)
17    {
18        $this->href = Hyde::relativeLink($href);
19    }
20
21    /** @interitDoc */
22    public function render(): ViewContract
23    {
24        return View::make('hyde::components.link');
25    }
26}