The ternary operator is not needed. ``return $item->getName() == 'hl';`` would already return a boolean