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

MigrationsVersionEventArgs::getConnection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Event;
6
7
use Doctrine\Common\EventArgs;
8
use Doctrine\DBAL\Connection;
9
use Doctrine\Migrations\Metadata\MigrationPlan;
10
use Doctrine\Migrations\MigratorConfiguration;
11
12
/**
13
 * The MigrationsVersionEventArgs class is passed to events related to a single migration version.
14
 */
15
final class MigrationsVersionEventArgs extends EventArgs
16
{
17
    /** @var Connection */
18
    private $connection;
19
20
    /** @var MigrationPlan */
21
    private $plan;
22
23
    /** @var MigratorConfiguration */
24
    private $migratorConfiguration;
25
26 11
    public function __construct(
27
        Connection $connection,
28
        MigrationPlan $plan,
29
        MigratorConfiguration $migratorConfiguration
30
    ) {
31 11
        $this->connection            = $connection;
32 11
        $this->plan                  = $plan;
33 11
        $this->migratorConfiguration = $migratorConfiguration;
34 11
    }
35
36 1
    public function getConnection() : Connection
37
    {
38 1
        return $this->connection;
39
    }
40
41 1
    public function getPlan() : MigrationPlan
42
    {
43 1
        return $this->plan;
44
    }
45
46 1
    public function getMigratorConfiguration() : MigratorConfiguration
47
    {
48 1
        return $this->migratorConfiguration;
49
    }
50
}
51