Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function upcomingRssAction() |
||
|
|||
16 | { |
||
17 | $viewParams = []; //$this->defaultViewParams(); |
||
18 | $includePrivate = false; //$this->app['security']->isGranted(self::MANAGER_REQUIRED_ROLE); |
||
19 | $viewParams['tickets'] = $this->getDataStore()->fetchUpcomingTickets($includePrivate); |
||
20 | $data = $this->render('default/upcoming.rss.twig', $viewParams); |
||
21 | $headers = empty($_GET['nt']) ? ['Content-type' => 'application/rss+xml'] : ['Content-type' => 'text/plain']; |
||
22 | |||
23 | return new Response($data, 200, $headers); |
||
24 | } |
||
25 | } |
||
26 |
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: