Code Duplication    Length = 15-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

@@ 48-62 (lines=15) @@
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
    }
63
64
    public function get($id) {
65