Skip to content

Commit

Permalink
Merge pull request #63 from fracz/patch-1
Browse files Browse the repository at this point in the history
Implement reset() method in StatsdDataCollector
  • Loading branch information
Oliboy50 authored Jan 17, 2018
2 parents f5ca7cb + 475fc1b commit 70bc097
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/DataCollector/StatsdDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@ class StatsdDataCollector extends DataCollector
*/
public function __construct()
{
$this->statsdClients = [];
$this->data['clients'] = [];
$this->data['operations'] = 0;
$this->reset();
}

/**
* Reset the data collector to initial state
*/
public function reset()
{
$this->statsdClients = [];
$this->data = [
'clients' => [],
'operations' => 0,
];
}

/**
Expand Down

0 comments on commit 70bc097

Please sign in to comment.