public function normalizeType(string $type): string
    {
        if (strpos($type, '|') !== false) {
            $types = array_map([$this, __FUNCTION__], explode('|', $type));
            return join('|', $types);
        }

        if (substr($type, -2) === '[]') {
            $subtype = substr($type, 0, -2);
            return $this->normalizeType($subtype) . '[]';
        }

        if (ctype_alpha($type) && !ctype_lower($type) && in_array(strtolower($type), array_keys($this->handlers))) {
            $type = strtolower($type);
        }

        return $this->aliases[$type] ?? $type;
    }
public function normalizeType(string $type): string
    {
        if (strpos($type, '|') !== false) {
            $types = array_map([$this, __FUNCTION__], explode('|', $type));
            return join('|', $types);
        }

        if (substr($type, -2) === '[]') {
            $subtype = substr($type, 0, -2);
            return $this->normalizeType($subtype) . '[]';
        }

        if (ctype_alpha($type) && !ctype_lower($type) && in_array(strtolower($type), array_keys($this->handlers))) {
            $type = strtolower($type);
        }

        return $this->aliases[$type] ?? $type;
    }
public function normalizeType ( string $ type ) : string { if ( strpos ( $ type , '|' ) !== false ) { $ types = array_map ( [ $ this , __FUNCTION__ ] , explode ( '|' , $ type ) ) ; return join ( '|' , $ types ) ; } if ( substr ( $ type , - 2 ) === '[]' ) { $ subtype = substr ( $ type , 0 , - 2 ) ; return $ this -> normalizeType ( $ subtype ) . '[]' ; } if ( ctype_alpha ( $ type ) && ! ctype_lower ( $ type ) && in_array ( strtolower ( $ type ) , array_keys ( $ this -> handlers ) ) ) { $ type = strtolower ( $ type ) ; } return $ this -> aliases [ $ type ] ?? $ type ; }
Lowercase internal types and replace alias type with full type.

@param string $type
@return string
Lowercase internal types and replace alias type with full type .