Completed
Branch master (beb88f)
by Mohamed
05:11 queued 03:39
created

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 24
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 16 2
1
<?php
2
3
namespace Moo\FlashCard;
4
5
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
6
use Moo\FlashCard\Command\CreateCard;
7
use Moo\FlashCard\Command\CreateCategory;
8
9
class ServiceProvider extends BaseServiceProvider
10
{
11
    /**
12
     * Bootstrap any application services.
13
     *
14
     * @return void
15
     */
16
    public function boot()
17
    {
18
        // Load database migration classes
19
        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
20
21
        // Load command line tool for add cards or categories
22
        if ($this->app->runningInConsole()) {
23
            $this->commands([
24
                CreateCard::class,
25
                CreateCategory::class,
26
            ]);
27
        }
28
29
        // Load API routes
30
        $this->loadRoutesFrom(__DIR__.'/../../routes/api.php');
31
    }
32
}
33