Passed
Push — master ( 848647...afab76 )
by Caen
03:49 queued 14s
created

Hyde::kernel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde;
6
7
use Hyde\Facades\Features;
8
use Hyde\Foundation\FileCollection;
9
use Hyde\Foundation\Filesystem;
10
use Hyde\Foundation\HydeKernel;
11
use Hyde\Foundation\PageCollection;
12
use Hyde\Foundation\RouteCollection;
13
use Hyde\Pages\Concerns\HydePage;
14
use Hyde\Support\Models\Route;
15
use Illuminate\Support\Facades\Facade;
16
use Illuminate\Support\HtmlString;
17
18
/**
19
 * General facade for Hyde services.
20
 *
21
 * @see \Hyde\Foundation\HydeKernel
22
 *
23
 * @author  Caen De Silva <[email protected]>
24
 * @copyright 2022 Caen De Silva
25
 * @license MIT License
26
 *
27
 * @method static string path(string $path = '')
28
 * @method static string vendorPath(string $path = '')
29
 * @method static string pathToAbsolute(string $path)
30
 * @method static string pathToRelative(string $path)
31
 * @method static string getModelSourcePath(string $model, string $path = '')
32
 * @method static string getBladePagePath(string $path = '')
33
 * @method static string getMarkdownPagePath(string $path = '')
34
 * @method static string getMarkdownPostPath(string $path = '')
35
 * @method static string getDocumentationPagePath(string $path = '')
36
 * @method static string sitePath(string $path = '')
37
 * @method static string formatLink(string $destination)
38
 * @method static string relativeLink(string $destination)
39
 * @method static string image(string $name, bool $preferQualifiedUrl = false)
40
 * @method static string url(string $path = '')
41
 * @method static string makeTitle(string $value)
42
 * @method static string normalizeNewlines(string $string)
43
 * @method static string stripNewlines(string $string)
44
 * @method static string trimSlashes(string $string)
45
 * @method static HtmlString markdown(string $text, bool $stripIndentation = false)
46
 * @method static string currentPage()
47
 * @method static string getBasePath()
48
 * @method static string getSourceRoot()
49
 * @method static Features features()
50
 * @method static FileCollection files()
51
 * @method static PageCollection pages()
52
 * @method static RouteCollection routes()
53
 * @method static Route|null currentRoute()
54
 * @method static HydeKernel getInstance()
55
 * @method static Filesystem filesystem()
56
 * @method static bool hasFeature(string $feature)
57
 * @method static bool hasSiteUrl()
58
 * @method static bool copy(string $from, string $to)
59
 * @method static bool touch(array|string $path)
60
 * @method static bool unlink(array|string $path)
61
 * @method static void setInstance(HydeKernel $instance)
62
 * @method static void setBasePath(string $basePath)
63
 * @method static void setSourceRoot(string $sourceRoot)
64
 * @method static void shareViewData(HydePage $page)
65
 * @method static array toArray()
66
 * @method static void boot()
67
 *
68
 * @see \Hyde\Foundation\Concerns\ForwardsFilesystem
69
 * @see \Hyde\Foundation\Concerns\ForwardsHyperlinks
70
 */
71
class Hyde extends Facade
72
{
73
    public static function version(): string
74
    {
75
        return HydeKernel::version();
76
    }
77
78
    public static function getFacadeRoot(): HydeKernel
79
    {
80
        return HydeKernel::getInstance();
81
    }
82
83
    public static function kernel(): HydeKernel
84
    {
85
        return HydeKernel::getInstance();
86
    }
87
}
88