DefaultController::indexAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace JmLeroux\AppBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
use Symfony\Component\HttpFoundation\JsonResponse;
7
8
class DefaultController extends Controller
9
{
10
    public function indexAction()
11
    {
12
        $version = $this->get('jmleroux.micro_rest.version');
13
        $response = new JsonResponse([
14
            'version' => $version->getVersion(),
15
        ]);
16
17
        return $response;
18
    }
19
}
20