VoteableServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 2
A register() 0 4 1
1
<?php
2
3
namespace Yoeunes\Voteable;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class VoteableServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application events.
11
     */
12
    public function boot()
13
    {
14
        $this->publishes([
15
            __DIR__.'/../config/voteable.php' => config_path('voteable.php'),
16
        ], 'config');
17
18
        if (! class_exists('CreateVotesTable')) {
19
            $this->publishes([
20
                __DIR__.'/../migrations/create_votes_table.php' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_votes_table.php'),
21
            ], 'migrations');
22
        }
23
    }
24
25
    /**
26
     * Register the service provider.
27
     */
28
    public function register()
29
    {
30
        $this->mergeConfigFrom(__DIR__.'/../config/voteable.php', 'voteable');
31
    }
32
}
33