This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
22
{
23
private $transformer;
24
25
/**
26
* @param SearchableInterface $searchable the object to search in
27
* @param Query $query the query to search
28
* @param ElasticaToModelTransformerInterface $transformer the transformer for fetching the results
29
*/
30
2
public function __construct(SearchableInterface $searchable, Query $query, ElasticaToModelTransformerInterface $transformer)
31
{
32
2
parent::__construct($searchable, $query);
33
34
2
$this->transformer = $transformer;
35
2
}
36
37
/**
38
* {@inheritdoc}
39
*/
40
1
public function getResults($offset, $length)
41
{
42
1
return new HybridPartialResults($this->getElasticaResults($offset, $length), $this->transformer);
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.