Completed
Push — master ( 3a0d0f...4c53b1 )
by Andrii
14:51
created

SidebarMenu   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 28
c 1
b 0
f 0
ccs 0
cts 21
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B items() 0 25 1
1
<?php
2
3
/*
4
 * HiPanel tickets module
5
 *
6
 * @link      https://github.com/hiqdev/hipanel-module-ticket
7
 * @package   hipanel-module-ticket
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\modules\ticket\menus;
13
14
use Yii;
15
16
class SidebarMenu extends \hiqdev\menumanager\Menu
17
{
18
    public function items()
19
    {
20
        return [
21
            'tickets' => [
22
                'label' => Yii::t('hipanel/ticket', 'Tickets'),
23
                'url' => ['/ticket/ticket/index'],
24
                'icon' => 'fa-ticket',
25
                'items' => [
26
                    'tickets' => [
27
                        'label' => Yii::t('hipanel/ticket', 'Tickets'),
28
                        'url' => ['/ticket/ticket/index'],
29
                    ],
30
                    'templates' => [
31
                        'label' => Yii::t('hipanel/ticket', 'Templates'),
32
                        'url' => ['/ticket/template/index'],
33
                        'visible' => Yii::$app->user->can('support'),
34
                    ],
35
//                  'statistics' => [
0 ignored issues
show
Unused Code Comprehensibility introduced by
56% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
36
//                      'label' => Yii::t('hipanel/ticket', 'Tickets statistics'),
37
//                      'url'   => ['/ticket/ticket/statistics'],
38
//                  ],
39
                ],
40
            ],
41
        ];
42
    }
43
}
44