MongoSchemaDumperServiceProvider::provides()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Pmurkin\MongoSchemaDumper;
4
5
use Illuminate\Support\ServiceProvider;
6
use Pmurkin\MongoSchemaDumper\Console\SchemaExport;
7
use Pmurkin\MongoSchemaDumper\Console\SchemaImport;
8
9
class MongoSchemaDumperServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Indicates if loading of the provider is deferred.
13
     *
14
     * @var bool
15
     */
16
    protected $defer = true;
17
18
    /**
19
     * Register the service provider.
20
     *
21
     * @return void
22
     */
23
    public function register()
24
    {
25
        $this->app->singleton(
26
            'command.schema.export',
27
            function() {
28
                return new SchemaExport();
29
            }
30
        );
31
32
        $this->app->singleton(
33
            'command.schema.import',
34
            function() {
35
                return new SchemaImport();
36
            }
37
        );
38
39
        $this->commands('command.schema.export', 'command.schema.import');
40
    }
41
42
    /**
43
     * Get the services provided by the provider.
44
     *
45
     * @return string[]
46
     */
47
    public function provides()
48
    {
49
        return array('command.schema.export', 'command.schema.import');
50
    }
51
}
52