Completed
Push — master ( e79530...6b56a3 )
by
unknown
20:04 queued 18:37
created

QueryBuilderServiceProvider::provides()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Spatie\QueryBuilder;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class QueryBuilderServiceProvider extends ServiceProvider
8
9
    public function boot()
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_PUBLIC, expecting '{'
Loading history...
10
    {
11
        if ($this->app->runningInConsole() && function_exists('config_path')) {
12
            $this->publishes([
13
                __DIR__.'/../config/query-builder.php' => config_path('query-builder.php'),
14
            ], 'config');
15
        }
16
17
        $this->mergeConfigFrom(__DIR__.'/../config/query-builder.php', 'query-builder');
18
    }
19
20
    public function register()
21
    {
22
        $this->app->bind(QueryBuilderRequest::class, function ($app) {
23
            return QueryBuilderRequest::fromRequest($app['request']);
24
        });
25
    }
26
27
    public function provides()
28
    {
29
        // TODO: implement DeferrableProvider when Laravel 5.7 support is dropped.
30
31
        return [
32
            QueryBuilderRequest::class,
33
        ];
34
    }
35
}
36