Passed
Push — master ( 229462...d74785 )
by Andreas
02:20 queued 14s
created

Executor::executeMigration()   B

Complexity

Conditions 8
Paths 48

Size

Total Lines 86
Code Lines 47

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 45
CRAP Score 8

Importance

Changes 0
Metric Value
cc 8
eloc 47
nc 48
nop 5
dl 0
loc 86
ccs 45
cts 45
cp 1
crap 8
rs 7.9119
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Version;
6
7
use Doctrine\Migrations\Metadata\MigrationPlan;
8
use Doctrine\Migrations\MigratorConfiguration;
9
10
/**
11
 * The Executor defines the interface used for adding sql for a migration and executing that sql.
12
 *
13
 * @internal
14
 */
15
interface Executor
16
{
17
    /**
18
     * @param mixed[] $params
19
     * @param mixed[] $types
20
     */
21
    public function addSql(string $sql, array $params = [], array $types = []) : void;
22
23
    public function execute(MigrationPlan $plan, MigratorConfiguration $migratorConfiguration) : ExecutionResult;
24
}
25