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

MigrationsEventArgs::getPlan()   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\MigrationPlanList;
10
use Doctrine\Migrations\MigratorConfiguration;
11
12
/**
13
 * The MigrationEventsArgs class is passed to events not related to a single migration version.
14
 */
15
final class MigrationsEventArgs extends EventArgs
16
{
17
    /** @var Connection */
18
    private $connection;
19
20
    /** @var MigrationPlanList */
21
    private $plan;
22
23
    /** @var MigratorConfiguration */
24
    private $migratorConfiguration;
25
26 7
    public function __construct(
27
        Connection $connection,
28
        MigrationPlanList $plan,
29
        MigratorConfiguration $migratorConfiguration
30
    ) {
31 7
        $this->connection            = $connection;
32 7
        $this->plan                  = $plan;
33 7
        $this->migratorConfiguration = $migratorConfiguration;
34 7
    }
35
36 4
    public function getConnection() : Connection
37
    {
38 4
        return $this->connection;
39
    }
40
41 1
    public function getPlan() : MigrationPlanList
42
    {
43 1
        return $this->plan;
44
    }
45
46 4
    public function getMigratorConfiguration() : MigratorConfiguration
47
    {
48 4
        return $this->migratorConfiguration;
49
    }
50
}
51