Skip to content

Commit 35126fd

Browse files
committed
Handle decrement method.
1 parent 9eb8e84 commit 35126fd

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/Client/Client.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ public function handleEvent($event, $name = null)
104104
// increment
105105
if ('increment' === $conf) {
106106
$this->increment($this->replaceConfigPlaceholder($event, $name, $confValue), 1, $tags);
107+
} elseif ('decrement' === $conf) {
108+
$this->decrement($this->replaceConfigPlaceholder($event, $name, $confValue), 1, $tags);
107109
} elseif ('count' === $conf) {
108110
$value = $this->getEventValue($event, 'getValue');
109111
$this->count($this->replaceConfigPlaceholder($event, $name, $confValue), $value, 1, $tags);
@@ -202,7 +204,7 @@ private function replaceConfigPlaceholder($event, $eventName, $string)
202204
*
203205
* @param mixed $event
204206
* @param array $config
205-
*
207+
*
206208
* @return array of tags
207209
*/
208210
private function mergeTags($event, $config)

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private function addClientsSection($rootNode)
7070
->prototype('array')
7171
->children()
7272
->scalarNode('increment')->end()
73+
->scalarNode('decrement')->end()
7374
->scalarNode('count')->end()
7475
->scalarNode('gauge')->end()
7576
->scalarNode('set')->end()

0 commit comments

Comments
 (0)