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

Manager::__construct()   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 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AmaTeam\ElasticSearch\Mapping;
6
7
use AmaTeam\ElasticSearch\API\Entity\Mapping\ClassMappingInterface;
8
use AmaTeam\ElasticSearch\API\Mapping\Conversion\ContextInterface;
9
use AmaTeam\ElasticSearch\API\Mapping\Conversion\ConverterInterface;
10
11
class Manager
12
{
13
    /**
14
     * @var ConverterInterface
15
     */
16
    private $converter;
17
18
    /**
19
     * @param ConverterInterface $converter
20
     */
21
    public function __construct(ConverterInterface $converter)
22
    {
23
        $this->converter = $converter;
24
    }
25
26
    public function convert(ClassMappingInterface $source, ContextInterface $context = null)
27
    {
28
        return $this->converter->convert($source, $context);
29
    }
30
}
31