Skip to content

Commit 71d38c2

Browse files
committed
style fixes
1 parent b5068c0 commit 71d38c2

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

MysqliDb.php

+11-17
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public function rawQuery ($query, $bindParams = null)
308308
$this->_query = $query;
309309
$stmt = $this->_prepareQuery();
310310

311-
if (is_array($bindParams) === true) {
311+
if (is_array ($bindParams) === true) {
312312
foreach ($bindParams as $prop => $val) {
313313
$params[0] .= $this->_determineType($val);
314314
array_push($params, $bindParams[$prop]);
@@ -916,9 +916,8 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
916916

917917
// if $meta is false yet sqlstate is true, there's no sql error but the query is
918918
// most likely an update/insert/delete which doesn't produce any results
919-
if(!$meta && $stmt->sqlstate) {
919+
if(!$meta && $stmt->sqlstate)
920920
return array();
921-
}
922921

923922
$row = array();
924923
while ($field = $meta->fetch_field()) {
@@ -976,9 +975,8 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
976975
$totalCount = $stmt->fetch_row();
977976
$this->totalCount = $totalCount[0];
978977
}
979-
if ($this->returnType == 'Json') {
978+
if ($this->returnType == 'Json')
980979
return json_encode ($results);
981-
}
982980

983981
return $results;
984982
}
@@ -1189,9 +1187,8 @@ protected function _buildLimit ($numRows) {
11891187
*/
11901188
protected function _prepareQuery()
11911189
{
1192-
if (!$stmt = $this->mysqli()->prepare($this->_query)) {
1193-
throw new Exception("Problem preparing query ($this->_query) " . $this->mysqli()->error);
1194-
}
1190+
if (!$stmt = $this->mysqli()->prepare($this->_query))
1191+
throw new Exception ("Problem preparing query ($this->_query) " . $this->mysqli()->error);
11951192
if ($this->traceEnabled)
11961193
$this->traceStartQ = microtime (true);
11971194

@@ -1219,11 +1216,10 @@ protected function refValues(Array &$arr)
12191216
//Reference in the function arguments are required for HHVM to work
12201217
//https://github.com/facebook/hhvm/issues/5155
12211218
//Referenced data array is required by mysqli since PHP 5.3+
1222-
if (strnatcmp(phpversion(), '5.3') >= 0) {
1219+
if (strnatcmp (phpversion(), '5.3') >= 0) {
12231220
$refs = array();
1224-
foreach ($arr as $key => $value) {
1221+
foreach ($arr as $key => $value)
12251222
$refs[$key] = & $arr[$key];
1226-
}
12271223
return $refs;
12281224
}
12291225
return $arr;
@@ -1341,9 +1337,8 @@ public function now ($diff = null, $func = "NOW()") {
13411337
* @param int increment by int or float. 1 by default
13421338
*/
13431339
public function inc($num = 1) {
1344-
if(!is_numeric($num)){
1345-
throw new Exception('Argument supplied to inc must be a number');
1346-
}
1340+
if(!is_numeric($num))
1341+
throw new Exception ('Argument supplied to inc must be a number');
13471342
return Array ("[I]" => "+" . $num);
13481343
}
13491344

@@ -1352,9 +1347,8 @@ public function inc($num = 1) {
13521347
* @param int increment by int or float. 1 by default
13531348
*/
13541349
public function dec ($num = 1) {
1355-
if(!is_numeric($num)){
1356-
throw new Exception('Argument supplied to dec must be a number');
1357-
}
1350+
if(!is_numeric($num))
1351+
throw new Exception ('Argument supplied to dec must be a number');
13581352
return Array ("[I]" => "-" . $num);
13591353
}
13601354

0 commit comments

Comments
 (0)