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

DefaultController::indexAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
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
}