protected function flattenComposedTypes(array $types)
    {
        $composedTypes = [];
        foreach ($types as $type) {
            if ($type instanceof ICompositeType) {
                $composedTypes += $this->flattenComposedTypes($type->getComposedTypes());
            } else {
                $composedTypes[$type->getIdentifier()] = $type;
            }
        }

        return $composedTypes;
    }
protected function flattenComposedTypes(array $types)
    {
        $composedTypes = [];
        foreach ($types as $type) {
            if ($type instanceof ICompositeType) {
                $composedTypes += $this->flattenComposedTypes($type->getComposedTypes());
            } else {
                $composedTypes[$type->getIdentifier()] = $type;
            }
        }

        return $composedTypes;
    }
protected function flattenComposedTypes ( array $ types ) { $ composedTypes = [ ] ; foreach ( $ types as $ type ) { if ( $ type instanceof ICompositeType ) { $ composedTypes += $ this -> flattenComposedTypes ( $ type -> getComposedTypes ( ) ) ; } else { $ composedTypes [ $ type -> getIdentifier ( ) ] = $ type ; } } return $ composedTypes ; }
Flattens all the composed types.

@param IType[] $types

@return IType[]
Flattens all the composed types .