Code Duplication    Length = 14-15 lines in 2 locations

Components/ProductStream/ProductStreamRepository.php 1 location

@@ 383-396 (lines=14) @@
380
    /**
381
     * @return array
382
     */
383
    public function fetchConnectStreamIds()
384
    {
385
        $builder = $this->manager->getConnection()->createQueryBuilder();
386
387
        $results = $builder->select('sa.streamID')
388
            ->from('s_product_streams_attributes', 'sa')
389
            ->where('sa.connect_is_remote = 1')
390
            ->execute()
391
            ->fetchAll();
392
393
        return array_map(function ($item) {
394
            return $item['streamID'];
395
        }, $results);
396
    }
397
398
    /**
399
     * @param int|array $streamId

Components/Helper.php 1 location

@@ 175-189 (lines=15) @@
172
     * @param array $orderNumbers
173
     * @return array
174
     */
175
    public function getArticleIdsByNumber(array $orderNumbers)
176
    {
177
        $builder = $this->manager->getConnection()->createQueryBuilder();
178
179
        $rows = $builder->select('d.articleID as articleId')
180
            ->from('s_articles_details', 'd')
181
            ->where('d.ordernumber IN (:orderNumbers)')
182
            ->setParameter('orderNumbers', $orderNumbers, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY)
183
            ->execute()
184
            ->fetchAll();
185
186
        return array_map(function ($row) {
187
            return $row['articleId'];
188
        }, $rows);
189
    }
190
191
    /**
192
     * Returns article detail model by