@@ -308,7 +308,7 @@ public function rawQuery ($query, $bindParams = null)
308
308
$ this ->_query = $ query ;
309
309
$ stmt = $ this ->_prepareQuery ();
310
310
311
- if (is_array ($ bindParams ) === true ) {
311
+ if (is_array ($ bindParams ) === true ) {
312
312
foreach ($ bindParams as $ prop => $ val ) {
313
313
$ params [0 ] .= $ this ->_determineType ($ val );
314
314
array_push ($ params , $ bindParams [$ prop ]);
@@ -916,9 +916,8 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
916
916
917
917
// if $meta is false yet sqlstate is true, there's no sql error but the query is
918
918
// most likely an update/insert/delete which doesn't produce any results
919
- if (!$ meta && $ stmt ->sqlstate ) {
919
+ if (!$ meta && $ stmt ->sqlstate )
920
920
return array ();
921
- }
922
921
923
922
$ row = array ();
924
923
while ($ field = $ meta ->fetch_field ()) {
@@ -976,9 +975,8 @@ protected function _dynamicBindResults(mysqli_stmt $stmt)
976
975
$ totalCount = $ stmt ->fetch_row ();
977
976
$ this ->totalCount = $ totalCount [0 ];
978
977
}
979
- if ($ this ->returnType == 'Json ' ) {
978
+ if ($ this ->returnType == 'Json ' )
980
979
return json_encode ($ results );
981
- }
982
980
983
981
return $ results ;
984
982
}
@@ -1189,9 +1187,8 @@ protected function _buildLimit ($numRows) {
1189
1187
*/
1190
1188
protected function _prepareQuery ()
1191
1189
{
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 );
1195
1192
if ($ this ->traceEnabled )
1196
1193
$ this ->traceStartQ = microtime (true );
1197
1194
@@ -1219,11 +1216,10 @@ protected function refValues(Array &$arr)
1219
1216
//Reference in the function arguments are required for HHVM to work
1220
1217
//https://github.com/facebook/hhvm/issues/5155
1221
1218
//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 ) {
1223
1220
$ refs = array ();
1224
- foreach ($ arr as $ key => $ value ) {
1221
+ foreach ($ arr as $ key => $ value )
1225
1222
$ refs [$ key ] = & $ arr [$ key ];
1226
- }
1227
1223
return $ refs ;
1228
1224
}
1229
1225
return $ arr ;
@@ -1341,9 +1337,8 @@ public function now ($diff = null, $func = "NOW()") {
1341
1337
* @param int increment by int or float. 1 by default
1342
1338
*/
1343
1339
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 ' );
1347
1342
return Array ("[I] " => "+ " . $ num );
1348
1343
}
1349
1344
@@ -1352,9 +1347,8 @@ public function inc($num = 1) {
1352
1347
* @param int increment by int or float. 1 by default
1353
1348
*/
1354
1349
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 ' );
1358
1352
return Array ("[I] " => "- " . $ num );
1359
1353
}
1360
1354
0 commit comments