Nav   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isItemActive() 0 8 3
1
<?php
2
/**
3
 * @link http://www.writesdown.com/
4
 * @author Agiel K. Saputra <[email protected]>
5
 * @copyright Copyright (c) 2015 WritesDown
6
 * @license http://www.writesdown.com/license/
7
 */
8
9
namespace themes\writesdown\classes\widgets;
10
11
use Yii;
12
13
/**
14
 * Class Nav
15
 *
16
 * @author Agiel K. Saputra <[email protected]>
17
 * @since 0.1.0
18
 */
19
class Nav extends \yii\bootstrap\Nav
20
{
21
    /**
22
     * @inheritdoc
23
     */
24
    protected function isItemActive($item)
25
    {
26
        if (isset($item['url']) && $item['url'] === Yii::$app->request->absoluteUrl) {
27
            return true;
28
        }
29
30
        return false;
31
    }
32
}
33