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

FFMpegServiceProvider   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 41
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 8 1
A provides() 0 4 1
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