src/HtmlHelper.php
protected function determineHeaderTags($topLevel, $depth)
    {
        $desired = range((int) $topLevel, (int) $topLevel + ((int) $depth - 1));
        $allowed = [1, 2, 3, 4, 5, 6];

        return array_map(function($val) { return 'h'.$val; }, array_intersect($desired, $allowed));
    }
protected function determineHeaderTags($topLevel, $depth)
    {
        $desired = range((int) $topLevel, (int) $topLevel + ((int) $depth - 1));
        $allowed = [1, 2, 3, 4, 5, 6];

        return array_map(function($val) { return 'h'.$val; }, array_intersect($desired, $allowed));
    }
protected function determineHeaderTags ( $ topLevel , $ depth ) { $ desired = range ( ( int ) $ topLevel , ( int ) $ topLevel + ( ( int ) $ depth - 1 ) ) ; $ allowed = [ 1 , 2 , 3 , 4 , 5 , 6 ] ; return array_map ( function ( $ val ) { return 'h' . $ val ; } , array_intersect ( $ desired , $ allowed ) ) ; }
Convert a topLevel and depth to H1..H6 tags array

@param int $topLevel
@param int $depth
@return array|string[]  Array of header tags; ex: ['h1', 'h2', 'h3']
Convert a topLevel and depth to H1 .. H6 tags array