Code Duplication    Length = 10-12 lines in 3 locations

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

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

module/Core/src/Core/Controller/FileController.php 1 location

@@ 29-38 (lines=10) @@
26
 */
27
class FileController extends AbstractActionController
28
{
29
    protected function attachDefaultListeners()
30
    {
31
        parent::attachDefaultListeners();
32
        $events = $this->getEventManager();
33
        $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10);
34
35
        $serviceLocator  = $this->getServiceLocator();
36
        $defaultServices = $serviceLocator->get('DefaultListeners');
37
        $events->attach($defaultServices);
38
    }
39
40
    public function preDispatch(MvcEvent $e)
41
    {

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
    {