| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2.0023 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | 121 | public static function register() |
|
| 11 | { |
||
| 12 | 121 | if (! app()->offsetExists('debugbar')) { |
|
| 13 | return; |
||
| 14 | } |
||
| 15 | |||
| 16 | 121 | app()->singleton('heyman.debugger', function () { |
|
| 17 | 121 | return new MessagesCollector('HeyMan'); |
|
| 18 | 121 | }); |
|
| 19 | |||
| 20 | 121 | app()->make('debugbar')->addCollector(app('heyman.debugger')); |
|
| 21 | |||
| 22 | 121 | Event::listen('heyman_reaction_is_happening', function (...$debug) { |
|
| 23 | 58 | app()['heyman_reaction_is_happened_in_debug'] = $debug; |
|
| 24 | 58 | resolve('heyman.debugger')->addMessage('HeyMan Rule Matched in file: '); |
|
| 25 | 58 | resolve('heyman.debugger')->addMessage($debug[0].' on line: '.$debug[1]); |
|
| 26 | 58 | resolve('heyman.debugger')->addMessage($debug[2]); |
|
| 27 | 121 | }); |
|
| 30 |