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

AliasResolver::resolveVersionAlias()   B

Complexity

Conditions 8
Paths 8

Size

Total Lines 23
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 16
CRAP Score 8

Importance

Changes 0
Metric Value
cc 8
eloc 17
nc 8
nop 1
dl 0
loc 23
ccs 16
cts 16
cp 1
crap 8
rs 8.4444
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Version;
6
7
/**
8
 * The DefaultAliasResolver class is responsible for resolving aliases like first, current, etc. to the actual version number.
9
 *
10
 * @internal
11
 */
12
interface AliasResolver
13
{
14
    /**
15
     * Returns the version number from an alias.
16
     *
17
     * Supported aliases are:
18
     *
19
     * - first: The very first version before any migrations have been run.
20
     * - current: The current version.
21
     * - prev: The version prior to the current version.
22
     * - next: The version following the current version.
23
     * - latest: The latest available version.
24
     *
25
     * If an existing version number is specified, it is returned verbatim.
26
     */
27
    public function resolveVersionAlias(string $alias) : Version;
28
}
29