1
0
Fork 0

Merge pull request #4229 from naderman/memory-version-array-merge

VersionParser: remove a few hundred/thousand array_merge calls
pull/4248/head
Jordi Boggiano 2015-07-12 16:14:16 +01:00
commit efb9f13248
1 changed files with 3 additions and 1 deletions

View File

@ -259,7 +259,9 @@ class VersionParser
if (count($andConstraints) > 1) { if (count($andConstraints) > 1) {
$constraintObjects = array(); $constraintObjects = array();
foreach ($andConstraints as $constraint) { foreach ($andConstraints as $constraint) {
$constraintObjects = array_merge($constraintObjects, $this->parseConstraint($constraint)); foreach ($this->parseConstraint($constraint) as $parsedConstraint) {
$constraintObjects[] = $parsedConstraint;
}
} }
} else { } else {
$constraintObjects = $this->parseConstraint($andConstraints[0]); $constraintObjects = $this->parseConstraint($andConstraints[0]);