StoryblokFormsServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 11 2
A register() 0 3 1
1
<?php
2
3
namespace Riclep\StoryblokForms;
4
5
use Illuminate\Support\ServiceProvider;
6
use Riclep\StoryblokForms\Console\InstallCommand;
7
8
9
class StoryblokFormsServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot(): void
15
    {
16
	    if ($this->app->runningInConsole()) {
17
		    $this->publishes([
18
			    __DIR__.'/../config/storyblok-forms.php' => config_path('storyblok-forms.php'),
19
			    __DIR__.'/../stubs/views' => resource_path('views/storyblok')
20
		    ], 'storyblok-forms');
21
	    }
22
23
	    $this->commands([
24
		    InstallCommand::class,
25
	    ]);
26
    }
27
28
    /**
29
     * Register the application services.
30
     */
31
    public function register(): void
32
    {
33
	    $this->mergeConfigFrom(__DIR__.'/../config/storyblok-forms.php', 'storyblok-forms');
34
    }
35
}
36