PHP reflection has it's own rules, so 'int' type will be displayed as 'integer', etc...

@see https://3v4l.org/nZFiT

@param ReflectionType $type Type to display

@return string
439331
public static function convertToDisplayType(\ReflectionType $type)
    {
        static $typeMap = [
            'int'  => 'integer',
            'bool' => 'boolean'
        ];
        $displayType = (string)$type;
        if (isset($typeMap[$displayType])) {
            $displayType = $typeMap[$displayType];
        }

        $displayType = ltrim($displayType, '\\');

        if ($type->allowsNull()) {
            $displayType .= ' or NULL';
        }

        return $displayType;
    }
260648
public function getClassForType(string $type):?string
    {
        if (isset($this->typeMap[$type])) {
            return $this->typeMap[$type];
        }

        return null;
    }
473300
private function convertParameterType(int $type) : int
    {
        switch ($type) {
            case ParameterType::BINARY:
                return OCI_B_BIN;

            case ParameterType::LARGE_OBJECT:
                return OCI_B_BLOB;

            default:
                return SQLT_CHR;
        }
    }
970597
function GetPhpType()
	{
		$rt = $this->Type;
		switch ($this->Type)
		{
			case "smallint":
			case "bigint":
			case "tinyint":
			case "mediumint":
				$rt = "int";
				break;
			case "varchar":
			case "text":
			case "tinytext":
				$rt = "string";
				break;
			case "date":
			case "datetime":
				$rt = "date";
				break;
			case "decimal":
			case "float":
				$rt = "float";
				break;
			default;
				break;
		}

		return $rt;
	}
1257531
private static function getTyped($type)
    {
        if (!isset(static::$types[$type])) {
            static::$types[$type] = new self($type);
        }

        return static::$types[$type];
    }
160129
protected function getPropertyType($type)
    {
        $propertyType = ucfirst($type);
        if (isset(self::$_propertyTypes[$type])) {
            $propertyType = self::$_propertyTypes[$type];
        }

        return $propertyType;
    }
722297
protected static function __getType($param)
    {
        $type = is_object($param)
            ? get_class($param)
            : gettype($param);

        return $type === 'integer' ? 'int' : $type;
    }
618273
private function parseType($type)
    {
        $dataType = '';
        $length = 0;
        $data = '';
        $tmp = '';
        if (strpos($type, '(') !== false) {
            for ($i = 0; $i < strlen($type); $i++) {
                $str = $type{$i};
                if ($str == '(') {
                    $dataType = $tmp;
                    $tmp = '';
                    continue;
                }
                if ($str == ')') {
                    $data = $tmp;
                    $tmp = '';
                    continue;
                }
                $tmp .= $str;
            }
        } else {
            $dataType = $type;
        }

        switch ($dataType) {
            case 'set':
                $data = str_replace(['"', "'"], '', $data);
                $data = explode(',', $data);
                break;
            case 'decimal':
                $length = explode(',', $data);
                $data = '';
                break;
            default:
                $length = intval($data);
                $data = '';
                break;
        }

        return [$dataType, $length, $data];
    }
850729
public function getParamFormat(string $type): string
    {
        return ltrim(($this->containerPrefix.'.entity.'.$this->entityName.'.'.$type), '.');
    }
435529
protected function getValidatorType($type)
    {
        switch ($type) {
            case 'int':
                $type = 'Integer';
                break;
            case 'bool':
                $type = 'Boolean';
                break;
            case 'double':
                $type = 'Float';
                break;
            case 'numeric':
                $type = 'Number';
                break;
            case 'mixed':
                $type = 'Raw';
                break;
            default:
                $type = ucfirst($type);
        }
        return $type;
    }
