ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 24
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
A configFileLocation() 0 3 1
1
<?php
2
3
namespace Mnabialek\LaravelQuickMigrations\Providers;
4
5
class ServiceProvider extends \Illuminate\Support\ServiceProvider
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function register()
11
    {
12
        // merge config
13
        $this->mergeConfigFrom($this->configFileLocation(), 'quick_migrations');
14
15
        // register files to be published
16
        $this->publishes([
17
            $this->configFileLocation() => config_path('quick_migrations.php'),
18
        ]);
19
    }
20
21
    /**
22
     * Get config file location.
23
     *
24
     * @return bool|string
25
     */
26
    protected function configFileLocation()
27
    {
28
        return realpath(__DIR__ . '/../../publish/config/quick_migrations.php');
29
    }
30
}
31