StartController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 2
c 3
b 0
f 2
lcom 1
cbo 2
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 19 2
1
<?php
2
3
namespace Tahoe\Bundle\MultiTenancyBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Tahoe\Bundle\MultiTenancyBundle\Model\MultiTenantUserInterface;
7
8
class StartController extends Controller
9
{
10
    public function indexAction()
11
    {
12
        if (!$this->get('tahoe.multi_tenancy.tenant_resolver')->needStartScreen()) {
13
            return $this->redirect($this->generateUrl('dashboard_index'));
14
        }
15
        // if we need start screen, we display it
16
        $tenantUsers = $this->container->get('tahoe.multi_tenancy.tenant_user_repository')->findBy(
17
            array(
18
                'user' => $this->getUser()
19
            )
20
        );
21
22
        return $this->render(
23
            'TahoeMultiTenancyBundle:Start:index.html.twig',
24
            array(
25
                'tenantUsers' => $tenantUsers
26
            )
27
        );
28
    }
29
}
30