| @@ 89-98 (lines=10) @@ | ||
| 86 | /** |
|
| 87 | * {@inheritdoc} |
|
| 88 | */ |
|
| 89 | public function inc(string $name, int $delta = 1): int |
|
| 90 | { |
|
| 91 | if (!$this->has($name)) { |
|
| 92 | $this->set($name, $delta); |
|
| 93 | ||
| 94 | return $delta; |
|
| 95 | } |
|
| 96 | ||
| 97 | return $this->driver->increment($name, $delta); |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * {@inheritdoc} |
|
| @@ 84-93 (lines=10) @@ | ||
| 81 | /** |
|
| 82 | * {@inheritdoc} |
|
| 83 | */ |
|
| 84 | public function inc(string $name, int $delta = 1): int |
|
| 85 | { |
|
| 86 | if (!$this->has($name)) { |
|
| 87 | $this->set($name, $delta); |
|
| 88 | ||
| 89 | return $delta; |
|
| 90 | } |
|
| 91 | ||
| 92 | return $this->driver->increment($name, $delta); |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * {@inheritdoc} |
|