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

SchemaEventArgs   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 40%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 21
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
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