Skip to content

Commit

Permalink
Simplifying code
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 26, 2016
1 parent cb42f90 commit 1b00624
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Database/Expression/Comparison.php
Expand Up @@ -265,14 +265,12 @@ protected function _bindValue($value, $generator, $type)
*/
protected function _flattenValue($value, $generator, $type = 'string')
{
$expressions = [];
$parts = [];
foreach ($this->_valueExpressions as $k => $v) {
$expressions[$k] = $v->sql($generator);
$parts[$k] = $v->sql($generator);
unset($value[$k]);
}

$parts = $expressions;

if (!empty($value)) {
$parts += $generator->generateManyNamed($value, $type);
}
Expand Down

0 comments on commit 1b00624

Please sign in to comment.