Code Duplication    Length = 5-7 lines in 3 locations

htdocs/xoops_lib/Xoops/Core/Kernel/Handlers/XoopsBlockHandler.php 3 locations

@@ 314-320 (lines=7) @@
311
312
        $ret = array();
313
        $result = $qb->execute();
314
        while ($myrow = $result->fetch(\PDO::FETCH_ASSOC)) {
315
            if ($asobject) {
316
                $ret[] = new XoopsBlock($myrow);
317
            } else {
318
                $ret[] = $myrow['bid'];
319
            }
320
        }
321
        return $ret;
322
    }
323
@@ 403-407 (lines=5) @@
400
        }
401
        $qb->orderBy($orderby);
402
        $result = $qb->execute();
403
        while ($myrow = $result->fetch(\PDO::FETCH_ASSOC)) {
404
            $block = new XoopsBlock($myrow);
405
            $ret[$myrow['bid']] = $block;
406
            unset($block);
407
        }
408
        return $ret;
409
    }
410
@@ 487-491 (lines=5) @@
484
            $qb->andWhere($eb->in('b.bid', $non_grouped));
485
            $qb->orderBy($orderby);
486
            $result = $qb->execute();
487
            while ($myrow = $result->fetch(\PDO::FETCH_ASSOC)) {
488
                $block = new XoopsBlock($myrow);
489
                $ret[$myrow['bid']] = $block;
490
                unset($block);
491
            }
492
        }
493
        return $ret;
494
    }