do not save value into variable if it's only returned afterwards
This commit is contained in:
parent
1124d3626e
commit
5465b39332
1 changed files with 2 additions and 6 deletions
|
@ -110,14 +110,10 @@ class SequenceGenerator
|
||||||
/** @var EntityManager $em */
|
/** @var EntityManager $em */
|
||||||
$em = $this->entityManager;
|
$em = $this->entityManager;
|
||||||
|
|
||||||
$result = $em->getConnection()->executeQuery(
|
return $em->getConnection()->executeQuery(
|
||||||
'SELECT MAX(number) AS count FROM digicomp_sequence_domain_model_insert WHERE type=:type',
|
'SELECT MAX(number) AS count FROM digicomp_sequence_domain_model_insert WHERE type=:type',
|
||||||
['type' => $this->inferTypeFromSource($type)]
|
['type' => $this->inferTypeFromSource($type)]
|
||||||
);
|
)->fetchAll()[0]['count'];
|
||||||
$count = $result->fetchAll();
|
|
||||||
$count = $count[0]['count'];
|
|
||||||
|
|
||||||
return $count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue