| Conditions | 3 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function register( $container ) { |
||
| 30 | $this->extendConfig( $container, 'debug', [ |
||
| 31 | 'pretty_errors' => true, |
||
| 32 | ] ); |
||
| 33 | |||
| 34 | $container['whoops'] = function () { |
||
| 35 | if ( ! class_exists( Run::class ) ) { |
||
| 36 | return null; |
||
| 37 | } |
||
| 38 | |||
| 39 | $run = new Run(); |
||
| 40 | $run->allowQuit( false ); |
||
| 41 | $run->pushHandler( new PrettyPageHandler() ); |
||
| 42 | return $run; |
||
| 43 | }; |
||
| 44 | |||
| 45 | $container[ WPEMERGE_EXCEPTIONS_ERROR_HANDLER_KEY ] = function ( $c ) { |
||
| 46 | $whoops = $c[ WPEMERGE_CONFIG_KEY ]['debug']['pretty_errors'] ? $c['whoops'] : null; |
||
| 47 | return new ErrorHandler( $whoops, Application::debugging() ); |
||
|
|
|||
| 48 | }; |
||
| 58 |