Code Duplication    Length = 13-13 lines in 2 locations

src/Kunstmaan/NodeBundle/Helper/NodeHelper.php 1 location

@@ 51-63 (lines=13) @@
48
     * @param CloneHelper              $cloneHelper
49
     * @param EventDispatcherInterface $eventDispatcher
50
     */
51
    public function __construct(
52
        EntityManagerInterface $em,
53
        NodeAdminPublisher $nodeAdminPublisher,
54
        TokenStorageInterface $tokenStorage,
55
        CloneHelper $cloneHelper,
56
        EventDispatcherInterface $eventDispatcher
57
    ) {
58
        $this->em = $em;
59
        $this->nodeAdminPublisher = $nodeAdminPublisher;
60
        $this->tokenStorage = $tokenStorage;
61
        $this->cloneHelper = $cloneHelper;
62
        $this->eventDispatcher = $eventDispatcher;
63
    }
64
65
    /**
66
     * @param HasNodeInterface $page            The page

src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeAdminPublisher.php 1 location

@@ 59-71 (lines=13) @@
56
     * @param EventDispatcherInterface      $eventDispatcher      The Event dispatcher
57
     * @param CloneHelper                   $cloneHelper          The clone helper
58
     */
59
    public function __construct(
60
        EntityManager $em,
61
        TokenStorageInterface $tokenStorage,
62
        AuthorizationCheckerInterface $authorizationChecker,
63
        EventDispatcherInterface $eventDispatcher,
64
        CloneHelper $cloneHelper
65
    ) {
66
        $this->em = $em;
67
        $this->tokenStorage = $tokenStorage;
68
        $this->authorizationChecker = $authorizationChecker;
69
        $this->eventDispatcher = $eventDispatcher;
70
        $this->cloneHelper = $cloneHelper;
71
    }
72
73
    /**
74
     * If there is a draft version it'll try to publish the draft first. Makse snese because if you want to publish the public version you don't publish but you save.