| Conditions | 2 |
| Paths | 2 |
| Total Lines | 33 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 4 | public function register(Container $dic) |
|
| 43 | { |
||
| 44 | |||
| 45 | |||
| 46 | // Make sure there's a 'Monolog.Handlers' service |
||
| 47 | 4 | if (!$dic->offsetExists( 'Monolog.Handlers')) : |
|
| 48 | $dic['Monolog.Handlers'] = function($dic) { return array(); }; |
||
|
|
|||
| 49 | endif; |
||
| 50 | |||
| 51 | |||
| 52 | /** |
||
| 53 | * @return array |
||
| 54 | */ |
||
| 55 | 1 | $dic->extend('Monolog.Handlers', function(array $handlers, $dic) { |
|
| 56 | 4 | $handlers[] = $dic['Monolog.Handlers.TeamsHandler']; |
|
| 57 | 4 | return $handlers; |
|
| 58 | 4 | }); |
|
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | /** |
||
| 63 | * Send log messages to Microsoft Teams. |
||
| 64 | * |
||
| 65 | * @return SlackHandler |
||
| 66 | */ |
||
| 67 | 1 | $dic['Monolog.Handlers.TeamsHandler'] = function( $dic) { |
|
| 68 | 4 | $th = new HtmlFormattedTeamsLogHandler( $this->incoming_webook_url, $this->loglevel); |
|
| 69 | 4 | $th->setFormatter( new HtmlFormatter ); |
|
| 70 | 4 | return $th; |
|
| 71 | }; |
||
| 72 | |||
| 73 | |||
| 74 | 4 | } |
|
| 75 | } |
||
| 76 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.