Unverified Commit 5bcd3563 authored by Jonathan H. Wage's avatar Jonathan H. Wage Committed by Sergei Morozov

Use bound instead of binded.

parent 6e63c7f0
...@@ -54,10 +54,10 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -54,10 +54,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
private $columnNames; private $columnNames;
/** @var mixed[] */ /** @var mixed[] */
private $rowBindedValues = []; private $rowBoundValues = [];
/** @var mixed[] */ /** @var mixed[] */
private $bindedValues = []; private $boundValues = [];
/** @var string */ /** @var string */
private $types; private $types;
...@@ -99,8 +99,8 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -99,8 +99,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
return; return;
} }
$this->types = str_repeat('s', $paramCount); $this->types = str_repeat('s', $paramCount);
$this->bindedValues = array_fill(1, $paramCount, null); $this->boundValues = array_fill(1, $paramCount, null);
} }
/** /**
...@@ -114,8 +114,8 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -114,8 +114,8 @@ final class MysqliStatement implements IteratorAggregate, Statement
throw UnknownType::new($type); throw UnknownType::new($type);
} }
$this->bindedValues[$param] =& $variable; $this->boundValues[$param] =& $variable;
$this->types[$param - 1] = self::$paramTypeMap[$type]; $this->types[$param - 1] = self::$paramTypeMap[$type];
} }
/** /**
...@@ -129,9 +129,9 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -129,9 +129,9 @@ final class MysqliStatement implements IteratorAggregate, Statement
throw UnknownType::new($type); throw UnknownType::new($type);
} }
$this->values[$param] = $value; $this->values[$param] = $value;
$this->bindedValues[$param] =& $this->values[$param]; $this->boundValues[$param] =& $this->values[$param];
$this->types[$param - 1] = self::$paramTypeMap[$type]; $this->types[$param - 1] = self::$paramTypeMap[$type];
} }
/** /**
...@@ -187,10 +187,10 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -187,10 +187,10 @@ final class MysqliStatement implements IteratorAggregate, Statement
// It's also important that row values are bound after _each_ call to store_result(). Otherwise, // It's also important that row values are bound after _each_ call to store_result(). Otherwise,
// if mysqli is compiled with libmysql, subsequently fetched string values will get truncated // if mysqli is compiled with libmysql, subsequently fetched string values will get truncated
// to the length of the ones fetched during the previous execution. // to the length of the ones fetched during the previous execution.
$this->rowBindedValues = array_fill(0, count($this->columnNames), null); $this->rowBoundValues = array_fill(0, count($this->columnNames), null);
$refs = []; $refs = [];
foreach ($this->rowBindedValues as $key => &$value) { foreach ($this->rowBoundValues as $key => &$value) {
$refs[$key] =& $value; $refs[$key] =& $value;
} }
...@@ -212,7 +212,7 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -212,7 +212,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
$streams = $values = []; $streams = $values = [];
$types = $this->types; $types = $this->types;
foreach ($this->bindedValues as $parameter => $value) { foreach ($this->boundValues as $parameter => $value) {
if (! isset($types[$parameter - 1])) { if (! isset($types[$parameter - 1])) {
$types[$parameter - 1] = self::$paramTypeMap[ParameterType::STRING]; $types[$parameter - 1] = self::$paramTypeMap[ParameterType::STRING];
} }
...@@ -290,7 +290,7 @@ final class MysqliStatement implements IteratorAggregate, Statement ...@@ -290,7 +290,7 @@ final class MysqliStatement implements IteratorAggregate, Statement
if ($ret === true) { if ($ret === true) {
$values = []; $values = [];
foreach ($this->rowBindedValues as $v) { foreach ($this->rowBoundValues as $v) {
$values[] = $v; $values[] = $v;
} }
......
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