AppServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php namespace JobApis\JobsToMail\Providers;
2
3
use Illuminate\Support\ServiceProvider;
4
use JobApis\Jobs\Client\JobsMulti;
5
use League\Csv\Writer;
6
7
class AppServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap any application services.
11
     *
12
     * @return void
13
     */
14
    public function boot()
15
    {
16
        //
17
    }
18
19
    /**
20
     * Register any application services.
21
     *
22
     * @return void
23
     */
24
    public function register()
25
    {
26
        // Search Repository
27
        $this->app->bind(
28
            \JobApis\JobsToMail\Repositories\Contracts\SearchRepositoryInterface::class,
29
            \JobApis\JobsToMail\Repositories\SearchRepository::class
30
        );
31
        // User Repository
32
        $this->app->bind(
33
            \JobApis\JobsToMail\Repositories\Contracts\UserRepositoryInterface::class,
34
            \JobApis\JobsToMail\Repositories\UserRepository::class
35
        );
36
        // Job board API client
37
        $this->app->bind(JobsMulti::class, function () {
38
            return new JobsMulti(config('jobboards'));
39
        });
40
        // CSV Writer
41
        $this->app->bind('League\Csv\Writer', function () {
42
            return Writer::createFromString('');
43
        });
44
    }
45
}
46