PostingController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A bbCode() 0 7 1
A __setupNavigation() 0 17 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 PostingController extends AbstractController
9
{
10
    public static function __setupNavigation()
11
    {
12
        return [
13
            [
14
                'type' => 'group',
15
                'parent' => 'root',
16
                'id' => 'posting',
17
                'title' => 'Posting',
18
                'icon' => 'hs-admin-comment',
19
            ],
20
            [
21
                'type' => 'link',
22
                'parent' => 'posting',
23
                'id' => 'bbcode',
24
                'title' => 'BBCode',
25
                'href' => 'posting-bbcode',
26
                'view' => 'PostingController::bbCode',
27
            ],
28
        ];
29
    }
30
31
    public static function __callNumber()
32
    {
33
        return 20;
34
    }
35
36
    public function bbCode($navigation, Forum $forum)
37
    {
38
        return $this->forward(
39
            'App\\Controller\\Panel\\DefaultController::notFound',
40
            [
41
                'navigation' => $navigation,
42
                'forum' => $forum,
43
            ]
44
        );
45
    }
46
}
47