HomeController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 14
c 1
b 0
f 0
dl 0
loc 27
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A home() 0 7 1
A __setupNavigation() 0 10 1
A __callNumber() 0 3 1
1
<?php
2
3
namespace App\Controller\Panel;
4
5
use App\Entity\Forum;
6
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
7
8
class HomeController extends AbstractController
9
{
10
    public static function __setupNavigation()
11
    {
12
        return [
13
            'type' => 'link',
14
            'parent' => 'root',
15
            'id' => 'home',
16
            'title' => 'Dashboard',
17
            'href' => 'home',
18
            'icon' => 'hs-admin-panel',
19
            'view' => 'HomeController::home',
20
        ];
21
    }
22
23
    public static function __callNumber()
24
    {
25
        return 1;
26
    }
27
28
    public function home($navigation, Forum $forum)
29
    {
30
        return $this->render(
31
            'theme_admin1/home.html.twig',
32
            [
33
                'navigation_links' => $navigation,
34
                'current_forum' => $forum,
35
            ]
36
        );
37
    }
38
}
39