Code Duplication    Length = 6-6 lines in 2 locations

src/Kunstmaan/NodeBundle/EventListener/NodeTranslationListener.php 2 locations

@@ 142-147 (lines=6) @@
139
140
                    $entity = $this->updateUrl($entity, $em);
141
142
                    if ($entity !== false) {
143
                        $em->persist($entity);
144
                        $em->getUnitOfWork()->recomputeSingleEntityChangeSet($class, $entity);
145
146
                        $this->updateNodeChildren($entity, $em, $class);
147
                    }
148
                }
149
            }
150
        } catch (MappingException $e) {
@@ 172-177 (lines=6) @@
169
                if ($translation) {
170
                    $translation = $this->updateUrl($translation, $em);
171
172
                    if ($translation !== false) {
173
                        $em->persist($translation);
174
                        $em->getUnitOfWork()->recomputeSingleEntityChangeSet($class, $translation);
175
176
                        $this->updateNodeChildren($translation, $em, $class);
177
                    }
178
                }
179
            }
180
        }