Skip to content

Commit

Permalink
Gravity: Add space after comma to escaped list values
Browse files Browse the repository at this point in the history
  • Loading branch information
pprkut committed Mar 30, 2023
1 parent 8e2dcd5 commit 5a0dd7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Lunr/Gravity/Database/DatabaseQueryEscaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function list_value($array_values)
return '';
}

return '(' . implode(',', $array_values) . ')';
return '(' . implode(', ', $array_values) . ')';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function testEscapeQueryValue(): void
public function testEscapeListValueSimpleArray(): void
{
$values = [ 'value1', 'value2' ];
$this->assertEquals('(value1,value2)', $this->class->list_value($values));
$this->assertEquals('(value1, value2)', $this->class->list_value($values));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function validValueEscaperProvider(): array
$escapers[] = [
'list_value',
[ 'A', 'B', 'C' ],
'(A,B,C)',
'(A, B, C)',
];

return $escapers;
Expand Down

0 comments on commit 5a0dd7f

Please sign in to comment.