Skip to content

Commit e46372c

Browse files
wojteknJanJakes
authored andcommitted
Fix formatting
1 parent 36339ad commit e46372c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/WP_SQLite_Translator_Tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3528,10 +3528,10 @@ public static function mysqlVariablesToTest() {
35283528
public function testCreateTableWithDefaultNowFunction() {
35293529
// Test the exact SQL from the issue
35303530
$this->assertQuery(
3531-
"CREATE TABLE `test_now_default` (
3531+
'CREATE TABLE `test_now_default` (
35323532
`id` int NOT NULL,
35333533
`updated` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP
3534-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;"
3534+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;'
35353535
);
35363536

35373537
// Verify the table was created successfully

wp-includes/sqlite/class-wp-sqlite-translator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,13 +1151,13 @@ private function parse_mysql_create_table_field() {
11511151
array( 'DEFAULT' )
11521152
) ) {
11531153
// Consume the next token (could be a value, opening paren, etc.)
1154-
$default_token = $this->rewriter->consume();
1154+
$default_token = $this->rewriter->consume();
11551155
$result->default = $default_token->token;
11561156

11571157
// Check if the default value is wrapped in parentheses (for function calls like (now()))
11581158
if ( $default_token->matches( WP_SQLite_Token::TYPE_OPERATOR, null, array( '(' ) ) ) {
11591159
// Track parenthesis depth to consume the complete expression
1160-
$paren_depth = 1;
1160+
$paren_depth = 1;
11611161
$default_value = '(';
11621162

11631163
while ( $paren_depth > 0 && ( $next_token = $this->rewriter->consume() ) ) {

0 commit comments

Comments
 (0)