Code Duplication    Length = 12-13 lines in 3 locations

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

@@ 69-81 (lines=13) @@
66
     *
67
     * @return array
68
     */
69
    public function getAvailableChannelTypesChoiceList()
70
    {
71
        /** @var ArrayCollection $types */
72
        $types  = $this->getAvailableIntegrationTypes();
73
        $keys   = $types->getKeys();
74
        $values = $types->map(
75
            function (IntegrationInterface $type) {
76
                return $type->getLabel();
77
            }
78
        )->toArray();
79
80
        return array_combine($keys, $values);
81
    }
82
83
    /**
84
     * Collect available types for choice field with icon
@@ 184-195 (lines=12) @@
181
     *
182
     * @return array
183
     */
184
    public function getAvailableTransportTypesChoiceList($integrationType)
185
    {
186
        $types  = $this->getRegisteredTransportTypes($integrationType);
187
        $keys   = $types->getKeys();
188
        $values = $types->map(
189
            function (TransportInterface $type) {
190
                return $type->getLabel();
191
            }
192
        )->toArray();
193
194
        return array_combine($keys, $values);
195
    }
196
197
    /**
198
     * @param Transport $transportEntity
@@ 310-321 (lines=12) @@
307
     *
308
     * @return array
309
     */
310
    public function getAvailableConnectorsTypesChoiceList($integrationType, $filterClosure = null)
311
    {
312
        $types  = $this->getRegisteredConnectorsTypes($integrationType, $filterClosure);
313
        $keys   = $types->getKeys();
314
        $values = $types->map(
315
            function (ConnectorInterface $type) {
316
                return $type->getLabel();
317
            }
318
        )->toArray();
319
320
        return array_combine($keys, $values);
321
    }
322
323
    /**
324
     * Checks if there is at least one connector that supports force sync.