ServiceProvider::configFileLocation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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