Skip to content

Commit

Permalink
internal rename of array key variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Nov 9, 2015
1 parent 60329d7 commit e0fa721
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Common/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,25 +260,24 @@ protected function addColWithAlias($spec)

/**
*
* Remove a column via it's alias
* Remove a column via its alias.
*
* @param string $value The column to remove
* @param string $alias The column to remove
*
* @return null
*
*/
public function removeCol($value)
public function removeCol($alias)
{
if (isset($this->cols[$value])) {
unset($this->cols[$value]);
if (isset($this->cols[$alias])) {
unset($this->cols[$alias]);

return true;
}

$index = array_search($value, $this->cols);
$index = array_search($alias, $this->cols);
if ($index !== false) {
unset($this->cols[$index]);

return true;
}

Expand Down

0 comments on commit e0fa721

Please sign in to comment.