StyleguideController::indexAction()   B
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 30
Code Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 8.8571
c 0
b 0
f 0
cc 2
eloc 25
nc 2
nop 1
1
<?php
2
3
namespace Victoire\Bundle\UIBundle\Controller;
4
5
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
6
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
7
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8
9
class StyleguideController extends Controller
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
10
{
11
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$component" missing
Loading history...
12
     * @Route("/styleguide", name="victoire_ui_styleguide")
13
     * @Route("/styleguide/{component}", name="victoire_ui_styleguide")
14
     * @Template()
15
     */
0 ignored issues
show
introduced by
Missing @return tag in function comment
Loading history...
16
    public function indexAction($component = null)
17
    {
18
        $components = [
19
            'color',
20
            'text',
21
            'heading',
22
            'layout',
23
            'button',
24
            'drops',
25
            'fab',
26
            'form',
27
            'slots',
28
            'widgets',
29
            'input-images',
30
            'list-group',
31
            'seo',
32
            'image',
33
            'menu',
34
            'mode-switcher',
35
            'navbar',
36
            'modal',
37
            'collapse',
38
            'alert',
39
        ];
40
41
        return [
42
            'components' => $component ? [$component] : $components,
43
            'focus'      => $component != null,
44
        ];
45
    }
46
}
47