DefaultController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A indexAction() 0 9 1
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