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

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

        return $sections;
    }
protected static function clearEmptySections ( array $ sections ) : array { array_walk ( $ sections , function ( $ templates , $ index ) use ( & $ sections ) { if ( count ( $ templates ) == 0 ) { unset ( $ sections [ $ index ] ) ; } } ) ; return $ sections ; }
Check sections a remove the ones without anything in them.

@param array $sections Sections to check.

@return array
Check sections a remove the ones without anything in them .