Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
4 / 4
CRAP
100.00% covered (success)
100.00%
1 / 1
Site
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
4 / 4
4
100.00% covered (success)
100.00%
1 / 1
 url
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 name
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 language
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 metadata
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\Facades;
6
7use Hyde\Framework\Features\Metadata\GlobalMetadataBag;
8
9/**
10 * Facade to quickly get data for the HydePHP site and its configuration.
11 */
12class Site
13{
14    public static function url(): ?string
15    {
16        return Config::getNullableString('hyde.url');
17    }
18
19    public static function name(): ?string
20    {
21        return Config::getNullableString('hyde.name');
22    }
23
24    public static function language(): ?string
25    {
26        return Config::getNullableString('hyde.language');
27    }
28
29    public static function metadata(): GlobalMetadataBag
30    {
31        return GlobalMetadataBag::make();
32    }
33}