| Conditions | 2 |
| Paths | 2 |
| Total Lines | 30 |
| Lines | 30 |
| Ratio | 100 % |
| Tests | 9 |
| CRAP Score | 2.0625 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 2 | View Code Duplication | public function register(Container $dic) |
| 37 | { |
||
| 38 | |||
| 39 | |||
| 40 | // Make sure there's a 'Monolog.Handlers' service |
||
| 41 | 2 | if (!$dic->offsetExists('Monolog.Handlers')) : |
|
| 42 | 2 | $dic['Monolog.Handlers'] = function ($dic) { |
|
| 43 | return array(); |
||
| 44 | }; |
||
| 45 | endif; |
||
| 46 | |||
| 47 | |||
| 48 | /** |
||
| 49 | * @return array |
||
| 50 | */ |
||
| 51 | 2 | $dic->extend('Monolog.Handlers', function (array $handlers, $dic) { |
|
| 52 | $handlers[] = $dic['Monolog.Handlers.BrowserConsoleHandler']; |
||
| 53 | return $handlers; |
||
| 54 | 2 | }); |
|
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | /** |
||
| 59 | * @return BrowserConsoleHandler |
||
| 60 | */ |
||
| 61 | 2 | $dic['Monolog.Handlers.BrowserConsoleHandler'] = function ($dic) { |
|
| 62 | 2 | $th = new BrowserConsoleHandler($this->loglevel); |
|
| 63 | 2 | return $th; |
|
| 64 | }; |
||
| 65 | 2 | } |
|
| 66 | } |
||
| 67 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.