Try format php type

@param DocBlock\Tag\VarTag $varTag
@param string              $varType

@return string
189134
protected function tryFormatPhpType(DocBlock\Tag\VarTag $varTag, $varType)
    {
        if (isset($this->phpTypeAliases[$varType])) {
            return $this->phpTypeAliases[$varType];
        }

        return $varType;
    }
519680
static private function style($var, $html = true)
    {
        $style='';
        if (is_string($var)){
            $style.='color:#008100;';
            $var = '\''.($html ? htmlspecialchars($var, ENT_COMPAT, 'UTF-8') : $var).'\'';
        }else
        if (is_numeric($var)||is_nan($var)){
            $style.='color:#FF0000;';
        }else
        if (is_bool($var)||is_null($var)){
            $style.='color:#252FFF;';
            if (is_bool($var)) $var = $var ? 'true' : 'false';
            if (is_null($var)) $var = 'null';
        }else{
            return $var;
        }
        return $html ? '<span style="'.$style.'">'.$var.'</span>' : $var;
    }
843214
protected function openStyle(string $tag): string
	{
		$this->openTags[] = $tagName = $this->getTagName($tag);

		return $this->getSgrStyleSequence($tagName);
	}
1098212
public function format(Tag $tag): string
    {
        return '@' . $tag->getName() . str_repeat(' ', $this->maxLen - strlen($tag->getName()) + 1) . (string) $tag;
    }
158393
public function getTypes(DocType $varType): array
    {
        $types = [];
        $nullable = false;

        if ($varType instanceof Nullable) {
            $nullable = true;
            $varType = $varType->getActualType();
        }

        if (!$varType instanceof Compound) {
            if ($varType instanceof Null_) {
                $nullable = true;
            }

            $type = $this->createType($varType, $nullable);
            if (null !== $type) {
                $types[] = $type;
            }

            return $types;
        }

        $varTypes = [];
        for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) {
            $type = $varType->get($typeIndex);

            // If null is present, all types are nullable
            if ($type instanceof Null_) {
                $nullable = true;
                continue;
            }

            $varTypes[] = $type;
        }

        foreach ($varTypes as $varType) {
            $type = $this->createType($varType, $nullable);
            if (null !== $type) {
                $types[] = $type;
            }
        }

        return $types;
    }
1327495
public function render($returnType = 'html')
	{
		$this->_remove();
		$this->_minLength();
		if (empty($this->orderBy)) {
			$this->_shuffle();
		} else {
			$orderDirection = strtolower($this->orderBy['direction']) == 'desc' ? 'SORT_DESC' : 'SORT_ASC';
			$this->_tagsArray = $this->_order(
				$this->_tagsArray,
				$this->orderBy['field'],
				$orderDirection
			);
		}
		$this->_limit();
		$max = $this->_getMax();
		if (count($this->_tagsArray)) {
			$return = ($returnType == 'html' ? '' : ($returnType == 'array' ? array() : ''));
			foreach ($this->_tagsArray as $tag => $arrayInfo) {
				$sizeRange = $this->_getClassFromPercent(($arrayInfo['size'] / $max) * 100);
				$arrayInfo['range'] = $sizeRange;
				if ($returnType == 'array') {
					$return [$tag] = $arrayInfo;
				} elseif ($returnType == 'html') {
					$return .= $this->htmlizeTag( $arrayInfo, $sizeRange );
				}
			}
			return $return;
		}
		return null;
	}
376233
protected function getHtmlType($type)
    {
        $map = Config::getEloquentToHtmlMap();

        if (array_key_exists($type, $map)) {
            return $map[$type];
        }

        return 'text';
    }
30294
private function _generateExceptionMessage(int $tag): string
    {
        return sprintf("%s expected, got %s.", Element::tagToName($tag),
            $this->_typeDescriptorString());
    }
459981
function it_should_parse_flashes_tag_with_no_specified_types(
        $parser, $exprParser, $stream, $body, $nodeFactory, $node, $token, $catalog
    )
    {
        $stream->test(\Twig_Token::NAME_TYPE, 'using')->willReturn(true, true);
        $stream->expect(\Twig_Token::NAME_TYPE, 'using')->will(function() {});
        $stream->expect(\Twig_Token::NAME_TYPE, 'catalog')->will(function() {});
        $stream->expect(\Twig_Token::BLOCK_END_TYPE)->will(function() {});

        $exprParser->parseExpression()->willReturn($catalog);

        $parser->subparse(array($this, 'isEndTag'), true)->willReturn($body);

        $nodeFactory->createFlashesNode(null, $catalog, $body, 123)->willReturn($node);

        $this->parse($token)->shouldReturn($node);
    }
