ServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
dl 0
loc 32
ccs 21
cts 21
cp 1
rs 10
c 1
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 3 1
A boot() 0 23 3
1
<?php
2
3
namespace IproSync;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7 3
    public function boot()
8
    {
9 3
        $this->loadTranslationsFrom(__DIR__.'/../lang', 'ipro-sync');
10
11 3
        if ($this->app->runningInConsole()) {
12 3
            if (IproSoftwareSync::$runsMigrations) {
13 3
                $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
14
            }
15 3
            $this->publishes([
16 3
                __DIR__.'/../config/iprosoftware-sync.php' => config_path('iprosoftware-sync.php'),
17 3
            ], 'config');
18
19
20 3
            $this->commands([
21 3
                \IproSync\Console\Commands\SettingsPullCommand::class,
22 3
                \IproSync\Console\Commands\ContactsPullCommand::class,
23 3
                \IproSync\Console\Commands\PropertiesPullCommand::class,
24 3
                \IproSync\Console\Commands\PropertiesCustomRatesPullCommand::class,
25 3
                \IproSync\Console\Commands\AvailabilityPullCommand::class,
26 3
                \IproSync\Console\Commands\BookingsPullCommand::class,
27 3
                \IproSync\Console\Commands\BlockoutsPullCommand::class,
28 3
                \IproSync\Console\Commands\RecentlyUpdatedBookingsBlockoutsPullCommand::class,
29 3
                \IproSync\Console\Commands\IproPullDatabaseCommand::class,
30 3
            ]);
31
        }
32
    }
33
34 3
    public function register()
35
    {
36 3
        $this->mergeConfigFrom(__DIR__.'/../config/iprosoftware-sync.php', 'iprosoftware-sync');
37
    }
38
}
39