CashierServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 15
c 0
b 0
f 0
dl 0
loc 39
ccs 17
cts 17
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 2 1
A boot() 0 21 1
1
<?php
2
/**
3
 * This file implements Laravel Cashier Service Provider.
4
 *
5
 * @author    Justin Hartman <[email protected]>
6
 * @copyright 2019 22 Digital
7
 * @since     v0.1
8
 */
9
10
namespace TwentyTwoDigital\CashierFastspring;
11
12
use Illuminate\Support\ServiceProvider;
13
14
/**
15
 * This class describes the Laravel Cashier Service Provider.
16
 *
17
 * {@inheritdoc}
18
 */
19
class CashierServiceProvider extends ServiceProvider
20
{
21
    /**
22
     * Bootstrap the application events.
23
     *
24
     * @return void
25
     */
26 1
    public function boot()
27
    {
28 1
        $time = time();
29
30
        // publish migrations
31 1
        $this->publishes([
32 1
            __DIR__ . '/../resources/migrations/create_subscriptions_table_for_cashier_fastspring.php' => sprintf(
33 1
                database_path('migrations') . '/%s_create_subscriptions_table_for_cashier_fastspring.php',
34 1
                date('Y_m_d_His', $time)
35
            ),
36 1
            __DIR__ . '/../resources/migrations/upgrade_user_table_for_cashier_fastspring.php' => sprintf(
37 1
                database_path('migrations') . '/%s_upgrade_user_table_for_cashier_fastspring.php',
38 1
                date('Y_m_d_His', ++$time)
39
            ),
40 1
            __DIR__ . '/../resources/migrations/create_invoices_table_for_cashier_fastspring.php' => sprintf(
41 1
                database_path('migrations') . '/%s_create_invoices_table_for_cashier_fastspring.php',
42 1
                date('Y_m_d_His', ++$time)
43
            ),
44 1
            __DIR__ . '/../resources/migrations/create_subscription_periods_table_for_cashier_fastspring.php' => sprintf(
45 1
                database_path('migrations') . '/%s_create_subscription_periods_table_for_cashier_fastspring.php',
46 1
                date('Y_m_d_His', ++$time)
47
            ),
48
        ]);
49 1
    }
50
51
    /**
52
     * Register the service provider.
53
     *
54
     * @return void
55
     */
56 1
    public function register()
57
    {
58
        //
59 1
    }
60
}
61