protected function buildCoalescedStrings(array $prefixStrings, array $suffix)
	{
		$strings = $this->runPass($this->buildPrefix($prefixStrings));
		if (count($strings) === 1 && $strings[0][0][0] === [])
		{
			// If the prefix has been remerged into a list of strings which contains only one string
			// of which the first element is an optional alternations, we only need to append the
			// suffix
			$strings[0][] = $suffix;
		}
		else
		{
			// Put the current list of strings that form the prefix into a new list of strings, of
			// which the only string is composed of our optional prefix followed by the suffix
			array_unshift($strings, []);
			$strings = [[$strings, $suffix]];
		}

		return $strings;
	}
protected function buildCoalescedStrings(array $prefixStrings, array $suffix)
	{
		$strings = $this->runPass($this->buildPrefix($prefixStrings));
		if (count($strings) === 1 && $strings[0][0][0] === [])
		{
			// If the prefix has been remerged into a list of strings which contains only one string
			// of which the first element is an optional alternations, we only need to append the
			// suffix
			$strings[0][] = $suffix;
		}
		else
		{
			// Put the current list of strings that form the prefix into a new list of strings, of
			// which the only string is composed of our optional prefix followed by the suffix
			array_unshift($strings, []);
			$strings = [[$strings, $suffix]];
		}

		return $strings;
	}
protected function buildCoalescedStrings ( array $ prefixStrings , array $ suffix ) { $ strings = $ this -> runPass ( $ this -> buildPrefix ( $ prefixStrings ) ) ; if ( count ( $ strings ) === 1 && $ strings [ 0 ] [ 0 ] [ 0 ] === [ ] ) { // If the prefix has been remerged into a list of strings which contains only one string // of which the first element is an optional alternations, we only need to append the // suffix $ strings [ 0 ] [ ] = $ suffix ; } else { // Put the current list of strings that form the prefix into a new list of strings, of // which the only string is composed of our optional prefix followed by the suffix array_unshift ( $ strings , [ ] ) ; $ strings = [ [ $ strings , $ suffix ] ] ; } return $ strings ; }
Build the final list of coalesced strings

@param  array[] $prefixStrings
@param  array   $suffix
@return array[]
Build the final list of coalesced strings