ServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 23
ccs 13
cts 13
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 2 1
A boot() 0 16 2
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