TranscribeServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
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