GenderizeServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
A boot() 0 6 1
1
<?php
2
3
namespace Pixelpeter\Genderize;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class GenderizeServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        $this->mergeConfigFrom(__DIR__.'/../config/genderize.php', 'genderize');
17
18
        $this->publishes([
19
            __DIR__.'/../config/genderize.php' => config_path('genderize.php'),
20
        ]);
21
    }
22
23
    /**
24
     * Register the application services.
25
     *
26
     * @return void
27
     */
28
    public function register()
29
    {
30
        $app = $this->app;
31
32
        $app->bind('Pixelpeter\Genderize\GenderizeClient', function () {
33
            return new GenderizeClient(new \Unirest\Request);
34
        });
35
36
        $app->alias('Pixelpeter\Genderize\GenderizeClient', 'genderize');
37
    }
38
}
39