| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function cachegrind() |
||
| 22 | { |
||
| 23 | $request = $this->app->request(); |
||
| 24 | $id = $request->get('id'); |
||
| 25 | |||
| 26 | $profile = $this->searcher->get($id); |
||
| 27 | $output = $this->converter->convertToCachegrind($profile->toArray()['profile']); |
||
| 28 | |||
| 29 | $response = $this->app->response(); |
||
| 30 | $response['Content-Type'] = 'application/octet-stream'; |
||
| 31 | $response['Cache-Control'] = 'public, max-age=60, must-revalidate'; |
||
| 32 | $response['Content-Disposition'] = sprintf('attachment; filename=cachegrind-%s.out', $id); |
||
| 33 | $response->body($output); |
||
|
|
|||
| 34 | } |
||
| 35 | } |
||
| 36 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.