src/Messaging/Handler/TypeDescriptor.php
public function resolveGenericTypes() : array
    {
        if (!$this->isCollection()) {
            throw InvalidArgumentException::create("Can't resolve collection type on non collection");
        }

        preg_match(self::COLLECTION_TYPE_REGEX, $this->type, $match);

        return [TypeDescriptor::create(trim($match[1]))];
    }
public function resolveGenericTypes() : array
    {
        if (!$this->isCollection()) {
            throw InvalidArgumentException::create("Can't resolve collection type on non collection");
        }

        preg_match(self::COLLECTION_TYPE_REGEX, $this->type, $match);

        return [TypeDescriptor::create(trim($match[1]))];
    }
public function resolveGenericTypes ( ) : array { if ( ! $ this -> isCollection ( ) ) { throw InvalidArgumentException :: create ( "Can't resolve collection type on non collection" ) ; } preg_match ( self :: COLLECTION_TYPE_REGEX , $ this -> type , $ match ) ; return [ TypeDescriptor :: create ( trim ( $ match [ 1 ] ) ) ] ; }
Should be called only, if type descriptor is collection

@return TypeDescriptor[]
@throws InvalidArgumentException
@throws \SimplyCodedSoftware\Messaging\MessagingException
Should be called only if type descriptor is collection