Passed
Push — master ( 028b7e...2c17a6 )
by Caen
03:55 queued 12s
created

Site::getOutputDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Facades;
6
7
use Hyde\Framework\Features\Metadata\GlobalMetadataBag;
8
use Hyde\Hyde;
9
10
/**
11
 * Object representation for the HydePHP site and its configuration.
12
 *
13
 * @see \Hyde\Framework\Testing\Feature\SiteTest
14
 */
15
final class Site
16
{
17
    public static function url(): ?string
18
    {
19
        return config('site.url');
20
    }
21
22
    public static function name(): ?string
23
    {
24
        return config('site.name');
25
    }
26
27
    public static function language(): ?string
28
    {
29
        return config('site.language');
30
    }
31
32
    public static function metadata(): GlobalMetadataBag
33
    {
34
        return GlobalMetadataBag::make();
35
    }
36
37
    public static function getOutputDirectory(): string
38
    {
39
        return Hyde::kernel()->getOutputDirectory();
40
    }
41
42
    public static function setOutputDirectory(string $outputDirectory): void
43
    {
44
        Hyde::kernel()->setOutputDirectory($outputDirectory);
45
    }
46
}
47