Completed
Push — master ( d7101c...2f6667 )
by Mike
05:39
created

MigrationsEventArgs   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 45.45%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 43
ccs 5
cts 11
cp 0.4545
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getConfiguration() 0 4 1
A getDirection() 0 4 1
A isDryRun() 0 4 1
1
<?php
2
/*
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the LGPL. For more information, see
17
 * <http://www.doctrine-project.org>.
18
 */
19
20
namespace Doctrine\DBAL\Migrations\Event;
21
22
use Doctrine\Common\EventArgs;
23
use Doctrine\DBAL\Migrations\Configuration\Configuration;
24
25
class MigrationsEventArgs extends EventArgs
26
{
27
    /**
28
     * @var Configuration
29
     */
30
    private $config;
31
32
    /**
33
     * The direction of the migration.
34
     *
35
     * @var string (up|down)
36
     */
37
    private $direction;
38
39
    /**
40
     * Whether or not the migrations are executing in dry run mode.
41
     *
42
     * @var bool
43
     */
44
    private $dryRun;
45
46 44
    public function __construct(Configuration $config, $direction, $dryRun)
47
    {
48 44
        $this->config = $config;
49 44
        $this->direction = $direction;
50 44
        $this->dryRun = (bool) $dryRun;
51 44
    }
52
53
    public function getConfiguration()
54
    {
55
        return $this->config;
56
    }
57
58
    public function getDirection()
59
    {
60
        return $this->direction;
61
    }
62
63
    public function isDryRun()
64
    {
65
        return $this->dryRun;
66
    }
67
}
68