AvailableMigration::getMigration()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Metadata;
6
7
use Doctrine\Migrations\AbstractMigration;
8
use Doctrine\Migrations\Version\Version;
9
10
/**
11
 * Available migrations may or may not be already executed
12
 * The migration might be already executed or not.
13
 */
14
final class AvailableMigration
15
{
16
    /** @var Version */
17
    private $version;
18
19
    /** @var AbstractMigration */
20
    private $migration;
21
22 96
    public function __construct(Version $version, AbstractMigration $migration)
23
    {
24 96
        $this->version   = $version;
25 96
        $this->migration = $migration;
26 96
    }
27
28 80
    public function getVersion() : Version
29
    {
30 80
        return $this->version;
31
    }
32
33 26
    public function getMigration() : AbstractMigration
34
    {
35 26
        return $this->migration;
36
    }
37
}
38