Code Duplication    Length = 16-16 lines in 2 locations

src/Oro/Bundle/IntegrationBundle/Manager/TypesRegistry.php 2 locations

@@ 144-159 (lines=16) @@
141
     * @return TransportInterface
142
     * @throws \LogicException
143
     */
144
    public function getTransportType($integrationTypeName, $transportType)
145
    {
146
        if (!isset($this->transportTypes[$integrationTypeName])) {
147
            throw new LogicException(sprintf('Transports not found for integration "%s".', $integrationTypeName));
148
        } elseif (!$this->transportTypes[$integrationTypeName]->containsKey($transportType)) {
149
            throw new LogicException(
150
                sprintf(
151
                    'Transports type "%s"  not found for integration "%s".',
152
                    $transportType,
153
                    $integrationTypeName
154
                )
155
            );
156
        }
157
158
        return $this->transportTypes[$integrationTypeName]->get($transportType);
159
    }
160
161
    /**
162
     * Returns registered transports for integration by type
@@ 264-279 (lines=16) @@
261
     * @return ConnectorInterface
262
     * @throws LogicException
263
     */
264
    public function getConnectorType($integrationType, $type)
265
    {
266
        if (!isset($this->connectorTypes[$integrationType])) {
267
            throw new LogicException(sprintf('Connectors not found for integration "%s".', $integrationType));
268
        } elseif (!$this->connectorTypes[$integrationType]->containsKey($type)) {
269
            throw new LogicException(
270
                sprintf(
271
                    'Connector type "%s"  not found for integration "%s".',
272
                    $type,
273
                    $integrationType
274
                )
275
            );
276
        }
277
278
        return $this->connectorTypes[$integrationType]->get($type);
279
    }
280
281
    /**
282
     * Returns registered connectors for integration by type