Passed
Push — master ( cc4e78...1262d4 )
by Damian
04:08
created

SearchPropertyNameResolverRegistry   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 16
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addPropertyNameResolver() 0 3 1
A getPropertyNameResolvers() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitBag\SyliusElasticsearchPlugin\PropertyNameResolver;
6
7
final class SearchPropertyNameResolverRegistry implements SearchPropertyNameResolverRegistryInterface
8
{
9
    /** @var ConcatedNameResolverInterface[] */
10
    private $propertyNameResolvers = [];
11
12
    public function addPropertyNameResolver(ConcatedNameResolverInterface $propertyNameResolver): void
13
    {
14
        $this->propertyNameResolvers[] = $propertyNameResolver;
15
    }
16
17
    /**
18
     * @return ConcatedNameResolverInterface[]
19
     */
20
    public function getPropertyNameResolvers(): array
21
    {
22
        return $this->propertyNameResolvers;
23
    }
24
}
25