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

Migrator::migrate()   B

Complexity

Conditions 11
Paths 16

Size

Total Lines 59
Code Lines 24

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 25
CRAP Score 11

Importance

Changes 0
Metric Value
cc 11
eloc 24
nc 16
nop 2
dl 0
loc 59
ccs 25
cts 25
cp 1
crap 11
rs 7.3166
c 0
b 0
f 0

How to fix   Long Method    Complexity   

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;
6
7
use Doctrine\Migrations\Metadata\MigrationPlanList;
8
9
/**
10
 * The DbalMigrator class is responsible for generating and executing the SQL for a migration.
11
 *
12
 * @internal
13
 */
14
interface Migrator
15
{
16
    /**
17
     * @return array<string, string[]> A list of SQL statements executed, grouped by migration version
18
     */
19
    public function migrate(MigrationPlanList $migrationsPlan, MigratorConfiguration $migratorConfiguration) : array;
20
}
21