ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 8
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 16
ccs 11
cts 11
cp 1
crap 2
rs 10
1
<?php
2
3
namespace CashierSubscriptionPause;
4
5
use CashierSubscriptionPause\Listeners\CashierWebhookHandledEventListener;
6
7
class ServiceProvider extends \Illuminate\Support\ServiceProvider
8
{
9 5
    public function boot()
10
    {
11 5
        if ($this->app->runningInConsole()) {
12 5
            $this->publishes([
13 5
                __DIR__ . '/../database/migrations/add_pause_collection_to_subscriptions_table.php.stub' => database_path('migrations/'. date('Y_m_d_His_') .'add_pause_collection_to_subscriptions_table.php'),
14 5
            ], 'migrations');
15
16
17 5
            $this->commands([
18 5
                //
19 5
            ]);
20
        }
21
22 5
        \Illuminate\Support\Facades\Event::listen(
23 5
            \Laravel\Cashier\Events\WebhookHandled::class,
24 5
            CashierWebhookHandledEventListener::class
25 5
        );
26
    }
27
28 5
    public function register()
29
    {
30 5
    }
31
}
32