Code Duplication    Length = 7-7 lines in 2 locations

Components/CategoryExtractor.php 2 locations

@@ 283-289 (lines=7) @@
280
        $rows = $this->db->fetchCol($sql, [(string) $shopId]);
281
282
        $streams = [];
283
        foreach ($rows as $streamName) {
284
            $id = sprintf('%s_stream_%s', $shopId, $streamName);
285
            $streams[$id] = [
286
                'name' => $streamName,
287
                'iconCls' => 'sprite-product-streams',
288
            ];
289
        }
290
291
        $tree = $this->convertTree($streams, false);
292
        array_walk($tree, function (&$node) {
@@ 387-393 (lines=7) @@
384
        $rows = $this->db->fetchCol($sql, $params);
385
        $streams = [];
386
387
        foreach ($rows as $streamName) {
388
            $id = sprintf('%s_stream_%s', $shopId, $streamName);
389
            $streams[$id] = [
390
                'name' => $streamName,
391
                'iconCls' => 'sprite-product-streams',
392
            ];
393
        }
394
395
        $tree = $this->convertTree($streams, false, true);
396
        array_walk($tree, function (&$node) {