| Conditions | 4 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function run() |
||
| 25 | { |
||
| 26 | $debuggerEnabled = Config::get('debugger.queries.debug'); |
||
| 27 | |||
| 28 | if ($debuggerEnabled) { |
||
| 29 | |||
| 30 | $consoleOutputEnabled = Config::get('debugger.queries.output.console'); |
||
| 31 | $logOutputEnabled = Config::get('debugger.queries.output.log'); |
||
| 32 | |||
| 33 | DB::listen(function ($event) use ($consoleOutputEnabled, $logOutputEnabled) { |
||
| 34 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
||
| 35 | |||
| 36 | $result = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
||
| 37 | |||
| 38 | if ($consoleOutputEnabled) { |
||
| 39 | dump($result); |
||
| 40 | } |
||
| 41 | |||
| 42 | if ($logOutputEnabled) { |
||
| 43 | Log::info($result); |
||
| 44 | } |
||
| 45 | }); |
||
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 50 |
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.