Completed
Push — master ( a8021b...bf7228 )
by
unknown
14s queued 11s
created

PostMappingBuildEvent::getIndexConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <https://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
use FOS\ElasticaBundle\Configuration\IndexConfigInterface;
15
use Symfony\Contracts\EventDispatcher\Event;
16
17
final class PostMappingBuildEvent extends Event
18
{
19
    /**
20
     * @var IndexConfigInterface
21
     */
22
    private $indexConfig;
23
24
    /**
25
     * @var array
26
     */
27
    private $mapping;
28
29 8
    public function __construct(IndexConfigInterface $indexConfig, array $mapping)
30
    {
31 8
        $this->indexConfig = $indexConfig;
32 8
        $this->mapping = $mapping;
33 8
    }
34
35
    public function getIndexConfig(): IndexConfigInterface
36
    {
37
        return $this->indexConfig;
38
    }
39
40 8
    public function getMapping(): array
41
    {
42 8
        return $this->mapping;
43
    }
44
45
    public function setMapping(array $mapping): void
46
    {
47
        $this->mapping = $mapping;
48
    }
49
}
50