Completed
Push — master ( 30f5dc...922897 )
by Ryota
04:06
created

DefaultController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 12 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: polidog
5
 * Date: 2016/03/14
6
 */
7
8
namespace Tavii\SQSJobQueueBundle\Controller;
9
10
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
11
use Tavii\SQSJobQueueBundle\Storage\DoctrineStorage;
12
13
class DefaultController extends Controller
14
{
15
    public function indexAction()
16
    {
17
        /** @var DoctrineStorage $storage */
18
        $storage = $this->get('sqs_job_queue.storage.doctrine');
19
20
        /** @var array $workers */
21
        $workers = $storage->all();
22
23
        return $this->render('TaviiSQSJobQueueBundle:Default:index.html.twig', [
24
            'workers' => $workers
25
        ]);
26
    }
27
}