@@ -42,4 +42,4 @@ |
||
42 | 42 | $reporters->add('coverage', $coverage); |
43 | 43 | }); |
44 | 44 | |
45 | -require_once realpath(rtrim(getcwd(), '\\/ ')).DIRECTORY_SEPARATOR.'spec'.DIRECTORY_SEPARATOR.'bootstrap.php'; |
|
45 | +require_once realpath(rtrim(getcwd(), '\\/ ')) . DIRECTORY_SEPARATOR . 'spec' . DIRECTORY_SEPARATOR . 'bootstrap.php'; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public bool $disable_keys = true; |
44 | 44 | public bool $extended_insert = true; |
45 | 45 | public bool $events = false; |
46 | - public bool $hex_blob = true; // faster than escaped onent |
|
46 | + public bool $hex_blob = true; // faster than escaped onent |
|
47 | 47 | public bool $insert_ignore = false; |
48 | 48 | public bool $no_autocommit = true; |
49 | 49 | public bool $no_create_db = false; |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | continue; |
98 | 98 | } |
99 | 99 | |
100 | - if (! property_exists($this, $key)) { |
|
100 | + if (!property_exists($this, $key)) { |
|
101 | 101 | $key = CaseConverter::toSnake($key); |
102 | 102 | } |
103 | 103 | |
104 | 104 | if (property_exists($this, $key)) { |
105 | - if ($key === 'message' && $val !== '' && ! str_starts_with($val, '-- ')) { |
|
105 | + if ($key === 'message' && $val !== '' && !str_starts_with($val, '-- ')) { |
|
106 | 106 | $val = '-- ' . $val; |
107 | 107 | } |
108 | 108 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function on(string $event, callable $callable): void |
25 | 25 | { |
26 | - if (! array_key_exists($event, $this->listeners)) { |
|
26 | + if (!array_key_exists($event, $this->listeners)) { |
|
27 | 27 | $this->listeners[$event] = []; |
28 | 28 | } |
29 | 29 |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | |
47 | 47 | $class = __NAMESPACE__ . '\\' . ucfirst(strtolower($type)) . 'Adapter'; |
48 | 48 | |
49 | - if (! class_exists($class) || $class === self::class) { |
|
49 | + if (!class_exists($class) || $class === self::class) { |
|
50 | 50 | throw Exception::invalidAdapter($type); |
51 | 51 | } |
52 | 52 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $args = func_get_args(); |
62 | 62 | |
63 | - if (! isset($args[0])) { |
|
63 | + if (!isset($args[0])) { |
|
64 | 64 | return ''; |
65 | 65 | } |
66 | 66 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public function createTable(array $row): string |
90 | 90 | { |
91 | - if (! isset($row['Create Table'])) { |
|
91 | + if (!isset($row['Create Table'])) { |
|
92 | 92 | throw new Exception('Error getting table code, unknown output'); |
93 | 93 | } |
94 | 94 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function createView(array $row): string |
158 | 158 | { |
159 | - if (! isset($row['Create View'])) { |
|
159 | + if (!isset($row['Create View'])) { |
|
160 | 160 | throw new Exception('Error getting view structure, unknown output'); |
161 | 161 | } |
162 | 162 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | */ |
183 | 183 | public function createTrigger(array $row): string |
184 | 184 | { |
185 | - if (! isset($row['SQL Original Statement'])) { |
|
185 | + if (!isset($row['SQL Original Statement'])) { |
|
186 | 186 | throw new Exception('Error getting trigger code, unknown output'); |
187 | 187 | } |
188 | 188 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public function createProcedure(array $row): string |
209 | 209 | { |
210 | - if (! isset($row['Create Procedure'])) { |
|
210 | + if (!isset($row['Create Procedure'])) { |
|
211 | 211 | throw new Exception('Error getting procedure code, unknown output. ' . |
212 | 212 | "Please check 'https://bugs.mysql.com/bug.php?id=14564'"); |
213 | 213 | } |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | */ |
241 | 241 | public function createFunction(array $row): string |
242 | 242 | { |
243 | - if (! isset($row['Create Function'])) { |
|
243 | + if (!isset($row['Create Function'])) { |
|
244 | 244 | throw new Exception('Error getting function code, unknown output. ' . |
245 | 245 | "Please check 'https://bugs.mysql.com/bug.php?id=14564'"); |
246 | 246 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | public function createEvent(array $row): string |
290 | 290 | { |
291 | - if (! isset($row['Create Event'])) { |
|
291 | + if (!isset($row['Create Event'])) { |
|
292 | 292 | throw new Exception('Error getting event code, unknown output. ' . |
293 | 293 | "Please check 'http://stackoverflow.com/questions/10853826/mysql-5-5-create-event-gives-syntax-error'"); |
294 | 294 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function createTable(array $row): string |
55 | 55 | { |
56 | - if (! isset($row['Create Table'])) { |
|
56 | + if (!isset($row['Create Table'])) { |
|
57 | 57 | throw new Exception('Error getting table code, unknown output'); |
58 | 58 | } |
59 | 59 |
@@ -64,17 +64,17 @@ discard block |
||
64 | 64 | */ |
65 | 65 | $handle = fopen($filename, 'rb'); |
66 | 66 | |
67 | - if (! $handle) { |
|
67 | + if (!$handle) { |
|
68 | 68 | throw Exception::failledToRead($filename); |
69 | 69 | } |
70 | 70 | |
71 | 71 | $buffer = ''; |
72 | 72 | |
73 | 73 | try { |
74 | - while (! feof($handle)) { |
|
74 | + while (!feof($handle)) { |
|
75 | 75 | $line = fgets($handle); |
76 | 76 | |
77 | - if (substr($line, 0, 2) === '--' || ! $line) { |
|
77 | + if (substr($line, 0, 2) === '--' || !$line) { |
|
78 | 78 | continue; // skip comments |
79 | 79 | } |
80 | 80 | |
@@ -116,17 +116,17 @@ discard block |
||
116 | 116 | $dest = $pathinfo['dirname'] . '/' . date('Ymd_His', time()) . '_' . $pathinfo['filename']; |
117 | 117 | |
118 | 118 | // Remove $dest file if exists |
119 | - if (file_exists($dest) && ! unlink($dest)) { |
|
119 | + if (file_exists($dest) && !unlink($dest)) { |
|
120 | 120 | return null; |
121 | 121 | } |
122 | 122 | |
123 | 123 | // Open gzipped and destination files in binary mode |
124 | 124 | $this->compressor->open($source, 'rb'); |
125 | - if (! $dstFile = fopen($dest, 'wb')) { |
|
125 | + if (!$dstFile = fopen($dest, 'wb')) { |
|
126 | 126 | return null; |
127 | 127 | } |
128 | 128 | |
129 | - if (! fwrite($dstFile, $this->compressor->read())) { |
|
129 | + if (!fwrite($dstFile, $this->compressor->read())) { |
|
130 | 130 | return null; |
131 | 131 | } |
132 | 132 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | return static::$snakeCache[$key]; |
51 | 51 | } |
52 | 52 | |
53 | - if (! ctype_lower($value)) { |
|
53 | + if (!ctype_lower($value)) { |
|
54 | 54 | $value = preg_replace('/\s+/u', '', ucwords($value)); |
55 | 55 | |
56 | 56 | $value = strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1_', $value)); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | $class = __NAMESPACE__ . '\\' . ucfirst(strtolower($compressor)) . 'Compressor'; |
26 | 26 | |
27 | - if (! class_exists($class) || $class === self::class) { |
|
27 | + if (!class_exists($class) || $class === self::class) { |
|
28 | 28 | throw Exception::invalidCompressor($compressor); |
29 | 29 | } |
30 | 30 |