@@ -167,13 +167,11 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | if ($parse) { |
| 169 | 169 | throw new DatabaseException($parse['message'] . "\nIN:" . $this->sql(), $parse['code']); |
| 170 | - } |
|
| 171 | - else { |
|
| 170 | + } else { |
|
| 172 | 171 | $code = $this->response()->http_code(); |
| 173 | 172 | $message = "HttpCode:" . $this->response()->http_code() . " ; " . $this->response()->error() . " ;" . $body; |
| 174 | 173 | } |
| 175 | - } |
|
| 176 | - else { |
|
| 174 | + } else { |
|
| 177 | 175 | $code = $error_no; |
| 178 | 176 | $message = $this->response()->error(); |
| 179 | 177 | } |
@@ -349,8 +347,12 @@ discard block |
||
| 349 | 347 | $this->init(); |
| 350 | 348 | if ($key) |
| 351 | 349 | { |
| 352 | - if (!is_array($this->statistics)) return null; |
|
| 353 | - if (!isset($this->statistics[$key])) return null; |
|
| 350 | + if (!is_array($this->statistics)) { |
|
| 351 | + return null; |
|
| 352 | + } |
|
| 353 | + if (!isset($this->statistics[$key])) { |
|
| 354 | + return null; |
|
| 355 | + } |
|
| 354 | 356 | return $this->statistics[$key]; |
| 355 | 357 | } |
| 356 | 358 | return $this->statistics; |
@@ -394,8 +396,7 @@ discard block |
||
| 394 | 396 | if ($key) { |
| 395 | 397 | if (isset($this->array_data[0][$key])) { |
| 396 | 398 | return $this->array_data[0][$key]; |
| 397 | - } |
|
| 398 | - else { |
|
| 399 | + } else { |
|
| 399 | 400 | return null; |
| 400 | 401 | } |
| 401 | 402 | } |
@@ -489,16 +490,14 @@ discard block |
||
| 489 | 490 | { |
| 490 | 491 | if (is_array($path)) { |
| 491 | 492 | $keys = $path; |
| 492 | - } |
|
| 493 | - else { |
|
| 493 | + } else { |
|
| 494 | 494 | $args = func_get_args(); |
| 495 | 495 | array_shift($args); |
| 496 | 496 | |
| 497 | 497 | if (sizeof($args) < 2) { |
| 498 | 498 | $separator = '.'; |
| 499 | 499 | $keys = explode($separator, $path); |
| 500 | - } |
|
| 501 | - else { |
|
| 500 | + } else { |
|
| 502 | 501 | $keys = $args; |
| 503 | 502 | } |
| 504 | 503 | } |
@@ -510,14 +509,15 @@ discard block |
||
| 510 | 509 | |
| 511 | 510 | if (isset($arr[$key])) { |
| 512 | 511 | $val = $arr[$key]; |
| 513 | - } |
|
| 514 | - else { |
|
| 512 | + } else { |
|
| 515 | 513 | $val = $key; |
| 516 | 514 | } |
| 517 | 515 | |
| 518 | 516 | $tree = array($val => $tree); |
| 519 | 517 | } |
| 520 | - if (!is_array($tree)) return []; |
|
| 518 | + if (!is_array($tree)) { |
|
| 519 | + return []; |
|
| 520 | + } |
|
| 521 | 521 | return $tree; |
| 522 | 522 | } |
| 523 | 523 | } |