Even more code cleanup.

This commit is contained in:
James Cole
2014-08-10 19:02:24 +02:00
parent 80c1184eac
commit 41562f8f6d
21 changed files with 474 additions and 445 deletions

View File

@@ -27,9 +27,6 @@ class Chart implements ChartInterface
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
while ($current <= $end) {
\Log::debug(
'Now at day: ' . $current . '(' . $current->timestamp . '), (' . ($current->timestamp * 1000) . ') '
);
if ($current > $today) {
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
} else {
@@ -118,9 +115,6 @@ class Chart implements ChartInterface
}]
)->orderBy('name', 'ASC')->get();
$limitInPeriod = 'Envelope for (empty)';
$spentInPeriod = 'Spent in (empty)';
foreach ($budgets as $budget) {
$budget->count = 0;
foreach ($budget->limits as $limit) {

View File

@@ -3,6 +3,7 @@
namespace Firefly\Helper\Form;
use Illuminate\Events\Dispatcher;
/**
* Class FormTrigger
*

View File

@@ -142,6 +142,7 @@ class MigrationHelper implements MigrationHelperInterface
foreach ($this->JSON->components as $entry) {
switch ($entry->type->type) {
case 'beneficiary':
/** @noinspection PhpParamsInspection */
$beneficiary = $this->_importBeneficiary($entry, $beneficiaryAT);
$this->map['accounts'][$entry->id] = $beneficiary;
break;

View File

@@ -62,6 +62,8 @@ class EloquentAccountRepository implements AccountRepositoryInterface
}
$type = \AccountType::where('description', 'Beneficiary account')->first();
/** @noinspection PhpParamsInspection */
return $this->createOrFind($name, $type);
}

View File

@@ -122,7 +122,7 @@ class EloquentTransactionJournalRepository implements TransactionJournalReposito
$fromTransaction->amount = $amountFrom;
if (!$fromTransaction->validate()) {
throw new FireflyException('Cannot create valid transaction (from): ' . $fromTransaction->errors()->first(
));
));
}
$fromTransaction->save();
@@ -141,6 +141,7 @@ class EloquentTransactionJournalRepository implements TransactionJournalReposito
return $journal;
}
/**
* @param $journalId
*