TaxServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 2
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 15 3
A register() 0 4 1
1
<?php
2
3
namespace FeiMx\Tax;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class TaxServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if (!class_exists('CreateTaxesTables')) {
15
            $timestamp = date('Y_m_d_His', time());
16
            $this->publishes([
17
                __DIR__.'/../database/migrations/create_taxes_tables.php.stub' => $this->app->databasePath()."/migrations/{$timestamp}_create_taxes_tables.php",
0 ignored issues
show
Bug introduced by
The method databasePath() does not exist on Illuminate\Contracts\Foundation\Application. Did you maybe mean basePath()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
18
            ], 'migrations');
19
        }
20
21
        if ($this->app->runningInConsole()) {
22
            $this->publishes([
23
                __DIR__.'/../config/tax.php' => config_path('tax.php'),
24
            ], 'config');
25
        }
26
    }
27
28
    /**
29
     * Register the application services.
30
     */
31
    public function register()
32
    {
33
        $this->mergeConfigFrom(__DIR__.'/../config/tax.php', 'tax');
34
    }
35
}
36