@@ -302,8 +302,8 @@ discard block |
||
| 302 | 302 | $line = ''; |
| 303 | 303 | foreach ($row as $i => $field) |
| 304 | 304 | { |
| 305 | - if ($i>0) $line .= ' '; |
|
| 306 | - $line .= str_pad((string)$field, $fields[$i]->max_length); |
|
| 305 | + if ($i > 0) $line .= ' '; |
|
| 306 | + $line .= str_pad((string) $field, $fields[$i]->max_length); |
|
| 307 | 307 | } |
| 308 | 308 | echo date('Y-m-d H:i:s'), ' ', $line, "\n"; |
| 309 | 309 | $n++; |
@@ -634,16 +634,16 @@ discard block |
||
| 634 | 634 | $query = "show variables like 'max_allowed_packet'"; |
| 635 | 635 | $maxAllowedPacket = $this->executeRow1($query); |
| 636 | 636 | |
| 637 | - $this->maxAllowedPacket = (int)$maxAllowedPacket['Value']; |
|
| 637 | + $this->maxAllowedPacket = (int) $maxAllowedPacket['Value']; |
|
| 638 | 638 | |
| 639 | 639 | // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB |
| 640 | 640 | // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of |
| 641 | 641 | // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size |
| 642 | 642 | // $maxAllowedPacket bytes. |
| 643 | - $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024); |
|
| 643 | + $this->chunkSize = (int) min($this->maxAllowedPacket - 8, 1024 * 1024); |
|
| 644 | 644 | } |
| 645 | 645 | |
| 646 | - return (int)$this->maxAllowedPacket; |
|
| 646 | + return (int) $this->maxAllowedPacket; |
|
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | { |
| 724 | 724 | if ($value===null || $value==='') return 'null'; |
| 725 | 725 | |
| 726 | - if (is_int($value) || is_float($value)) return (string)$value; |
|
| 726 | + if (is_int($value) || is_float($value)) return (string) $value; |
|
| 727 | 727 | |
| 728 | 728 | return "'".$this->mysqli->real_escape_string($value)."'"; |
| 729 | 729 | } |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | { |
| 741 | 741 | if ($value===null) return 'null'; |
| 742 | 742 | |
| 743 | - return (string)$value; |
|
| 743 | + return (string) $value; |
|
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -755,7 +755,7 @@ discard block |
||
| 755 | 755 | { |
| 756 | 756 | if ($value===null) return 'null'; |
| 757 | 757 | |
| 758 | - return (string)$value; |
|
| 758 | + return (string) $value; |
|
| 759 | 759 | } |
| 760 | 760 | |
| 761 | 761 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -1027,7 +1027,7 @@ discard block |
||
| 1027 | 1027 | { |
| 1028 | 1028 | $n = strlen($data); |
| 1029 | 1029 | $p = 0; |
| 1030 | - while ($p<$n) |
|
| 1030 | + while ($p < $n) |
|
| 1031 | 1031 | { |
| 1032 | 1032 | $success = @$statement->send_long_data($paramNr, substr($data, $p, $this->chunkSize)); |
| 1033 | 1033 | if (!$success) throw $this->dataLayerError('mysqli_stmt::send_long_data'); |
@@ -1067,13 +1067,13 @@ discard block |
||
| 1067 | 1067 | foreach ($columns as $column) |
| 1068 | 1068 | { |
| 1069 | 1069 | $separator .= str_repeat('-', $column['length'] + 2).'+'; |
| 1070 | - $spaces = ($column['length'] + 2) - mb_strlen((string)$column['header']); |
|
| 1070 | + $spaces = ($column['length'] + 2) - mb_strlen((string) $column['header']); |
|
| 1071 | 1071 | |
| 1072 | - $spacesLeft = (int)floor($spaces / 2); |
|
| 1073 | - $spacesRight = (int)ceil($spaces / 2); |
|
| 1072 | + $spacesLeft = (int) floor($spaces / 2); |
|
| 1073 | + $spacesRight = (int) ceil($spaces / 2); |
|
| 1074 | 1074 | |
| 1075 | - $fillerLeft = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : ''; |
|
| 1076 | - $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : ''; |
|
| 1075 | + $fillerLeft = ($spacesLeft > 0) ? str_repeat(' ', $spacesLeft) : ''; |
|
| 1076 | + $fillerRight = ($spacesRight > 0) ? str_repeat(' ', $spacesRight) : ''; |
|
| 1077 | 1077 | |
| 1078 | 1078 | $header .= $fillerLeft.$column['header'].$fillerRight.'|'; |
| 1079 | 1079 | } |
@@ -1092,7 +1092,7 @@ discard block |
||
| 1092 | 1092 | */ |
| 1093 | 1093 | private function executeTableShowTableColumn(array $column, $value): void |
| 1094 | 1094 | { |
| 1095 | - $spaces = str_repeat(' ', $column['length'] - mb_strlen((string)$value)); |
|
| 1095 | + $spaces = str_repeat(' ', $column['length'] - mb_strlen((string) $value)); |
|
| 1096 | 1096 | |
| 1097 | 1097 | switch ($column['type']) |
| 1098 | 1098 | { |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | if ($this->currentSqlMode!==$this->canonicalSqlModeWithOracle) |
| 92 | 92 | { |
| 93 | 93 | $this->dl->setSqlMode($this->canonicalSqlModeWithOracle); |
| 94 | - $this->currentSqlMode = (string)$this->canonicalSqlModeWithOracle; |
|
| 94 | + $this->currentSqlMode = (string) $this->canonicalSqlModeWithOracle; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |