Completed
Push — master ( b9e797...6ab195 )
by Faiz
05:40
created

QuranServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace FaizShukri\Quran;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class QuranServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Register bindings in the container.
11
     */
12
    public function register()
13
    {
14
        $this->mergeConfigFrom(
15
            realpath(__DIR__.'/../config/quran.php'), 'quran'
16
        );
17
18
        $this->app->bind(Quran::class, function ($app) {
19
            return new Quran($app['config']['quran']);
20
        });
21
22
        $this->app->bind('quran', function ($app) {
23
            return new Quran($app['config']['quran']);
24
        });
25
    }
26
27
    /**
28
     * Perform post-registration booting of services.
29
     */
30
    public function boot()
31
    {
32
        $this->publishes([
33
            realpath(__DIR__.'/../config/quran.php') => config_path('quran.php'),
34
        ]);
35
    }
36
}
37