@@ -125,14 +125,14 @@ |
||
| 125 | 125 | $out .= '<fieldset style="text-align:left">'; |
| 126 | 126 | $out .= '<legend>Query ' . $i . ' - ' . $query['time'] . '</legend>'; |
| 127 | 127 | $out .= $query['sql'] . '<br><br>'; |
| 128 | - if (! empty($query['element'])) { |
|
| 128 | + if (!empty($query['element'])) { |
|
| 129 | 129 | $out .= $query['element']['type'] . ' => ' . $query['element']['name'] . '<br>'; |
| 130 | 130 | } |
| 131 | - if (! empty($query['event'])) { |
|
| 131 | + if (!empty($query['event'])) { |
|
| 132 | 132 | $out .= 'Current Event => ' . $query['event'] . '<br>'; |
| 133 | 133 | } |
| 134 | 134 | $out .= 'Affected Rows => ' . $query['rows'] . '<br>'; |
| 135 | - if (! empty($query['path'])) { |
|
| 135 | + if (!empty($query['path'])) { |
|
| 136 | 136 | $out .= 'Functions Path => ' . $query['path'] . '<br>'; |
| 137 | 137 | } |
| 138 | 138 | /*$out .= 'Functions Path => ' . $query['path']['method'] . '<br>'; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function prepareDate(int $timestamp, string $fieldType = 'DATETIME') |
| 31 | 31 | { |
| 32 | 32 | $date = false; |
| 33 | - if (! empty($timestamp) && $timestamp > 0) { |
|
| 33 | + if (!empty($timestamp) && $timestamp > 0) { |
|
| 34 | 34 | switch ($fieldType) { |
| 35 | 35 | case 'DATE': |
| 36 | 36 | $date = date('Y-m-d', $timestamp); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (\is_array($data)) { |
| 61 | 61 | $tmp = []; |
| 62 | 62 | foreach ($data as $alias => $field) { |
| 63 | - $tmp[] = ($alias !== $field && ! \is_int($alias)) ? ($field . ' as `' . $alias . '`') : $field; |
|
| 63 | + $tmp[] = ($alias !== $field && !\is_int($alias)) ? ($field . ' as `' . $alias . '`') : $field; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $data = implode(',', $tmp); |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - if (! \is_scalar($values)) { |
|
| 139 | + if (!\is_scalar($values)) { |
|
| 140 | 140 | throw (new Exceptions\InvaludFieldException('values')) |
| 141 | 141 | ->setData($values); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - if (($fields = $this->checkFields($fields, $maxLevel, $skipFieldNames))=== false) { |
|
| 144 | + if (($fields = $this->checkFields($fields, $maxLevel, $skipFieldNames)) === false) { |
|
| 145 | 145 | throw (new Exceptions\InvaludFieldException('fields name')) |
| 146 | 146 | ->setData($data); |
| 147 | 147 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | if (\is_array($fields) && $skipFieldNames === false) { |
| 166 | 166 | $onlyNumbers = true; |
| 167 | 167 | foreach ($fields as $name) { |
| 168 | - if (! \is_int($name)) { |
|
| 168 | + if (!\is_int($name)) { |
|
| 169 | 169 | $onlyNumbers = false; |
| 170 | 170 | break; |
| 171 | 171 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | $data = implode(' ', $tmp); |
| 218 | 218 | } |
| 219 | - if (! is_scalar($data) || empty($data)) { |
|
| 219 | + if (!is_scalar($data) || empty($data)) { |
|
| 220 | 220 | throw new Exceptions\TableNotDefinedException($data); |
| 221 | 221 | } |
| 222 | 222 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | $data = implode(' ', $data); |
| 234 | 234 | } |
| 235 | 235 | $data = trim($data); |
| 236 | - if (! empty($data) && stripos($data, 'WHERE') !== 0) { |
|
| 236 | + if (!empty($data) && stripos($data, 'WHERE') !== 0) { |
|
| 237 | 237 | $data = "WHERE {$data}"; |
| 238 | 238 | } |
| 239 | 239 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | protected function prepareOrder($data) : string |
| 248 | 248 | { |
| 249 | 249 | $data = trim($data); |
| 250 | - if (! empty($data) && stripos($data, 'ORDER') !== 0) { |
|
| 250 | + if (!empty($data) && stripos($data, 'ORDER') !== 0) { |
|
| 251 | 251 | $data = "ORDER BY {$data}"; |
| 252 | 252 | } |
| 253 | 253 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | protected function prepareLimit($data) : string |
| 262 | 262 | { |
| 263 | 263 | $data = trim($data); |
| 264 | - if (! empty($data) && stripos($data, 'LIMIT') !== 0) { |
|
| 264 | + if (!empty($data) && stripos($data, 'LIMIT') !== 0) { |
|
| 265 | 265 | $data = "LIMIT {$data}"; |
| 266 | 266 | } |
| 267 | 267 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function getConnect() : mysqli |
| 82 | 82 | { |
| 83 | - if (! $this->isConnected()) { |
|
| 83 | + if (!$this->isConnected()) { |
|
| 84 | 84 | return $this->connect(); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | throw new Exceptions\ConnectException($this->conn->connect_error); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - if (! $this->isConnected()) { |
|
| 110 | + if (!$this->isConnected()) { |
|
| 111 | 111 | throw new Exceptions\ConnectException( |
| 112 | 112 | $this->getLastError() ?: 'Failed to create the database connection!' |
| 113 | 113 | ); |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | * @param int $col |
| 383 | 383 | * @return string|null |
| 384 | 384 | */ |
| 385 | - public function fieldName(mysqli_result $result, $col = 0) :? string |
|
| 385 | + public function fieldName(mysqli_result $result, $col = 0) : ? string |
|
| 386 | 386 | { |
| 387 | 387 | $field = $result->fetch_field_direct($col); |
| 388 | 388 | |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | { |
| 452 | 452 | $col = []; |
| 453 | 453 | |
| 454 | - if (! ($result instanceof mysqli_result)) { |
|
| 454 | + if (!($result instanceof mysqli_result)) { |
|
| 455 | 455 | $result = $this->query($result); |
| 456 | 456 | } |
| 457 | 457 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | { |
| 476 | 476 | $names = []; |
| 477 | 477 | |
| 478 | - if (! ($result instanceof mysqli_result)) { |
|
| 478 | + if (!($result instanceof mysqli_result)) { |
|
| 479 | 479 | $result = $this->query($result); |
| 480 | 480 | } |
| 481 | 481 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | { |
| 501 | 501 | $out = false; |
| 502 | 502 | |
| 503 | - if (! ($result instanceof mysqli_result)) { |
|
| 503 | + if (!($result instanceof mysqli_result)) { |
|
| 504 | 504 | $result = $this->query($result); |
| 505 | 505 | } |
| 506 | 506 | |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | public function getTableMetaData(string $table) : array |
| 523 | 523 | { |
| 524 | 524 | $metadata = []; |
| 525 | - if (! empty($table)) { |
|
| 525 | + if (!empty($table)) { |
|
| 526 | 526 | $sql = 'SHOW FIELDS FROM ' . $table; |
| 527 | 527 | $result = $this->query($sql); |
| 528 | 528 | if ($result instanceof mysqli_result) { |