| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function output(Collection $detectedQueries, Response $response) |
||
| 17 | { |
||
| 18 | $this->log('Detected N+1 Query'); |
||
| 19 | |||
| 20 | foreach ($detectedQueries as $detectedQuery) { |
||
| 21 | $logOutput = 'Model: '.$detectedQuery['model'] . PHP_EOL; |
||
| 22 | |||
| 23 | $logOutput .= 'Relation: '.$detectedQuery['relation'] . PHP_EOL; |
||
| 24 | |||
| 25 | $logOutput .= 'Num-Called: '.$detectedQuery['count'] . PHP_EOL; |
||
| 26 | |||
| 27 | $logOutput .= 'Call-Stack:' . PHP_EOL; |
||
| 28 | |||
| 29 | foreach ($detectedQuery['sources'] as $source) { |
||
| 30 | $logOutput .= '#'.$source->index.' '.$source->name.':'.$source->line . PHP_EOL; |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->log($logOutput); |
||
| 34 | } |
||
| 42 |