106701
private function getPhpType(string $doctrineType): ?string
    {
        switch ($doctrineType) {
            case DBALType::SMALLINT:
            case DBALType::INTEGER:
                return Type::BUILTIN_TYPE_INT;

            case DBALType::FLOAT:
                return Type::BUILTIN_TYPE_FLOAT;

            case DBALType::BIGINT:
            case DBALType::STRING:
            case DBALType::TEXT:
            case DBALType::GUID:
            case DBALType::DECIMAL:
                return Type::BUILTIN_TYPE_STRING;

            case DBALType::BOOLEAN:
                return Type::BUILTIN_TYPE_BOOL;

            case DBALType::BLOB:
            case 'binary':
                return Type::BUILTIN_TYPE_RESOURCE;

            case DBALType::OBJECT:
                return Type::BUILTIN_TYPE_OBJECT;
        }

        return null;
    }
927342
public function getClassName(string $type): string
    {
        assert(isset($this->classes[$type]));
        return $this->classes[$type];
    }
970951
protected function getClassNameForType($type)
    {
        if (!empty($this->rootNamespace) && strstr($type, $this->rootNamespace)) {
            $type = $this->stripNamespace($this->rootNamespace, $type);
        }
        if (!empty($this->rootNamespace)) {
            return sprintf('%s\\%s', $this->rootNamespace, $type);
        }
        return $type;
    }
727262
public static function parseDocTypeObject($type)
    {
        if ($type instanceof \phpDocumentor\Reflection\Types\Object_) {
            $tmpObject = (string) $type->getFqsen();
            if ($tmpObject) {
                return $tmpObject;
            }

            return 'object';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Compound) {
            $types = [];
            foreach ($type as $subType) {
                $types[] = self::parseDocTypeObject($subType);
            }

            return $types;
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Array_) {
            $valueTypeTmp = $type->getValueType() . '';
            if ($valueTypeTmp !== 'mixed') {
                return $valueTypeTmp . '[]';
            }

            return 'array';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Null_) {
            return 'null';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Mixed_) {
            return 'mixed';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Scalar) {
            return 'string|int|float|bool';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Boolean) {
            return 'bool';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Callable_) {
            return 'callable';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Float_) {
            return 'float';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\String_) {
            return 'string';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Integer) {
            return 'int';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Void_) {
            return 'void';
        }

        if ($type instanceof \phpDocumentor\Reflection\Types\Resource_) {
            return 'resource';
        }

        return $type . '';
    }
250460
private function getTypeSuffix($type)
    {
        self::$TYP_MAPPING = array_merge(self::$TYP_COMPLEX_MAPPING, self::$TYP_SIMPLE_MAPPING);

        if ($type == '') {
            return '';
        }

        if (!isset(self::$TYP_MAPPING[$this->type])) {
            return '';
        }

        return self::$TYP_MAPPING[$this->type];
    }
562704
private function formatType(
        \ReflectionType $type,
        \ReflectionMethod $method,
        \ReflectionParameter $parameter = null
    ) {
        $name      = (string) $type;
        $nameLower = strtolower($name);

        if ('self' === $nameLower) {
            $name = $method->getDeclaringClass()->getName();
        }

        if ('parent' === $nameLower) {
            $name = $method->getDeclaringClass()->getParentClass()->getName();
        }

        if ( ! $type->isBuiltin() && ! class_exists($name) && ! interface_exists($name)) {
            if (null !== $parameter) {
                throw UnexpectedValueException::invalidParameterTypeHint(
                    $method->getDeclaringClass()->getName(),
                    $method->getName(),
                    $parameter->getName()
                );
            }

            throw UnexpectedValueException::invalidReturnTypeHint(
                $method->getDeclaringClass()->getName(),
                $method->getName()
            );
        }

        if ( ! $type->isBuiltin()) {
            $name = '\\' . $name;
        }

        if ($type->allowsNull()
            && (null === $parameter || ! $parameter->isDefaultValueAvailable() || null !== $parameter->getDefaultValue())
        ) {
            $name = '?' . $name;
        }

        return $name;
    }
1134597
public function getName($type)
    {
        $ref = new \ReflectionClass($this);
        foreach ($ref->getConstants() as $name => $value) {
            if ($value === $type) {
                return $name;
            }
        }

        throw new \InvalidArgumentException(sprintf('There is no token with value %s.', json_encode($type)));
    }