Completed
Push — develop ( fa42c1...0ef7d4 )
by Sergei
22:52
created

SchemaEventArgs::isDefaultPrevented()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Doctrine\DBAL\Event;
4
5
use Doctrine\Common\EventArgs;
6
7
/**
8
 * Base class for schema related events.
9
 */
10
class SchemaEventArgs extends EventArgs
11
{
12
    /** @var bool */
13
    private $preventDefault = false;
14
15
    /**
16
     * @return \Doctrine\DBAL\Event\SchemaEventArgs
17
     */
18
    public function preventDefault()
19
    {
20
        $this->preventDefault = true;
21
22
        return $this;
23
    }
24
25
    /**
26
     * @return bool
27
     */
28 874
    public function isDefaultPrevented()
29
    {
30 874
        return $this->preventDefault;
31
    }
32
}
33