566743
public static function varInfo($var, $type = NULL) {
    if ($var === NULL) return 'NULL';
    
    $type = self::getType($var);
    
    if ($type == 'string') {
      return sprintf(
        'string(%d) "%s"',
        mb_strlen($var),
        (string) $var
      );
    } elseif ($type == 'array') {
      return sprintf('array(%s)', 
        A::implode($var, ', ',function ($item) {
          return Util::varInfo($item);
        })
      );
    } elseif ($var instanceof Info) {
      return $var->getVarInfo();
    } elseif ($var instanceof \stdClass) {
      return '(object) '.json_encode($var);
    } elseif (is_object($var)) {
      return sprintf('%s(%s)', method_exists($var, '__toString') ? $var->__toString() : 'not converted to string', self::typeInfo($var));
    } elseif (is_bool($var)) {
      return sprintf('boolean(%s)',$var ? 'true' : 'false');
    } else {
      return sprintf('%s(%s)', self::typeInfo($var), (string) $var);
    }
  }
388357
private function getTypeFromTags($tags)
    {
        $tag_types = array('stylesheet', 'script');

        foreach ($tag_types as $tag) {
            if (in_array($tag, $tags)) {
                return $tag;
            }
        }

        return false;
    }
1148398
private function getFormat(Type $type): string
    {
        return $type->hasParam(0) ? $type->getParam(0) : $this->defaultFormat;
    }
1336301
function tagForMIMEType( $mimeData )
    {
        $name = $mimeData['name'];
        if ( isset( $this->MIMETagMap[$name] ) )
            return $this->MIMETagMap[$name];
        $position = strpos( $name, '/' );
        if ( $position !== false )
            return substr( $name, $position + 1 );
        else
            return false;
    }
584333
public static function varToText($var) {
				
		$type = gettype($var);
		$text = is_null($type) ? 'NULL' : $type . ':';
		
		switch ($type) {

			case 'boolean':
				$text .= $var ? 'TRUE' : 'FALSE';
				break;

			default:
				$text .= $var;
				break;
				
			case 'array':
				$parts = array();
				foreach ($var as $k=>$v) {
					$parts[] = $k . '=>' . self::varToText($v);
				}
				$text .= 'array:[' . implode(',', $parts) . ']';
				break;
				
			case 'object':
				$text .= get_class($var);
				break;
				
			case 'NULL':
				break;

		}
					
		return $text;
		
	}
647006
public static function formatDate($varValue, $varFormat) {
        if (is_array($varValue)) {
            $temp = $varValue;
        } else {
            if (strtolower($varValue) == 'get' or strtolower($varValue) == 'post') {
                eval('$temp = &$_' . strtoupper($varValue) . ';');
            } else {
                $temp = array($varValue);
            }
        }
        foreach ($temp as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $key2 => $value2) {
                    $datetime = null;
                    $date = null;
                    if (preg_match('/^([0-9]{4})[-,\/]([0-9]{1,2})[-,\/]([0-9]{1,2})/', $value2)) {
                        $datetime = explode(' ', $value2);
                        if (is_array($datetime) and count($datetime) > 1) {
                            $temp[$key][$key2] = date($varFormat, strtotime($datetime[0])) . ' ' . $datetime[1];
                        } else {
                            $temp[$key][$key2] = date($varFormat, strtotime($datetime[0]));
                        }
                    } elseif (preg_match('/^([0-9]{1,2})[-,\/]([0-9]{1,2})[-,\/]([0-9]{4})/', $value2, $date)) {
                        $datetime = explode(' ', $value2);
                        if (is_array($datetime) and count($datetime) > 1) {
                            $temp[$key][$key2] = date($varFormat, strtotime($date[3] . '-' . $date[2] . '-' . $date[1])) . ' ' . $datetime[1];
                        } else {
                            $temp[$key][$key2] = date($varFormat, strtotime($date[3] . '-' . $date[2] . '-' . $date[1]));
                        }
                    }
                }
            } else {
                $datetime = null;
                $date = null;
                if (preg_match('/^([0-9]{4})[-,\/]([0-9]{1,2})[-,\/]([0-9]{1,2})/', $value)) {
                    $datetime = explode(' ', $value);
                    if (is_array($datetime) and count($datetime) > 1) {
                        $temp[$key] = date($varFormat, strtotime($datetime[0])) . ' ' . $datetime[1];
                    } else {
                        $temp[$key] = date($varFormat, strtotime($datetime[0]));
                    }
                } elseif (preg_match('/^([0-9]{1,2})[-,\/]([0-9]{1,2})[-,\/]([0-9]{4})/', $value, $date)) {
                    $datetime = explode(' ', $value);


                    if (is_array($datetime) and count($datetime) > 1) {
                        $temp[$key] = date($varFormat, strtotime($date[3] . '-' . $date[2] . '-' . $date[1])) . ' ' . $datetime[1];
                    } else {
                        $temp[$key] = date($varFormat, strtotime($date[3] . '-' . $date[2] . '-' . $date[1]));
                    }
                }
            }
        }
        return $temp;
    }
1224656
private function tag_has_type(string $tag){
    return in_array('type', array_values(
      \is_array($this->tags[$tag]) ?
        $this->tags[$tag] :
        $this->tags[$this->tags[$tag]]
    ));
  }
129641
public static function getExtByMimeType(string $type): string
    {
        $value = array_search(strtolower($type), self::getMimeTypes(), true);

        return $value ?: '';
    }