src/mako/cli/output/helpers/OrderedList.php
protected function buildList(array $items, string $marker, int $nestingLevel = 0, int $parentWidth = 0): string
	{
		$width  = $this->calculateWidth($items, $marker);
		$number = 0;
		$list   = '';

		foreach($items as $item)
		{
			if(is_array($item))
			{
				$list .= $this->buildList($item, $marker, ($nestingLevel + 1), ($width['marker'] - 1 + $parentWidth));
			}
			else
			{
				$list .= $this->buildListItem($item, $marker, $width['number'], ++$number, $nestingLevel, $parentWidth);
			}
		}

		return $list;
	}
protected function buildList(array $items, string $marker, int $nestingLevel = 0, int $parentWidth = 0): string
	{
		$width  = $this->calculateWidth($items, $marker);
		$number = 0;
		$list   = '';

		foreach($items as $item)
		{
			if(is_array($item))
			{
				$list .= $this->buildList($item, $marker, ($nestingLevel + 1), ($width['marker'] - 1 + $parentWidth));
			}
			else
			{
				$list .= $this->buildListItem($item, $marker, $width['number'], ++$number, $nestingLevel, $parentWidth);
			}
		}

		return $list;
	}
protected function buildList ( array $ items , string $ marker , int $ nestingLevel = 0 , int $ parentWidth = 0 ) : string { $ width = $ this -> calculateWidth ( $ items , $ marker ) ; $ number = 0 ; $ list = '' ; foreach ( $ items as $ item ) { if ( is_array ( $ item ) ) { $ list .= $ this -> buildList ( $ item , $ marker , ( $ nestingLevel + 1 ) , ( $ width [ 'marker' ] - 1 + $ parentWidth ) ) ; } else { $ list .= $ this -> buildListItem ( $ item , $ marker , $ width [ 'number' ] , ++ $ number , $ nestingLevel , $ parentWidth ) ; } } return $ list ; }
Builds an ordered list.

@param  array  $items        Items
@param  string $marker       Item marker
@param  int    $nestingLevel Nesting level
@param  int    $parentWidth  Parent marker width
@return string
Builds an ordered list .