Skip to content

Commit

Permalink
Update corresponding build method
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Feb 18, 2016
1 parent d5cf665 commit 22debcf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Components/JoinKeyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ public static function build($component, array $options = array())
{
$ret = array();
foreach ($component as $c) {
$ret[] = array_search($c->type, static::$JOINS) . ' '
. $c->expr . ' ON ' . Condition::build($c->on);
$ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr
. (! empty($c->on)
? ' ON ' . Condition::build($c->on)
: ' USING ' . ArrayObj::build($c->using));
}
return implode(' ', $ret);
}
Expand Down

0 comments on commit 22debcf

Please sign in to comment.