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

MigrationsEventArgs   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 34
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getConnection() 0 3 1
A getPlan() 0 3 1
A __construct() 0 8 1
A getMigratorConfiguration() 0 3 1
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