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

ApplicationDebug   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 44.44 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 8
loc 18
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A executeRun() 8 14 3

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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