Code Duplication    Length = 18-22 lines in 2 locations

src/Comodojo/Extender/Queue/Manager.php 1 location

@@ 48-69 (lines=22) @@
45
     * @param EventsManager $events
46
     * @param EntityManager $em
47
     */
48
    public function __construct(
49
        Configuration $configuration,
50
        LoggerInterface $logger,
51
        EventsManager $events,
52
        EntityManager $em = null
53
    ) {
54
55
        $this->setConfiguration($configuration);
56
        $this->setLogger($logger);
57
        $this->setEvents($events);
58
59
        $em = is_null($em) ? Database::init($configuration)->getEntityManager() : $em;
60
        $this->setEntityManager($em);
61
62
        // $logger->debug("Tasks Manager online", array(
63
        //     'lagger_timeout' => $this->lagger_timeout,
64
        //     'multithread' => $this->multithread,
65
        //     'max_runtime' => $this->max_runtime,
66
        //     'max_childs' => $this->max_childs
67
        // ));
68
69
    }
70
71
    public function get() {
72

src/Comodojo/Extender/Schedule/Manager.php 1 location

@@ 50-67 (lines=18) @@
47
     * @param EventsManager $events
48
     * @param EntityManager $em
49
     */
50
    public function __construct(
51
        Configuration $configuration,
52
        LoggerInterface $logger,
53
        EventsManager $events,
54
        EntityManager $em = null
55
    ) {
56
57
        $this->setConfiguration($configuration);
58
        $this->setLogger($logger);
59
        $this->setEvents($events);
60
61
        $em = is_null($em) ? Database::init($configuration)->getEntityManager() : $em;
62
        $this->setEntityManager($em);
63
64
        // $lock_path = $configuration->get('lockfiles-path');
65
        // $this->locker = new Locker("$lock_path/schedule.lock");
66
        // $this->locker->lock(0);
67
    }
68
69
    public function get($id) {
70