protected static function clearEmptySections(array $sections): array
    {
        array_walk($sections, function ($templates, $index) use (&$sections) {
            if (count($templates) == 0) {
                unset($sections[$index]);
            }
        });

        return $sections;
    }