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 */
|
||||
$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',
|
||||
['type' => $this->inferTypeFromSource($type)]
|
||||
);
|
||||
$count = $result->fetchAll();
|
||||
$count = $count[0]['count'];
|
||||
|
||||
return $count;
|
||||
)->fetchAll()[0]['count'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue