Code Duplication    Length = 12-12 lines in 2 locations

eZ/Bundle/EzPublishCoreBundle/Command/CleanupVersionsCommand.php 1 location

@@ 79-90 (lines=12) @@
76
        parent::__construct();
77
    }
78
79
    protected function initialize(InputInterface $input, OutputInterface $output)
80
    {
81
        parent::initialize($input, $output);
82
83
        $this->userService = $this->repository->getUserService();
84
        $this->contentService = $this->repository->getContentService();
85
        $this->permissionResolver = $this->repository->getPermissionResolver();
86
87
        $this->permissionResolver->setCurrentUserReference(
88
            $this->userService->loadUserByLogin($input->getOption('user'))
89
        );
90
    }
91
92
    protected function configure()
93
    {

eZ/Bundle/EzPublishCoreBundle/Command/DeleteContentTranslationCommand.php 1 location

@@ 82-93 (lines=12) @@
79
            ->setDescription('Delete Translation from all the Versions of a Content Item');
80
    }
81
82
    protected function initialize(InputInterface $input, OutputInterface $output)
83
    {
84
        parent::initialize($input, $output);
85
        $this->input = $input;
86
        $this->output = $output;
87
        $this->questionHelper = $this->getHelper('question');
88
        $this->contentService = $this->repository->getContentService();
89
90
        $this->repository->getPermissionResolver()->setCurrentUserReference(
91
            $this->repository->getUserService()->loadUserByLogin($input->getOption('user'))
92
        );
93
    }
94
95
    /**
96
     * {@inheritdoc}