Code Duplication    Length = 12-17 lines in 3 locations

src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php 3 locations

@@ 314-325 (lines=12) @@
311
     *
312
     * @throws AccessDeniedException
313
     */
314
    public function publishAction(Request $request, $id)
315
    {
316
        $this->init($request);
317
        /* @var Node $node */
318
        $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id);
319
320
        $nodeTranslation = $node->getNodeTranslation($this->locale, true);
321
        $request = $this->get('request_stack')->getCurrentRequest();
322
        $this->nodePublisher->chooseHowToPublish($request, $nodeTranslation, $this->translator);
323
324
        return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $node->getId())));
325
    }
326
327
    /**
328
     * @Route(
@@ 342-353 (lines=12) @@
339
     *
340
     * @throws AccessDeniedException
341
     */
342
    public function unPublishAction(Request $request, $id)
343
    {
344
        $this->init($request);
345
        /* @var Node $node */
346
        $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id);
347
348
        $nodeTranslation = $node->getNodeTranslation($this->locale, true);
349
        $request = $this->get('request_stack')->getCurrentRequest();
350
        $this->nodePublisher->chooseHowToUnpublish($request, $nodeTranslation, $this->translator);
351
352
        return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $node->getId())));
353
    }
354
355
    /**
356
     * @Route(
@@ 370-386 (lines=17) @@
367
     *
368
     * @throws AccessDeniedException
369
     */
370
    public function unSchedulePublishAction(Request $request, $id)
371
    {
372
        $this->init($request);
373
374
        /* @var Node $node */
375
        $node = $this->em->getRepository('KunstmaanNodeBundle:Node')->find($id);
376
377
        $nodeTranslation = $node->getNodeTranslation($this->locale, true);
378
        $this->nodePublisher->unSchedulePublish($nodeTranslation);
379
380
        $this->addFlash(
381
            FlashTypes::SUCCESS,
382
            $this->get('translator')->trans('kuma_node.admin.unschedule.flash.success')
383
        );
384
385
        return $this->redirect($this->generateUrl('KunstmaanNodeBundle_nodes_edit', array('id' => $id)));
386
    }
387
388
    /**
389
     * @Route(