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

PostMappingBuildEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 54.55%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 33
ccs 6
cts 11
cp 0.5455
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getIndexConfig() 0 4 1
A getMapping() 0 4 1
A setMapping() 0 4 1
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