TikTokServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 11
c 1
b 0
f 0
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
A boot() 0 11 1
1
<?php
2
3
namespace Daaner\TikTok;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class TikTokServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->publishes([
17
            __DIR__.'/../config/tiktok.php' => config_path('tiktok.php'),
18
        ], 'config');
19
20
        $this->publishes([
21
            __DIR__.'/../resources/lang' => "{$this->app['path.lang']}/vendor/tiktok",
22
        ]);
23
24
        $this->loadTranslationsFrom(__DIR__.'/../resources/lang/', 'tiktok');
25
    }
26
27
    /**
28
     * Register services.
29
     *
30
     * @return void
31
     */
32
    public function register()
33
    {
34
        $this->mergeConfigFrom(__DIR__.'/../config/tiktok.php', 'tiktok');
35
36
        $this->app->singleton('tiktok', function () {
37
            return $this->app->make(TikTok::class);
38
        });
39
40
        $this->app->alias('tiktok', 'TikTok');
41
    }
42
}
43