Code Duplication    Length = 10-12 lines in 3 locations

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

@@ 22-31 (lines=10) @@
19
20
class FileController extends AbstractActionController
21
{
22
    protected function attachDefaultListeners()
23
    {
24
        parent::attachDefaultListeners();
25
        $events = $this->getEventManager();
26
        $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10);
27
28
        $serviceLocator  = $this->getServiceLocator();
29
        $defaultServices = $serviceLocator->get('DefaultListeners');
30
        $events->attach($defaultServices);
31
    }
32
33
    public function preDispatch(MvcEvent $e)
34
    {

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/Applications/src/Applications/Controller/ApplyController.php 1 location

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