Passed
Push — test ( 7f1499...ccf3d3 )
by Someshwer
06:32
created

WorldDataServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 23
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 4 1
1
<?php
2
3
namespace Someshwer\WorldCountries;
4
5
use Illuminate\Support\ServiceProvider;
6
use Someshwer\WorldCountries\Data\DataRepository;
7
use Someshwer\WorldCountries\Lib\World;
8
9
/**
10
 * Author: Someshwer Bandapally
11
 * Date: 26-05-2018.
12
 *
13
 * Class WorldDataServiceProvider
14
 */
15
class WorldDataServiceProvider extends ServiceProvider
16
{
17
    /**
18
     * Register any application services.
19
     *
20
     * @return void
21
     */
22 39
    public function register()
23
    {
24
        $this->app->bind('bs-world', function () {
25 39
            return new World(new DataRepository());
26 39
        });
27 39
    }
28
29
    /**
30
     * Bootstrap any application services.
31
     *
32
     * @return void
33
     */
34 39
    public function boot()
35
    {
36
        // $this->loadRoutesFrom(__DIR__ . '/routes/routes.php');
37 39
        $this->publishes([__DIR__.'/Config/world.php' => config_path('world.php')], 'config');
38 39
    }
39
}
40