Commit 9a936b16 authored by till's avatar till

Update: incorporate CS fixes (h/t @stof)

parent 8010ed86
...@@ -34,9 +34,9 @@ class MysqliConnection implements Connection ...@@ -34,9 +34,9 @@ class MysqliConnection implements Connection
/** /**
* @var array * @var array
*/ */
private $_driverOptions; private $driverOptions;
private $_supportedDriverOptions = array( private $supportedDriverOptions = array(
\MYSQLI_OPT_CONNECT_TIMEOUT, \MYSQLI_OPT_CONNECT_TIMEOUT,
\MYSQLI_OPT_LOCAL_INFILE, \MYSQLI_OPT_LOCAL_INFILE,
\MYSQLI_INIT_COMMAND, \MYSQLI_INIT_COMMAND,
...@@ -178,13 +178,13 @@ class MysqliConnection implements Connection ...@@ -178,13 +178,13 @@ class MysqliConnection implements Connection
*/ */
public function setDriverOptions(array $driverOptions = array()) public function setDriverOptions(array $driverOptions = array())
{ {
$this->_driverOptions = $driverOptions; $this->driverOptions = $driverOptions;
static $exceptionMsg = "%s option '%s' with value '%s'"; static $exceptionMsg = "%s option '%s' with value '%s'";
foreach ($driverOptions as $option => $value) { foreach ($driverOptions as $option => $value) {
if (!in_array($option, $this->_supportedDriverOptions)) { if (!in_array($option, $this->supportedDriverOptions)) {
throw new MysqliException( throw new MysqliException(
sprintf($exceptionMsg, 'Unsupported', $option, $value) sprintf($exceptionMsg, 'Unsupported', $option, $value)
); );
......
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