Code Duplication    Length = 12-17 lines in 3 locations

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

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