Skip to content

Commit 16e2f8a

Browse files
committed
Fixes issue with odd behaviour with initial value.
1 parent e369537 commit 16e2f8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AbstractCounter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function inc($step = 1)
7474
return $this->client->increment(
7575
$this->getKey(),
7676
$step,
77-
$this->getInitialValue(),
77+
$this->getInitialValue() + 1,
7878
$this->getExpiry()
7979
);
8080
}
@@ -138,4 +138,4 @@ protected function getExpiry()
138138
* @return string
139139
*/
140140
abstract protected function getKey();
141-
}
141+
}

0 commit comments

Comments
 (0)