Code Duplication    Length = 11-11 lines in 9 locations

src/Kunstmaan/AdminListBundle/Controller/AdminListController.php 1 location

@@ 570-580 (lines=11) @@
567
     *
568
     * @return object
569
     */
570
    private function dispatch($event, string $eventName)
571
    {
572
        $eventDispatcher = $this->container->get('event_dispatcher');
573
        if (class_exists(LegacyEventDispatcherProxy::class)) {
574
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
575
576
            return $eventDispatcher->dispatch($event, $eventName);
577
        }
578
579
        return $eventDispatcher->dispatch($eventName, $event);
580
    }
581
}
582

src/Kunstmaan/FormBundle/Helper/FormHandler.php 1 location

@@ 101-111 (lines=11) @@
98
     *
99
     * @return object
100
     */
101
    private function dispatch($event, string $eventName)
102
    {
103
        $eventDispatcher = $this->container->get('event_dispatcher');
104
        if (class_exists(LegacyEventDispatcherProxy::class)) {
105
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
106
107
            return $eventDispatcher->dispatch($event, $eventName);
108
        }
109
110
        return $eventDispatcher->dispatch($eventName, $event);
111
    }
112
}
113

src/Kunstmaan/NodeBundle/Controller/NodeAdminController.php 1 location

@@ 1313-1323 (lines=11) @@
1310
     *
1311
     * @return object
1312
     */
1313
    private function dispatch($event, string $eventName)
1314
    {
1315
        $eventDispatcher = $this->container->get('event_dispatcher');
1316
        if (class_exists(LegacyEventDispatcherProxy::class)) {
1317
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
1318
1319
            return $eventDispatcher->dispatch($event, $eventName);
1320
        }
1321
1322
        return $eventDispatcher->dispatch($eventName, $event);
1323
    }
1324
}
1325

src/Kunstmaan/NodeBundle/Controller/SlugController.php 1 location

@@ 154-164 (lines=11) @@
151
     *
152
     * @return object
153
     */
154
    private function dispatch($event, string $eventName)
155
    {
156
        $eventDispatcher = $this->container->get('event_dispatcher');
157
        if (class_exists(LegacyEventDispatcherProxy::class)) {
158
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
159
160
            return $eventDispatcher->dispatch($event, $eventName);
161
        }
162
163
        return $eventDispatcher->dispatch($eventName, $event);
164
    }
165
}
166

src/Kunstmaan/NodeSearchBundle/Configuration/NodePagesConfiguration.php 1 location

@@ 797-807 (lines=11) @@
794
     *
795
     * @return object
796
     */
797
    private function dispatch($event, string $eventName)
798
    {
799
        $eventDispatcher = $this->container->get('event_dispatcher');
800
        if (class_exists(LegacyEventDispatcherProxy::class)) {
801
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
802
803
            return $eventDispatcher->dispatch($event, $eventName);
804
        }
805
806
        return $eventDispatcher->dispatch($eventName, $event);
807
    }
808
}
809

src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php 1 location

@@ 391-401 (lines=11) @@
388
     *
389
     * @return object
390
     */
391
    private function dispatch($event, string $eventName)
392
    {
393
        $eventDispatcher = $this->container->get('event_dispatcher');
394
        if (class_exists(LegacyEventDispatcherProxy::class)) {
395
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
396
397
            return $eventDispatcher->dispatch($event, $eventName);
398
        }
399
400
        return $eventDispatcher->dispatch($eventName, $event);
401
    }
402
}
403

src/Kunstmaan/SitemapBundle/Controller/SitemapController.php 1 location

@@ 77-87 (lines=11) @@
74
     *
75
     * @return object
76
     */
77
    private function dispatch($event, string $eventName)
78
    {
79
        $eventDispatcher = $this->container->get('event_dispatcher');
80
        if (class_exists(LegacyEventDispatcherProxy::class)) {
81
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
82
83
            return $eventDispatcher->dispatch($event, $eventName);
84
        }
85
86
        return $eventDispatcher->dispatch($eventName, $event);
87
    }
88
}
89

src/Kunstmaan/UserManagementBundle/Controller/UsersController.php 1 location

@@ 312-322 (lines=11) @@
309
     *
310
     * @return object
311
     */
312
    private function dispatch($event, string $eventName)
313
    {
314
        $eventDispatcher = $this->container->get('event_dispatcher');
315
        if (class_exists(LegacyEventDispatcherProxy::class)) {
316
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
317
318
            return $eventDispatcher->dispatch($event, $eventName);
319
        }
320
321
        return $eventDispatcher->dispatch($eventName, $event);
322
    }
323
}
324

src/Kunstmaan/VotingBundle/Controller/VotingController.php 1 location

@@ 87-97 (lines=11) @@
84
     *
85
     * @return object
86
     */
87
    private function dispatch($event, string $eventName)
88
    {
89
        $eventDispatcher = $this->container->get('event_dispatcher');
90
        if (class_exists(LegacyEventDispatcherProxy::class)) {
91
            $eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
92
93
            return $eventDispatcher->dispatch($event, $eventName);
94
        }
95
96
        return $eventDispatcher->dispatch($eventName, $event);
97
    }
98
}
99