Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class XHProfServiceProvider extends ServiceProvider |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @return void |
||
15 | */ |
||
16 | public function boot(): void |
||
17 | { |
||
18 | if ($this->app->runningInConsole()) { |
||
19 | return; |
||
20 | } |
||
21 | |||
22 | $this->mergeConfigFrom( |
||
23 | dirname(__DIR__) . '/config/config.php', |
||
24 | 'xhprof' |
||
25 | ); |
||
26 | |||
27 | $this->app->singleton(XHProfMiddleware::class); |
||
28 | $this->app->singleton(XHProfService::class); |
||
29 | |||
30 | if (config('xhprof.global_middleware', false)) { |
||
31 | $this->extraMiddleware(XHProfMiddleware::class); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * @param string $className |
||
37 | */ |
||
38 | public function extraMiddleware(string $className): void |
||
45 | } |
||
46 | |||
48 |