Completed
Push — master ( 0b105d...2d000c )
by Tom
03:34
created

StancyServiceProvider::registerSchemaOrg()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Astrotomic\Stancy;
4
5
use Astrotomic\Stancy\Models\Page;
6
use Illuminate\Support\ServiceProvider;
7
use Spatie\SchemaOrg\Graph;
8
9
class StancyServiceProvider extends ServiceProvider
10
{
11 13
    public function boot(): void
12
    {
13 13
        $this->publishes([
14 13
            __DIR__.'/../config/stancy.php' => config_path('stancy.php'),
15 13
        ], 'config');
16 13
    }
17
18 13
    public function register(): void
19
    {
20 13
        $this->registerConfig();
21 13
        $this->registerSchemaOrg();
22 13
        $this->registerPage();
23 13
    }
24
25 13
    protected function registerConfig(): void
26
    {
27 13
        $this->mergeConfigFrom(
28 13
            __DIR__.'/../config/stancy.php', 'stancy'
29
        );
30 13
    }
31
32 13
    protected function registerSchemaOrg(): void
33
    {
34 13
        $this->app->singleton(Graph::class);
35 13
    }
36
37 13
    protected function registerPage(): void
38
    {
39 13
        $this->app->bind(Page::class);
40 13
    }
41
}
42