Commit e678b77b authored by Taylor Otwell's avatar Taylor Otwell

refactored wrap method for readability.

parent 82a02180
......@@ -635,12 +635,17 @@ class Query {
{
if (strpos(strtolower($value), ' as ') !== false)
{
return $this->wrap_alias($value, $connection);
return $this->wrap_alias($value);
}
$wrap = $this->connection->wrapper();
return implode('.', array_map(function($segment) use ($wrap) { return ($segment != '*') ? $wrap.$segment.$wrap : $segment; }, explode('.', $value)));
foreach (explode('.', $value) as $segment)
{
$wrapped[] = ($segment != '*') ? $wrap.$segment.$wrap : $segment;
}
return implode('.', $wrapped);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment