Passed
Push — feature/initial-implementation ( 79751f...3b7c72 )
by Fike
01:53
created

Entity::getMapping()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AmaTeam\ElasticSearch\Entity;
6
7
use AmaTeam\ElasticSearch\API\Entity\EntityInterface;
8
use AmaTeam\ElasticSearch\API\Entity\Indexing\IndexingInterface;
9
use AmaTeam\ElasticSearch\API\Entity\Mapping\ClassMappingInterface;
10
11
class Entity implements EntityInterface
12
{
13
    /**
14
     * @var ClassMappingInterface
15
     */
16
    private $mapping;
17
    /**
18
     * @var IndexingInterface
19
     */
20
    private $indexing;
21
22
    /**
23
     * @param ClassMappingInterface $mapping
24
     * @param IndexingInterface $indexing
25
     */
26
    public function __construct(
27
        ClassMappingInterface $mapping = null,
28
        IndexingInterface $indexing = null
29
    ) {
30
        $this->mapping = $mapping;
31
        $this->indexing = $indexing;
32
    }
33
34
    /**
35
     * @return ClassMappingInterface
36
     */
37
    public function getMapping(): ?ClassMappingInterface
38
    {
39
        return $this->mapping;
40
    }
41
42
    /**
43
     * @param ClassMappingInterface $mapping
44
     * @return $this
45
     */
46
    public function setMapping(ClassMappingInterface $mapping)
47
    {
48
        $this->mapping = $mapping;
49
        return $this;
50
    }
51
52
    /**
53
     * @return IndexingInterface
54
     */
55
    public function getIndexing(): ?IndexingInterface
56
    {
57
        return $this->indexing;
58
    }
59
60
    /**
61
     * @param IndexingInterface $indexing
62
     * @return $this
63
     */
64
    public function setIndexing(IndexingInterface $indexing)
65
    {
66
        $this->indexing = $indexing;
67
        return $this;
68
    }
69
}
70