| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function register() |
||
| 34 | { |
||
| 35 | $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'debug-server'); |
||
| 36 | |||
| 37 | $this->app->bind('command.dumpserver', DumpServerCommand::class); |
||
| 38 | |||
| 39 | $this->commands([ |
||
| 40 | 'command.dumpserver', |
||
| 41 | ]); |
||
| 42 | |||
| 43 | $host = $this->app['config']->get('debug-server.host'); |
||
| 44 | |||
| 45 | $this->app->when(DumpServer::class)->needs('$host')->give($host); |
||
| 46 | |||
| 47 | $connection = new Connection($host, [ |
||
| 48 | 'request' => new RequestContextProvider($this->app['request']), |
||
| 49 | 'source' => new SourceContextProvider('utf-8', base_path()), |
||
|
|
|||
| 50 | ]); |
||
| 51 | |||
| 52 | VarDumper::setHandler(function ($var) use ($connection) { |
||
| 53 | $this->app->makeWith(Dumper::class, ['connection' => $connection])->dump($var); |
||
| 54 | }); |
||
| 57 |