Some refactoring.

This commit is contained in:
James Cole
2014-12-30 18:44:58 +01:00
parent 94fcfacec4
commit 8c3ae40de1
26 changed files with 327 additions and 329 deletions

View File

@@ -1,6 +1,7 @@
<?php
namespace FireflyIII\Shared\Toolkit;
use Carbon\Carbon;
use FireflyIII\Exception\FireflyException;

View File

@@ -23,7 +23,7 @@ class Steam
*/
public function balance(\Account $account, Carbon $date = null)
{
\Log::debug('Now in Steam::balance() for account #' . $account->id.' ('.$account->name.')');
\Log::debug('Now in Steam::balance() for account #' . $account->id . ' (' . $account->name . ')');
if (is_null($date)) {
$key = 'account.' . $account->id . '.latestBalance';
} else {
@@ -33,7 +33,7 @@ class Steam
// TODO find a way to reliably remove cache entries for accounts.
#return \Cache::get($key);
}
$date = is_null($date) ? Carbon::now() : $date;
$date = is_null($date) ? Carbon::now() : $date;
\Log::debug('Now reached the moment we fire the query.');
$balance = floatval(
$account->transactions()->leftJoin(