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