Skip to content

Commit

Permalink
Simplify ValueBinder::placeholder()
Browse files Browse the repository at this point in the history
Remove un-necessary code.
  • Loading branch information
markstory committed Sep 22, 2014
1 parent ac5282d commit b7ae2a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/Database/ValueBinder.php
Expand Up @@ -63,14 +63,11 @@ public function bind($param, $value, $type = 'string') {
* @return string to be used as a placeholder in a query expression
*/
public function placeholder($token) {
$param = $token;
$number = $this->_bindingsCount++;

if ($param[0] !== ':' || $param !== '?') {
$param = sprintf(':c%s', $number);
if ($token[0] !== ':' || $token !== '?') {
$token = sprintf(':c%s', $number);
}

return $param;
return $token;
}

/**
Expand Down

0 comments on commit b7ae2a5

Please sign in to comment.