Completed
Push — master ( bae954...5175a4 )
by Jonathan
08:48 queued 11s
created

MigratorConfiguration   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 21
dl 0
loc 75
ccs 25
cts 25
cp 1
rs 10
c 0
b 0
f 0
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getTimeAllQueries() 0 3 1
A setTimeAllQueries() 0 5 1
A isDryRun() 0 3 1
A getNoMigrationException() 0 3 1
A setDryRun() 0 5 1
A setFromSchema() 0 5 1
A setAllOrNothing() 0 5 1
A getFromSchema() 0 3 1
A setNoMigrationException() 0 5 1
A isAllOrNothing() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations;
6
7
use Doctrine\DBAL\Schema\Schema;
8
9
/**
10
 * The MigratorConfiguration class is responsible for defining the configuration for a migration.
11
 *
12
 * @internal
13
 *
14
 * @see Doctrine\Migrations\Migrator
15
 * @see Doctrine\Migrations\Version\Executor
16
 */
17
class MigratorConfiguration
18
{
19
    /** @var bool */
20
    private $dryRun = false;
21
22
    /** @var bool */
23
    private $timeAllQueries = false;
24
25
    /** @var bool */
26
    private $noMigrationException = false;
27
28
    /** @var bool */
29
    private $allOrNothing = false;
30
31
    /** @var Schema|null */
32
    private $fromSchema;
33
34 61
    public function isDryRun() : bool
35
    {
36 61
        return $this->dryRun;
37
    }
38
39 29
    public function setDryRun(bool $dryRun) : self
40
    {
41 29
        $this->dryRun = $dryRun;
42
43 29
        return $this;
44
    }
45
46 24
    public function getTimeAllQueries() : bool
47
    {
48 24
        return $this->timeAllQueries;
49
    }
50
51 7
    public function setTimeAllQueries(bool $timeAllQueries) : self
52
    {
53 7
        $this->timeAllQueries = $timeAllQueries;
54
55 7
        return $this;
56
    }
57
58 3
    public function getNoMigrationException() : bool
59
    {
60 3
        return $this->noMigrationException;
61
    }
62
63 5
    public function setNoMigrationException(bool $noMigrationException = false) : self
64
    {
65 5
        $this->noMigrationException = $noMigrationException;
66
67 5
        return $this;
68
    }
69
70 29
    public function isAllOrNothing() : bool
71
    {
72 29
        return $this->allOrNothing;
73
    }
74
75 6
    public function setAllOrNothing(bool $allOrNothing) : self
76
    {
77 6
        $this->allOrNothing = $allOrNothing;
78
79 6
        return $this;
80
    }
81
82 18
    public function getFromSchema() : ?Schema
83
    {
84 18
        return $this->fromSchema;
85
    }
86
87 26
    public function setFromSchema(Schema $fromSchema) : self
88
    {
89 26
        $this->fromSchema = $fromSchema;
90
91 26
        return $this;
92
    }
93
}
94