Fix some very minor code quality issues

This commit is contained in:
Timothy Warren 2014-07-15 11:01:47 -04:00
parent 023093c1f1
commit 2ae206462d
4 changed files with 10 additions and 9 deletions

View File

@ -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
} }

View File

@ -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);

View File

@ -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;

View File

@ -17,5 +17,6 @@ test:
allowed_warnings: 0 allowed_warnings: 0
skip_classes: true skip_classes: true
php_loc: php_loc:
php_mess_detector:
allow_failures: true
complete: complete: