DefaultController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 2
c 4
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubUrlsAction() 0 7 1
A pubAction() 0 4 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