Passed
Pull Request — master (#683)
by Jonathan
02:21
created

MigratorConfig::setTimeAllQueries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations;
6
7
class MigratorConfig
8
{
9
    /** @var bool */
10
    private $dryRun = false;
11
12
    /** @var bool */
13
    private $timeAllQueries = false;
14
15
    /** @var bool */
16
    private $noMigrationException = false;
17
18
    /** @var bool */
19
    private $allOrNothing = false;
20
21 60
    public function isDryRun() : bool
22
    {
23 60
        return $this->dryRun;
24
    }
25
26 28
    public function setDryRun(bool $dryRun) : self
27
    {
28 28
        $this->dryRun = $dryRun;
29
30 28
        return $this;
31
    }
32
33 24
    public function getTimeAllQueries() : bool
34
    {
35 24
        return $this->timeAllQueries;
36
    }
37
38 7
    public function setTimeAllQueries(bool $timeAllQueries) : self
39
    {
40 7
        $this->timeAllQueries = $timeAllQueries;
41
42 7
        return $this;
43
    }
44
45 3
    public function getNoMigrationException() : bool
46
    {
47 3
        return $this->noMigrationException;
48
    }
49
50 5
    public function setNoMigrationException(bool $noMigrationException = false) : self
51
    {
52 5
        $this->noMigrationException = $noMigrationException;
53
54 5
        return $this;
55
    }
56
57 28
    public function isAllOrNothing() : bool
58
    {
59 28
        return $this->allOrNothing;
60
    }
61
62 6
    public function setAllOrNothing(bool $allOrNothing) : self
63
    {
64 6
        $this->allOrNothing = $allOrNothing;
65
66 6
        return $this;
67
    }
68
}
69