Code Duplication    Length = 8-8 lines in 2 locations

src/eXpansion/Framework/Core/Services/ApplicationDebug.php 1 location

@@ 18-25 (lines=8) @@
15
    protected function executeRun()
16
    {
17
        $calls = $this->factory->getConnection()->executeCallbacks();
18
        if (!empty($calls)) {
19
            foreach ($calls as $call) {
20
                $method = preg_replace('/^[[:alpha:]]+\./', '', $call[0]); // remove trailing "Whatever."
21
                $params = (array) $call[1];
22
23
                $this->dispatcher->dispatch($method, $params);
24
            }
25
        }
26
        $this->factory->getConnection()->executeMulticall();
27
    }
28
}

src/eXpansion/Framework/Core/Services/Application.php 1 location

@@ 52-59 (lines=8) @@
49
        $this->dispatcher->dispatch(self::EVENT_PRE_LOOP, []);
50
51
        $calls = $this->factory->getConnection()->executeCallbacks();
52
        if (!empty($calls)) {
53
            foreach ($calls as $call) {
54
                $method = preg_replace('/^[[:alpha:]]+\./', '', $call[0]); // remove trailing "Whatever."
55
                $params = (array) $call[1];
56
57
                $this->dispatcher->dispatch($method, $params);
58
            }
59
        }
60
61
        $this->factory->getConnection()->executeMulticall();
62
        $this->dispatcher->dispatch(self::EVENT_POST_LOOP, []);