Skip to content

Commit

Permalink
chore: make variant seed private, fix an errant space
Browse files Browse the repository at this point in the history
  • Loading branch information
sighphyre committed Oct 30, 2023
1 parent 270cf42 commit 9b3b8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Variant/DefaultVariantHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

final class DefaultVariantHandler implements VariantHandler
{
const VARIANT_HASH_SEED = 86028157;
private const VARIANT_HASH_SEED = 86028157;

public function __construct(
private readonly StickinessCalculator $stickinessCalculator,
Expand Down Expand Up @@ -96,7 +96,7 @@ private function calculateStickiness(
int $totalWeight
): int {
$stickiness = $variants[0]->getStickiness();
if ($stickiness !== Stickiness::DEFAULT ) {
if ($stickiness !== Stickiness::DEFAULT) {
$seed = $context->findContextValue($stickiness) ?? $this->randomString();
} else {
$seed = $context->getCurrentUserId()
Expand Down

0 comments on commit 9b3b8e6

Please sign in to comment.