Fix some very minor code quality issues
This commit is contained in:
parent
023093c1f1
commit
2ae206462d
@ -145,15 +145,15 @@ function Query($params = '')
|
|||||||
}
|
}
|
||||||
elseif ( ! is_scalar($params) && ! is_null($params))
|
elseif ( ! is_scalar($params) && ! is_null($params))
|
||||||
{
|
{
|
||||||
$p = new stdClass();
|
$params_object = new stdClass();
|
||||||
|
|
||||||
foreach($params as $k => $v)
|
foreach($params as $k => $v)
|
||||||
{
|
{
|
||||||
$p->$k = $v;
|
$params_object->$k = $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, return a new connection
|
// Otherwise, return a new connection
|
||||||
return $cmanager->connect($p);
|
return $cmanager->connect($params_object);
|
||||||
}
|
}
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
}
|
}
|
||||||
|
@ -107,9 +107,9 @@ abstract class Abstract_Driver extends \PDO implements Driver_Interface {
|
|||||||
$this_class = get_class($this);
|
$this_class = get_class($this);
|
||||||
$ns_array = explode("\\", $this_class);
|
$ns_array = explode("\\", $this_class);
|
||||||
$base_class = array_pop($ns_array);
|
$base_class = array_pop($ns_array);
|
||||||
$ns = implode('\\', $ns_array);
|
$namespace = implode('\\', $ns_array);
|
||||||
$sql_class = "{$ns}\\SQL\\{$base_class}_SQL";
|
$sql_class = "{$namespace}\\SQL\\{$base_class}_SQL";
|
||||||
$util_class = "{$ns}\\Util\\{$base_class}_Util";
|
$util_class = "{$namespace}\\Util\\{$base_class}_Util";
|
||||||
|
|
||||||
$this->sql = new $sql_class();
|
$this->sql = new $sql_class();
|
||||||
$this->util = new $util_class($this);
|
$this->util = new $util_class($this);
|
||||||
|
@ -274,7 +274,7 @@ abstract class Abstract_Query_Builder {
|
|||||||
$field = $this->db->quote_ident($field);
|
$field = $this->db->quote_ident($field);
|
||||||
|
|
||||||
// Add the like string into the order map
|
// Add the like string into the order map
|
||||||
$l = $field. " {$like} ?";
|
$like = $field. " {$like} ?";
|
||||||
|
|
||||||
if ($pos == 'before')
|
if ($pos == 'before')
|
||||||
{
|
{
|
||||||
@ -290,7 +290,7 @@ abstract class Abstract_Query_Builder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$conj = (empty($this->query_map)) ? ' WHERE ' : " {$conj} ";
|
$conj = (empty($this->query_map)) ? ' WHERE ' : " {$conj} ";
|
||||||
$this->_append_map($conj, $l, 'like');
|
$this->_append_map($conj, $like, 'like');
|
||||||
|
|
||||||
// Add to the values array
|
// Add to the values array
|
||||||
$this->where_values[] = $val;
|
$this->where_values[] = $val;
|
||||||
|
Loading…
Reference in New Issue
Block a user