src/mako/cli/output/helpers/OrderedList.php
protected function calculateWidth(array $items, string $marker): array
	{
		$count = 0;

		foreach($items as $item)
		{
			if(!is_array($item))
			{
				$count++;
			}
		}

		$number = strlen($count);

		$marker = strlen(sprintf($this->formatter === null ? $marker : $this->formatter->stripTags($marker), '')) + $number;

		return ['number' => $number, 'marker' => $marker];
	}
protected function calculateWidth(array $items, string $marker): array
	{
		$count = 0;

		foreach($items as $item)
		{
			if(!is_array($item))
			{
				$count++;
			}
		}

		$number = strlen($count);

		$marker = strlen(sprintf($this->formatter === null ? $marker : $this->formatter->stripTags($marker), '')) + $number;

		return ['number' => $number, 'marker' => $marker];
	}
protected function calculateWidth ( array $ items , string $ marker ) : array { $ count = 0 ; foreach ( $ items as $ item ) { if ( ! is_array ( $ item ) ) { $ count ++ ; } } $ number = strlen ( $ count ) ; $ marker = strlen ( sprintf ( $ this -> formatter === null ? $ marker : $ this -> formatter -> stripTags ( $ marker ) , '' ) ) + $ number ; return [ 'number' => $ number , 'marker' => $ marker ] ; }
Calculates the maximum width of a marker in a list.

@param  array  $items  Items
@param  string $marker Item marker
@return array
Calculates the maximum width of a marker in a list .