Failed Conditions
Pull Request — develop (#3581)
by Jonathan
12:44
created

SchemaEventArgs   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 40%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 18
ccs 2
cts 5
cp 0.4
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A preventDefault() 0 5 1
A isDefaultPrevented() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Event;
6
7
use Doctrine\Common\EventArgs;
8
9
/**
10
 * Base class for schema related events.
11
 */
12
class SchemaEventArgs extends EventArgs
13
{
14
    /** @var bool */
15
    private $preventDefault = false;
16
17
    /**
18
     * @return $this
19
     */
20
    public function preventDefault() : self
21
    {
22
        $this->preventDefault = true;
23
24
        return $this;
25
    }
26
27 988
    public function isDefaultPrevented() : bool
28
    {
29 988
        return $this->preventDefault;
30
    }
31
}
32