Completed
Push — master ( ad12aa...1c1eb2 )
by De Cramer
10s
created

ApplicationDebug::executeRun()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 8
Ratio 57.14 %

Code Coverage

Tests 9
CRAP Score 3

Importance

Changes 0
Metric Value
dl 8
loc 14
rs 9.4285
c 0
b 0
f 0
ccs 9
cts 9
cp 1
cc 3
eloc 8
nc 2
nop 0
crap 3
1
<?php
2
3
namespace eXpansion\Framework\Core\Services;
4
5
use eXpansion\Framework\Core\Services\Application\AbstractApplication;
6
7
/**
8
 * eXpansion Application main routine.
9
 *
10
 * @package eXpansion\Framework\Core\Services
11
 */
12
class ApplicationDebug extends AbstractApplication
13
{
14
15 1
    protected function executeRun()
16
    {
17
18 1
        $calls = $this->connection->executeCallbacks();
19 1 View Code Duplication
        if (!empty($calls)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20 1
            foreach ($calls as $call) {
21 1
                $method = preg_replace('/^[[:alpha:]]+\./', '', $call[0]); // remove trailing "Whatever."
22 1
                $params = (array) $call[1];
23
24 1
                $this->dispatcher->dispatch($method, $params);
25
            }
26
        }
27 1
        $this->connection->executeMulticall();
28 1
    }
29
}
30