@@ -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 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | public function getColumn(string $name, $dsq) : array |
451 | 451 | { |
452 | 452 | $col = []; |
453 | - if (! ($dsq instanceof mysqli_result)) { |
|
453 | + if (!($dsq instanceof mysqli_result)) { |
|
454 | 454 | $dsq = $this->query($dsq); |
455 | 455 | } |
456 | 456 | if ($dsq) { |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | public function getColumnNames($dsq) : array |
473 | 473 | { |
474 | 474 | $names = []; |
475 | - if (! ($dsq instanceof mysqli_result)) { |
|
475 | + if (!($dsq instanceof mysqli_result)) { |
|
476 | 476 | $dsq = $this->query($dsq); |
477 | 477 | } |
478 | 478 | if ($dsq) { |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | public function getValue($dsq) |
496 | 496 | { |
497 | 497 | $out = false; |
498 | - if (! ($dsq instanceof mysqli_result)) { |
|
498 | + if (!($dsq instanceof mysqli_result)) { |
|
499 | 499 | $dsq = $this->query($dsq); |
500 | 500 | } |
501 | 501 | if ($dsq) { |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | public function getTableMetaData(string $table) : array |
517 | 517 | { |
518 | 518 | $metadata = []; |
519 | - if (! empty($table)) { |
|
519 | + if (!empty($table)) { |
|
520 | 520 | $sql = 'SHOW FIELDS FROM ' . $table; |
521 | 521 | if ($result = $this->query($sql)) { |
522 | 522 | while ($row = $this->getRow($result)) { |
@@ -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 |