@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function __construct() |
24 | 24 | { |
25 | - if (! function_exists('gzopen')) { |
|
25 | + if (!function_exists('gzopen')) { |
|
26 | 26 | throw Exception::compressionDriverMissing('gzip'); |
27 | 27 | } |
28 | 28 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | { |
62 | 62 | $content = ''; |
63 | 63 | |
64 | - while (! gzeof($this->handler)) { |
|
64 | + while (!gzeof($this->handler)) { |
|
65 | 65 | // Read buffer-size bytes |
66 | 66 | $content .= gzread($this->handler, 4096); // read 4kb at a time |
67 | 67 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function __construct() |
24 | 24 | { |
25 | - if (! function_exists('bzopen')) { |
|
25 | + if (!function_exists('bzopen')) { |
|
26 | 26 | throw Exception::compressionDriverMissing('bzip2'); |
27 | 27 | } |
28 | 28 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $content = ''; |
56 | 56 | |
57 | - while (! feof($this->handler)) { |
|
57 | + while (!feof($this->handler)) { |
|
58 | 58 | // Read buffer-size bytes |
59 | 59 | $content .= fread($this->handler, 4096); // read 4kb at a time |
60 | 60 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function getTableWhere(string $tableName) |
163 | 163 | { |
164 | - if (! empty($this->tableWheres[$tableName])) { |
|
164 | + if (!empty($this->tableWheres[$tableName])) { |
|
165 | 165 | return $this->tableWheres[$tableName]; |
166 | 166 | } |
167 | 167 | if ($this->option->where !== '') { |
@@ -198,13 +198,13 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function getTableLimit(string $tableName) |
200 | 200 | { |
201 | - if (! isset($this->tableLimits[$tableName])) { |
|
201 | + if (!isset($this->tableLimits[$tableName])) { |
|
202 | 202 | return false; |
203 | 203 | } |
204 | 204 | |
205 | 205 | $limit = $this->tableLimits[$tableName]; |
206 | 206 | |
207 | - if (! is_numeric($limit)) { |
|
207 | + if (!is_numeric($limit)) { |
|
208 | 208 | return false; |
209 | 209 | } |
210 | 210 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | { |
229 | 229 | $header = ''; |
230 | 230 | |
231 | - if (! $this->option->skip_comments) { |
|
231 | + if (!$this->option->skip_comments) { |
|
232 | 232 | $divider = str_repeat('----------------------------------------------------', 2); |
233 | 233 | |
234 | 234 | // Some info about software, source and time |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $header .= "-- Database: {$this->database}" . PHP_EOL . |
245 | 245 | '-- Server version: ' . $this->pdo->getAttribute(PDO::ATTR_SERVER_VERSION) . ' Driver: ' . $this->driver . PHP_EOL; |
246 | 246 | |
247 | - if (! $this->option->skip_dump_date) { |
|
247 | + if (!$this->option->skip_dump_date) { |
|
248 | 248 | $header .= '-- ' . PHP_EOL . '-- Generated on: ' . date('r') . PHP_EOL; |
249 | 249 | } |
250 | 250 | if ('' !== $this->option->message) { |
@@ -264,10 +264,10 @@ discard block |
||
264 | 264 | { |
265 | 265 | $footer = ''; |
266 | 266 | |
267 | - if (! $this->option->skip_comments) { |
|
267 | + if (!$this->option->skip_comments) { |
|
268 | 268 | $footer .= '-- Dump completed'; |
269 | 269 | |
270 | - if (! $this->option->skip_dump_date) { |
|
270 | + if (!$this->option->skip_dump_date) { |
|
271 | 271 | $footer .= ' on: ' . date('r'); |
272 | 272 | } |
273 | 273 | |
@@ -504,10 +504,10 @@ discard block |
||
504 | 504 | */ |
505 | 505 | private function getTableStructure(string $tableName) |
506 | 506 | { |
507 | - if (! $this->option->no_create_info) { |
|
507 | + if (!$this->option->no_create_info) { |
|
508 | 508 | $ret = ''; |
509 | 509 | |
510 | - if (! $this->option->skip_comments) { |
|
510 | + if (!$this->option->skip_comments) { |
|
511 | 511 | $ret = '--' . PHP_EOL . |
512 | 512 | "-- Table structure for table `{$tableName}`" . PHP_EOL . |
513 | 513 | '--' . PHP_EOL . PHP_EOL; |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | */ |
570 | 570 | private function getViewStructureTable(string $viewName): void |
571 | 571 | { |
572 | - if (! $this->option->skip_comments) { |
|
572 | + if (!$this->option->skip_comments) { |
|
573 | 573 | $ret = '--' . PHP_EOL . |
574 | 574 | "-- Stand-In structure for view `{$viewName}`" . PHP_EOL . |
575 | 575 | '--' . PHP_EOL . PHP_EOL; |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | */ |
614 | 614 | private function getViewStructureView(string $viewName): void |
615 | 615 | { |
616 | - if (! $this->option->skip_comments) { |
|
616 | + if (!$this->option->skip_comments) { |
|
617 | 617 | $ret = '--' . PHP_EOL . |
618 | 618 | "-- View structure for view `{$viewName}`" . PHP_EOL . |
619 | 619 | '--' . PHP_EOL . PHP_EOL; |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | */ |
657 | 657 | private function getProcedureStructure(string $procedureName) |
658 | 658 | { |
659 | - if (! $this->option->skip_comments) { |
|
659 | + if (!$this->option->skip_comments) { |
|
660 | 660 | $ret = '--' . PHP_EOL . |
661 | 661 | "-- Dumping routines for database '" . $this->database . "'" . PHP_EOL . |
662 | 662 | '--' . PHP_EOL . PHP_EOL; |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | */ |
678 | 678 | private function getFunctionStructure(string $functionName) |
679 | 679 | { |
680 | - if (! $this->option->skip_comments) { |
|
680 | + if (!$this->option->skip_comments) { |
|
681 | 681 | $ret = '--' . PHP_EOL . |
682 | 682 | "-- Dumping routines for database '" . $this->database . "'" . PHP_EOL . |
683 | 683 | '--' . PHP_EOL . PHP_EOL; |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | */ |
700 | 700 | private function getEventStructure(string $eventName) |
701 | 701 | { |
702 | - if (! $this->option->skip_comments) { |
|
702 | + if (!$this->option->skip_comments) { |
|
703 | 703 | $ret = '--' . PHP_EOL . |
704 | 704 | "-- Dumping events for database '" . $this->database . "'" . PHP_EOL . |
705 | 705 | '--' . PHP_EOL . PHP_EOL; |
@@ -749,7 +749,7 @@ discard block |
||
749 | 749 | return 'NULL'; |
750 | 750 | } |
751 | 751 | if ($this->option->hex_blob && $colType['is_blob']) { |
752 | - if ($colType['type'] === 'bit' || ! empty($colValue)) { |
|
752 | + if ($colType['type'] === 'bit' || !empty($colValue)) { |
|
753 | 753 | return "0x{$colValue}"; |
754 | 754 | } |
755 | 755 | |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | foreach ($resultSet as $row) { |
814 | 814 | $count++; |
815 | 815 | $vals = $this->prepareColumnValues($tableName, $row); |
816 | - if ($onlyOnce || ! $this->option->extended_insert) { |
|
816 | + if ($onlyOnce || !$this->option->extended_insert) { |
|
817 | 817 | if ($this->option->complete_insert) { |
818 | 818 | $line .= "INSERT{$ignore} INTO `{$tableName}` (" . |
819 | 819 | implode(', ', $colNames) . |
@@ -827,7 +827,7 @@ discard block |
||
827 | 827 | } |
828 | 828 | |
829 | 829 | if ((strlen($line) > $this->option->net_buffer_length) |
830 | - || ! $this->option->extended_insert) { |
|
830 | + || !$this->option->extended_insert) { |
|
831 | 831 | $onlyOnce = true; |
832 | 832 | $this->compressor->write($line . ';' . PHP_EOL); |
833 | 833 | $line = ''; |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | */ |
851 | 851 | public function prepareListValues(string $tableName) |
852 | 852 | { |
853 | - if (! $this->option->skip_comments) { |
|
853 | + if (!$this->option->skip_comments) { |
|
854 | 854 | $this->compressor->write( |
855 | 855 | '--' . PHP_EOL . |
856 | 856 | "-- Dumping data for table `{$tableName}`" . PHP_EOL . |
@@ -858,7 +858,7 @@ discard block |
||
858 | 858 | ); |
859 | 859 | } |
860 | 860 | |
861 | - if ($this->option->lock_tables && ! $this->option->single_transaction) { |
|
861 | + if ($this->option->lock_tables && !$this->option->single_transaction) { |
|
862 | 862 | $this->adapter->lockTable($tableName); |
863 | 863 | } |
864 | 864 | |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | $this->compressor->write($this->adapter->endAddLockTable($tableName)); |
900 | 900 | } |
901 | 901 | |
902 | - if ($this->option->lock_tables && ! $this->option->single_transaction) { |
|
902 | + if ($this->option->lock_tables && !$this->option->single_transaction) { |
|
903 | 903 | $this->adapter->unlockTable($tableName); |
904 | 904 | } |
905 | 905 | |
@@ -912,7 +912,7 @@ discard block |
||
912 | 912 | |
913 | 913 | $this->compressor->write(PHP_EOL); |
914 | 914 | |
915 | - if (! $this->option->skip_comments) { |
|
915 | + if (!$this->option->skip_comments) { |
|
916 | 916 | $this->compressor->write( |
917 | 917 | '-- Dumped table `' . $tableName . "` with {$count} row(s)" . PHP_EOL . |
918 | 918 | '--' . PHP_EOL . PHP_EOL |
@@ -2,34 +2,34 @@ |
||
2 | 2 | |
3 | 3 | $ignoreErrors = []; |
4 | 4 | $ignoreErrors[] = [ |
5 | - // identifier: return.type |
|
6 | - 'message' => '#^Method Dimtrovich\\\\DbDumper\\\\Adapters\\\\Factory\\:\\:create\\(\\) should return static\\(Dimtrovich\\\\DbDumper\\\\Adapters\\\\Factory\\) but returns object\\.$#', |
|
7 | - 'count' => 1, |
|
8 | - 'path' => __DIR__ . '/src/Adapters/Factory.php', |
|
5 | + // identifier: return.type |
|
6 | + 'message' => '#^Method Dimtrovich\\\\DbDumper\\\\Adapters\\\\Factory\\:\\:create\\(\\) should return static\\(Dimtrovich\\\\DbDumper\\\\Adapters\\\\Factory\\) but returns object\\.$#', |
|
7 | + 'count' => 1, |
|
8 | + 'path' => __DIR__ . '/src/Adapters/Factory.php', |
|
9 | 9 | ]; |
10 | 10 | $ignoreErrors[] = [ |
11 | - // identifier: phpDoc.parseError |
|
12 | - 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableExport\\(callable\\(string \\$tableName, int \\$rowCount\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 42$#', |
|
13 | - 'count' => 1, |
|
14 | - 'path' => __DIR__ . '/src/Exporter.php', |
|
11 | + // identifier: phpDoc.parseError |
|
12 | + 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableExport\\(callable\\(string \\$tableName, int \\$rowCount\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 42$#', |
|
13 | + 'count' => 1, |
|
14 | + 'path' => __DIR__ . '/src/Exporter.php', |
|
15 | 15 | ]; |
16 | 16 | $ignoreErrors[] = [ |
17 | - // identifier: booleanOr.alwaysTrue |
|
18 | - 'message' => '#^Result of \\|\\| is always true\\.$#', |
|
19 | - 'count' => 1, |
|
20 | - 'path' => __DIR__ . '/src/Exporter.php', |
|
17 | + // identifier: booleanOr.alwaysTrue |
|
18 | + 'message' => '#^Result of \\|\\| is always true\\.$#', |
|
19 | + 'count' => 1, |
|
20 | + 'path' => __DIR__ . '/src/Exporter.php', |
|
21 | 21 | ]; |
22 | 22 | $ignoreErrors[] = [ |
23 | - // identifier: phpDoc.parseError |
|
24 | - 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableCreate\\(callable\\(string \\$tableName\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 42$#', |
|
25 | - 'count' => 1, |
|
26 | - 'path' => __DIR__ . '/src/Importer.php', |
|
23 | + // identifier: phpDoc.parseError |
|
24 | + 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableCreate\\(callable\\(string \\$tableName\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 42$#', |
|
25 | + 'count' => 1, |
|
26 | + 'path' => __DIR__ . '/src/Importer.php', |
|
27 | 27 | ]; |
28 | 28 | $ignoreErrors[] = [ |
29 | - // identifier: phpDoc.parseError |
|
30 | - 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableInsert\\(callable\\(string \\$tableName, int \\$rowCount\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 111$#', |
|
31 | - 'count' => 1, |
|
32 | - 'path' => __DIR__ . '/src/Importer.php', |
|
29 | + // identifier: phpDoc.parseError |
|
30 | + 'message' => '#^PHPDoc tag @method has invalid value \\(void onTableInsert\\(callable\\(string \\$tableName, int \\$rowCount\\) \\$callback\\)\\)\\: Unexpected token "\\(", expected variable at offset 111$#', |
|
31 | + 'count' => 1, |
|
32 | + 'path' => __DIR__ . '/src/Importer.php', |
|
33 | 33 | ]; |
34 | 34 | |
35 | 35 | return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | $ignoreErrors = []; |
4 | 4 | $ignoreErrors[] = [ |