Completed
Pull Request — master (#92)
by
unknown
09:57
created

FFMpegServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Pbmedia\LaravelFFMpeg;
4
5
use Illuminate\Support\ServiceProvider;
6
use Pbmedia\LaravelFFMpeg\FFMpeg;
7
8
class FFMpegServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Indicates if loading of the provider is deferred.
12
     *
13
     * @var bool
14
     */
15
    protected $defer = true;
16
    
17
    /**
18
     * Bootstrap the application services.
19
     */
20
    public function boot()
21
    {
22
        $this->publishes([
23
            __DIR__ . '/../config/laravel-ffmpeg.php' => config_path('laravel-ffmpeg.php'),
24
        ], 'config');
25
    }
26
27
    /**
28
     * Register the application services.
29
     */
30
    public function register()
31
    {
32
        $this->mergeConfigFrom(__DIR__ . '/../config/laravel-ffmpeg.php', 'laravel-ffmpeg');
33
34
        $this->app->singleton('laravel-ffmpeg', function ($app) {
35
            return $app->make(FFMpeg::class);
36
        });
37
    }
38
    
39
    /**
40
     * Get the services provided by the provider.
41
     *
42
     * @return array
43
     */
44
    public function provides()
45
    {
46
        return ['laravel-ffmpeg'];
47
    }
48
}
49