Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Added $processCollection to the getForGraph method
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Sep 18, 2020
1 parent 9a6e8e3 commit 14a7944
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Contracts/StatisticsStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function getRecords(callable $processQuery = null, callable $processColle
* 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;
}
5 changes: 3 additions & 2 deletions src/Statistics/Stores/DatabaseStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ public function getRecords(callable $processQuery = null, callable $processColle
* 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);
Expand Down

0 comments on commit 14a7944

Please sign in to comment.