Code Duplication    Length = 10-12 lines in 2 locations

module/Applications/src/Applications/Controller/ApplyController.php 1 location

@@ 49-58 (lines=10) @@
46
    
47
    protected $container;
48
    
49
    public function attachDefaultListeners()
50
    {
51
        parent::attachDefaultListeners();
52
        $events = $this->getEventManager();
53
        $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10);
54
        $serviceLocator  = $this->getServiceLocator();
55
        $defaultServices = $serviceLocator->get('DefaultListeners');
56
        $events->attach($defaultServices);
57
        return $this;
58
    }
59
    
60
    public function preDispatch(MvcEvent $e)
61
    {

module/Jobs/src/Jobs/Controller/ManageController.php 1 location

@@ 71-82 (lines=12) @@
68
    /**
69
     * @return $this|void
70
     */
71
    public function attachDefaultListeners()
72
    {
73
        parent::attachDefaultListeners();
74
        $events = $this->getEventManager();
75
        $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10);
76
        $serviceLocator = $this->getServiceLocator();
77
        $defaultServices = $serviceLocator->get('DefaultListeners');
78
        $events = $this->getEventManager();
79
        $events->attach($defaultServices);
80
81
        return $this;
82
    }
83
84
    /**
85
     * Dispatch listener callback.