| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class ActiveFilter implements FilterInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The active checker instance. |
||
| 12 | * |
||
| 13 | * @var ActiveChecker |
||
| 14 | */ |
||
| 15 | protected $activeChecker; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Constructor. |
||
| 19 | * |
||
| 20 | * @param ActiveChecker $activeChecker |
||
| 21 | */ |
||
| 22 | 61 | public function __construct(ActiveChecker $activeChecker) |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Transforms a menu item. Check if an item is active based on the current |
||
| 29 | * requested URL and compile it's active property. |
||
| 30 | * |
||
| 31 | * @param array $item A menu item |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | 54 | public function transform($item) |
|
| 43 |