Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 25 | public function isActive($item) |
|
17 | { |
||
18 | 25 | if (isset($item['active'])) { |
|
19 | 3 | return $this->isExplicitActive($item['active']); |
|
20 | } |
||
21 | |||
22 | 22 | if (isset($item['submenu'])) { |
|
23 | 8 | return $this->containsActive($item['submenu']); |
|
24 | } |
||
25 | |||
26 | 19 | if (isset($item['url'])) { |
|
27 | 17 | return $this->checkExact($item['url']) || $this->checkSub($item['url']); |
|
28 | } |
||
29 | |||
30 | 2 | return false; |
|
31 | } |
||
32 | |||
66 |