| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | protected function getOutputContent(Collection $detectedQueries) |
||
| 40 | { |
||
| 41 | $output = '<script type="text/javascript">'; |
||
| 42 | $output .= "alert('Found the following N+1 queries in this request:\\n\\n"; |
||
| 43 | foreach ($detectedQueries as $detectedQuery) { |
||
| 44 | $output .= "Model: ".addslashes($detectedQuery['model'])." => Relation: ".addslashes($detectedQuery['relation']); |
||
| 45 | $output .= " - You should add \"with(\'".addslashes($detectedQuery['relation'])."\')\" to eager-load this relation."; |
||
| 46 | $output .= "\\n"; |
||
| 47 | } |
||
| 48 | $output .= "')"; |
||
| 49 | $output .= '</script>'; |
||
| 50 | |||
| 51 | return $output; |
||
| 52 | } |
||
| 54 |