Skip to content

Commit bdb6127

Browse files
committed
Fix formatting
1 parent c6eeea2 commit bdb6127

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/WP_SQLite_Translator_Tests.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3392,10 +3392,10 @@ public static function mysqlVariablesToTest() {
33923392
public function testCreateTableWithDefaultNowFunction() {
33933393
// Test the exact SQL from the issue
33943394
$this->assertQuery(
3395-
"CREATE TABLE `test_now_default` (
3395+
'CREATE TABLE `test_now_default` (
33963396
`id` int NOT NULL,
33973397
`updated` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP
3398-
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;"
3398+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;'
33993399
);
34003400

34013401
// 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
@@ -1131,13 +1131,13 @@ private function parse_mysql_create_table_field() {
11311131
array( 'DEFAULT' )
11321132
) ) {
11331133
// Consume the next token (could be a value, opening paren, etc.)
1134-
$default_token = $this->rewriter->consume();
1134+
$default_token = $this->rewriter->consume();
11351135
$result->default = $default_token->token;
11361136

11371137
// Check if the default value is wrapped in parentheses (for function calls like (now()))
11381138
if ( $default_token->matches( WP_SQLite_Token::TYPE_OPERATOR, null, array( '(' ) ) ) {
11391139
// Track parenthesis depth to consume the complete expression
1140-
$paren_depth = 1;
1140+
$paren_depth = 1;
11411141
$default_value = '(';
11421142

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

0 commit comments

Comments
 (0)