Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function upcomingRssAction() |
||
|
|||
17 | { |
||
18 | $viewParams = []; //$this->defaultViewParams(); |
||
19 | $includePrivate = false; //$this->app['security']->isGranted(self::MANAGER_REQUIRED_ROLE); |
||
20 | $viewParams['tickets'] = $this->getDataStore()->fetchUpcomingTickets($includePrivate); |
||
21 | $data = $this->render('default/upcoming.rss.twig', $viewParams); |
||
22 | $headers = empty($_GET['nt']) ? ['Content-type' => 'application/rss+xml'] : ['Content-type' => 'text/plain']; |
||
23 | |||
24 | return new Response($data, 200, $headers); |
||
25 | } |
||
26 | } |
||
27 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: