Implement all setUser methods.

This commit is contained in:
James Cole
2017-01-30 16:42:58 +01:00
parent 84e380e4d0
commit 311c1a3c84
17 changed files with 120 additions and 24 deletions

View File

@@ -108,8 +108,8 @@ class AccountTasker implements AccountTaskerInterface
*/
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): array
{
$ids = $accounts->pluck('id')->toArray();
$yesterday = clone $start;
$ids = $accounts->pluck('id')->toArray();
$yesterday = clone $start;
$yesterday->subDay();
$startSet = Steam::balancesById($ids, $yesterday);
$endSet = Steam::balancesById($ids, $end);
@@ -155,6 +155,14 @@ class AccountTasker implements AccountTaskerInterface
return $return;
}
/**
* @param User $user
*/
public function setUser(User $user)
{
$this->user = $user;
}
/**
* Will return how much money has been going out (ie. spent) by the given account(s).
* Alternatively, will return how much money has been coming in (ie. earned) by the given accounts.