public function create(string $transportType, array $transportOptions = [], array $transportArguments = null): \Swift_Transport
    {
        if (!class_exists($transportType)) {
            throw new Exception(sprintf('The specified transport backend "%s" does not exist.', $transportType), 1269351207);
        }

        if (is_array($transportArguments)) {
            $class = new \ReflectionClass($transportType);
            $transport = $class->newInstanceArgs($transportArguments);
        } else {
            $transport = new $transportType();
        }

        if ($transport instanceof \Swift_Transport) {
            foreach ($transportOptions as $optionName => $optionValue) {
                if (ObjectAccess::isPropertySettable($transport, $optionName)) {
                    ObjectAccess::setProperty($transport, $optionName, $optionValue);
                }
            }

            return $transport;
        }

        throw new Exception(sprintf('The specified transport backend "%s" does not implement %s.', $transportType, \Swift_Transport::class), 1544727431);
    }