Skip to content

Commit

Permalink
Rename getRangeLexicographically to getLexicographicRange
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Feb 18, 2023
1 parent a3e8dc3 commit 07eb124
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/RedisSortedSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function getRangeByScoreWithScores(ScoreBoundary $start, ScoreBoundary $e
/**
* @return Promise<list<string>>
*/
public function getRangeLexicographically(string $start, string $end, ?RangeOptions $options = null): Promise
public function getLexicographicRange(string $start, string $end, ?RangeOptions $options = null): Promise
{
$query = ['zrange', $this->key, $start, $end, 'BYLEX'];
if ($options !== null) {
Expand Down
6 changes: 3 additions & 3 deletions test/RedisSortedSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ public function testLexSet(): \Generator
'd' => 0,
]));

$this->assertSame(['a', 'b', 'c'], yield $set->getRangeLexicographically('[a', '[c'));
$this->assertSame(['b', 'c'], yield $set->getRangeLexicographically('(a', '[c'));
$this->assertSame(['a', 'b', 'c'], yield $set->getRangeLexicographically('-', '(d'));
$this->assertSame(['a', 'b', 'c'], yield $set->getLexicographicRange('[a', '[c'));
$this->assertSame(['b', 'c'], yield $set->getLexicographicRange('(a', '[c'));
$this->assertSame(['a', 'b', 'c'], yield $set->getLexicographicRange('-', '(d'));
}
}

0 comments on commit 07eb124

Please sign in to comment.