Fixed some issues for scrutiniser [skip ci]

This commit is contained in:
James Cole
2015-05-27 07:58:54 +02:00
parent e1cb9d387e
commit 7eba33e805
9 changed files with 8 additions and 8 deletions

View File

@@ -164,7 +164,7 @@ class TagController extends Controller
$state = $state == 'true' ? true : false; $state = $state == 'true' ? true : false;
Preferences::set('hideTagHelp', $state); Preferences::set('hideTagHelp', $state);
return Response::json(true); return Response::json([true]);
} }
/** /**

View File

@@ -154,7 +154,7 @@ class TransactionController extends Controller
} }
$preFilled['amount'] = $journal->actual_amount; $preFilled['amount'] = $journal->actual_amount;
$preFilled['account_id'] = $journal->assetAccount->id; $preFilled['account_id'] = $journal->asset_account->id;
$preFilled['expense_account'] = $transactions[0]->account->name; $preFilled['expense_account'] = $transactions[0]->account->name;
$preFilled['revenue_account'] = $transactions[1]->account->name; $preFilled['revenue_account'] = $transactions[1]->account->name;
$preFilled['account_from_id'] = $transactions[1]->account->id; $preFilled['account_from_id'] = $transactions[1]->account->id;
@@ -236,7 +236,7 @@ class TransactionController extends Controller
} }
} }
return Response::json(true); return Response::json([true]);
} }

View File

@@ -40,7 +40,6 @@ use Watson\Validating\ValidatingTrait;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Account whereVirtualBalanceEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Account whereVirtualBalanceEncrypted($value)
* @method static \FireflyIII\Models\Account accountTypeIn($types) * @method static \FireflyIII\Models\Account accountTypeIn($types)
* @method static \FireflyIII\Models\Account hasMetaValue($name, $value) * @method static \FireflyIII\Models\Account hasMetaValue($name, $value)
*
* @property boolean joinedAccountTypes * @property boolean joinedAccountTypes
* @property mixed startBalance * @property mixed startBalance
* @property mixed endBalance * @property mixed endBalance

View File

@@ -44,7 +44,6 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereSkip($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereSkip($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereNameEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereNameEncrypted($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereMatchEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Bill whereMatchEncrypted($value)
*
* @property mixed nextExpectedMatch * @property mixed nextExpectedMatch
* @property mixed lastFoundMatch * @property mixed lastFoundMatch
*/ */

View File

@@ -24,7 +24,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereName($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereName($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereUserId($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereEncrypted($value)
*
* @property mixed spent * @property mixed spent
* @property mixed lastActivity * @property mixed lastActivity
*/ */

View File

@@ -38,6 +38,7 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Reminder whereEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Reminder whereEncrypted($value)
* @method static \FireflyIII\Models\Reminder onDates($start, $end) * @method static \FireflyIII\Models\Reminder onDates($start, $end)
* @method static \FireflyIII\Models\Reminder today() * @method static \FireflyIII\Models\Reminder today()
* @property string description
*/ */
class Reminder extends Model class Reminder extends Model
{ {

View File

@@ -33,6 +33,8 @@ use Watson\Validating\ValidatingTrait;
* @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Transaction whereAmountEncrypted($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Transaction whereAmountEncrypted($value)
* @method static \FireflyIII\Models\Transaction after($date) * @method static \FireflyIII\Models\Transaction after($date)
* @method static \FireflyIII\Models\Transaction before($date) * @method static \FireflyIII\Models\Transaction before($date)
* @property mixed before
* @property mixed after
*/ */
class Transaction extends Model class Transaction extends Model
{ {

View File

@@ -241,7 +241,7 @@ class BillRepository implements BillRepositoryInterface
$end = Navigation::endOfPeriod(clone $start, $bill->repeat_freq); $end = Navigation::endOfPeriod(clone $start, $bill->repeat_freq);
$journalCount = $bill->transactionjournals()->before($end)->after($start)->count(); $journalCount = $bill->transactionjournals()->before($end)->after($start)->count();
if ($journalCount == 0) { if ($journalCount == 0) {
$finalDate = clone $start; $finalDate = new Carbon($start->format('Y-m-d'));
break; break;
} }
} }

View File

@@ -323,7 +323,7 @@ class TagRepository implements TagRepositoryInterface
$match = true; $match = true;
/** @var TransactionJournal $check */ /** @var TransactionJournal $check */
foreach ($tag->transactionjournals as $check) { foreach ($tag->transactionjournals as $check) {
if ($check->assetAccount->id != $journal->assetAccount->id) { if ($check->asset_account->id != $journal->asset_account->id) {
$match = false; $match = false;
} }
} }