Completed
Push — master ( f2f7ef...c782fc )
by Karel
04:31 queued 10s
created

IndexResetEvent::isPopulating()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace FOS\ElasticaBundle\Event;
13
14
/**
15
 * Index ResetEvent.
16
 *
17
 * @author Oleg Andreyev <[email protected]>
18
 */
19
class IndexResetEvent extends IndexEvent
20
{
21
    /**
22
     * @Event("FOS\ElasticaBundle\Event\IndexResetEvent")
23
     */
24
    const PRE_INDEX_RESET = 'elastica.index.pre_reset';
25
26
    /**
27
     * @Event("FOS\ElasticaBundle\Event\IndexResetEvent")
28
     */
29
    const POST_INDEX_RESET = 'elastica.index.post_reset';
30
31
    /**
32
     * @var bool
33
     */
34
    private $force;
35
36
    /**
37
     * @var bool
38
     */
39
    private $populating;
40
41
    /**
42
     * @param string $index
43
     * @param bool   $populating
44
     * @param bool   $force
45
     */
46 13
    public function __construct($index, $populating, $force)
47
    {
48 13
        parent::__construct($index);
49
50 13
        $this->force = $force;
51 13
        $this->populating = $populating;
52 13
    }
53
54
    /**
55
     * @return bool
56
     */
57 1
    public function isForce()
58
    {
59 1
        return $this->force;
60
    }
61
62
    /**
63
     * @return bool
64
     */
65 1
    public function isPopulating()
66
    {
67 1
        return $this->populating;
68
    }
69
70
    /**
71
     * @param bool $force
72
     */
73
    public function setForce($force)
74
    {
75
        $this->force = $force;
76
    }
77
}
78