src/mako/cli/output/formatter/Formatter.php
protected function getStyleCodes(string $tag): array
	{
		if(isset($this->styles[$tag]))
		{
			return [$this->styles[$tag]];
		}
		elseif(isset($this->userStyles[$tag]))
		{
			$codes = [];

			foreach($this->userStyles[$tag] as $tag)
			{
				$codes = array_merge($codes, $this->getStyleCodes($tag));
			}

			return $codes;
		}

		throw new FormatterException(vsprintf('Undefined formatting tag [ %s ] detected.', [$tag]));
	}
protected function getStyleCodes(string $tag): array
	{
		if(isset($this->styles[$tag]))
		{
			return [$this->styles[$tag]];
		}
		elseif(isset($this->userStyles[$tag]))
		{
			$codes = [];

			foreach($this->userStyles[$tag] as $tag)
			{
				$codes = array_merge($codes, $this->getStyleCodes($tag));
			}

			return $codes;
		}

		throw new FormatterException(vsprintf('Undefined formatting tag [ %s ] detected.', [$tag]));
	}
protected function getStyleCodes ( string $ tag ) : array { if ( isset ( $ this -> styles [ $ tag ] ) ) { return [ $ this -> styles [ $ tag ] ] ; } elseif ( isset ( $ this -> userStyles [ $ tag ] ) ) { $ codes = [ ] ; foreach ( $ this -> userStyles [ $ tag ] as $ tag ) { $ codes = array_merge ( $ codes , $ this -> getStyleCodes ( $ tag ) ) ; } return $ codes ; } throw new FormatterException ( vsprintf ( 'Undefined formatting tag [ %s ] detected.' , [ $ tag ] ) ) ; }
Returns style codes associated with the tag name.

@param  string                                        $tag Tag name
@throws \mako\cli\output\formatter\FormatterException
@return array
Returns style codes associated with the tag name .