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...
14
{
15
private $child;
16
private $em;
17
18
/**
19
* @param EntityManagerInterface $em
20
* @param ResultSetMappingBuilder $rsm
21
* @param QueryBuilder $qb
22
* @param callable|null $countQueryBuilderModifier
23
*/
24
public function __construct(EntityManagerInterface $em, ResultSetMappingBuilder $rsm, QueryBuilder $qb, callable $countQueryBuilderModifier = null)
25
{
26
$this->em = $em;
27
$this->child = new RSMQueryResult($em, $rsm, $qb, $countQueryBuilderModifier);
28
}
29
30
/**
31
* {@inheritdoc}
32
*/
33
public function take($offset, $limit)
34
{
35
return $this->child->take($offset, $limit);
36
}
37
38
/**
39
* {@inheritdoc}
40
*/
41
public function count()
42
{
43
return $this->child->count();
44
}
45
46
/**
47
* {@inheritdoc}
48
*/
49
public function getIterator()
50
{
51
foreach ($this->child->getQuery()->iterate() as $row) {
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.