DefaultController::pubAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Alawar\NginxPushStreamBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Symfony\Component\HttpFoundation\Request;
7
use Symfony\Component\HttpFoundation\Response;
8
9
class DefaultController extends Controller
10
{
11
    public function getSubUrlsAction($tokens)
12
    {
13
        $tokensArray = explode(',', $tokens);
14
        $subUrls = $this->get('nginx_push_stream.default_connection')->getSubUrls($tokensArray);
15
        return $this->render('NginxPushStreamBundle:Default:index.html.twig', array('subUrls' => $subUrls));
16
        //return new Response(json_encode($subUrls), 200, array('Content-type' => 'text/json'));
17
    }
18
19
    public function pubAction(Request $request)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
20
    {
21
        return new Response(json_encode('ok'));
22
    }
23
}
24