Commit 8010ed86 authored by till's avatar till

Update: incorporate feedback from @beberlei

 * fix typo
 * remove fluent interface
parent da6892e2
...@@ -36,7 +36,7 @@ class MysqliConnection implements Connection ...@@ -36,7 +36,7 @@ class MysqliConnection implements Connection
*/ */
private $_driverOptions; private $_driverOptions;
private $_supportedDriverOpions = 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,
...@@ -173,8 +173,6 @@ class MysqliConnection implements Connection ...@@ -173,8 +173,6 @@ class MysqliConnection implements Connection
* *
* @param array $driverOptions * @param array $driverOptions
* *
* @return MysqliConnection
*
* @throws MysqliException When one of of the options is not supported. * @throws MysqliException When one of of the options is not supported.
* @throws MysqliException When applying doesn't work - e.g. due to incorrect value. * @throws MysqliException When applying doesn't work - e.g. due to incorrect value.
*/ */
...@@ -186,7 +184,7 @@ class MysqliConnection implements Connection ...@@ -186,7 +184,7 @@ class MysqliConnection implements Connection
foreach ($driverOptions as $option => $value) { foreach ($driverOptions as $option => $value) {
if (!in_array($option, $this->_supportedDriverOpions)) { if (!in_array($option, $this->_supportedDriverOptions)) {
throw new MysqliException( throw new MysqliException(
sprintf($exceptionMsg, 'Unsupported', $option, $value) sprintf($exceptionMsg, 'Unsupported', $option, $value)
); );
...@@ -198,7 +196,5 @@ class MysqliConnection implements Connection ...@@ -198,7 +196,5 @@ class MysqliConnection implements Connection
); );
} }
} }
return $this;
} }
} }
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