TranscribeServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 5 1
A register() 0 21 1
1
<?php
2
3
namespace NicolasBeauvais\Transcribe;
4
5
use Illuminate\Filesystem\Filesystem;
6
use Illuminate\Support\ServiceProvider;
7
8
class TranscribeServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Bootstrap the application services.
12
     */
13
    public function boot()
14
    {
15
        $this->publishes([
16
            __DIR__.'/../config/transcribe.php' => config_path('transcribe.php'),
17
        ], 'config');
18
    }
19
20
    public function register()
21
    {
22
        $this->mergeConfigFrom(__DIR__.'/../config/transcribe.php', 'transcribe');
23
24
        $this->app->bind(Manager::class, function () {
25
            return new Manager(
26
                new Filesystem(),
27
                $this->app['config']['transcribe.path'],
28
                array_merge($this->app['config']['view.paths'], [$this->app['path']])
29
            );
30
        });
31
32
        $this->commands([
33
            \NicolasBeauvais\Transcribe\Commands\MissingCommand::class,
34
            \NicolasBeauvais\Transcribe\Commands\RemoveCommand::class,
35
            \NicolasBeauvais\Transcribe\Commands\TransCommand::class,
36
            \NicolasBeauvais\Transcribe\Commands\ShowCommand::class,
37
            \NicolasBeauvais\Transcribe\Commands\FindCommand::class,
38
            \NicolasBeauvais\Transcribe\Commands\SyncCommand::class,
39
            \NicolasBeauvais\Transcribe\Commands\RenameCommand::class,
40
            \NicolasBeauvais\Transcribe\Commands\UnusedCommand::class,
41
        ]);
42
    }
43
}
44