Code Duplication    Length = 8-8 lines in 2 locations

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

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

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

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