Code Duplication    Length = 4-4 lines in 2 locations

src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php 1 location

@@ 117-120 (lines=4) @@
114
        // Fetch all the pageparts (only one query per pagepart type)
115
        /** @var EntityInterface[] $pageParts */
116
        $pageParts = array();
117
        foreach ($types as $classname => $ids) {
118
            $result = $this->em->getRepository($classname)->findBy(array('id' => $ids));
119
            $pageParts = array_merge($pageParts, $result);
120
        }
121
122
        // Link the pagepartref to the pagepart
123
        foreach ($this->pagePartRefs as $pagePartRef) {

src/Kunstmaan/PagePartBundle/Repository/PagePartRefRepository.php 1 location

@@ 91-94 (lines=4) @@
88
89
        // Fetch all the pageparts (only one query per pagepart type)
90
        $pageparts = array();
91
        foreach ($types as $classname => $ids) {
92
            $result = $this->getEntityManager()->getRepository($classname)->findBy(array('id' => $ids));
93
            $pageparts = array_merge($pageparts, $result);
94
        }
95
96
        // Order the pageparts
97
        usort($pageparts, function (EntityInterface $a, EntityInterface $b) use ($order) {