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

QuranServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 30
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 14 1
A boot() 0 6 1
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