diff --git a/src/Contracts/StatisticsStore.php b/src/Contracts/StatisticsStore.php index a5f6002..dc29a14 100644 --- a/src/Contracts/StatisticsStore.php +++ b/src/Contracts/StatisticsStore.php @@ -48,7 +48,8 @@ interface StatisticsStore * format that is easily to read for graphs. * * @param callable $processQuery + * @param callable $processCollection * @return array */ - public function getForGraph(callable $processQuery = null): array; + public function getForGraph(callable $processQuery = null, callable $processCollection = null): array; } diff --git a/src/Statistics/Stores/DatabaseStore.php b/src/Statistics/Stores/DatabaseStore.php index 2a36529..042e72b 100644 --- a/src/Statistics/Stores/DatabaseStore.php +++ b/src/Statistics/Stores/DatabaseStore.php @@ -86,12 +86,13 @@ class DatabaseStore implements StatisticsStore * format that is easily to read for graphs. * * @param callable $processQuery + * @param callable $processCollection * @return array */ - public function getForGraph(callable $processQuery = null): array + public function getForGraph(callable $processQuery = null, callable $processCollection = null): array { $statistics = collect( - $this->getRecords($processQuery) + $this->getRecords($processQuery, $processCollection) ); return $this->statisticsToGraph($statistics);