AvailableMigration   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getVersion() 0 4 1
A getMigration() 0 4 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