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

SchemaEventArgs::preventDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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