mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 05:03:13 +00:00
Some code cleanup.
This commit is contained in:
@@ -214,7 +214,7 @@ class RuleController extends Controller
|
|||||||
$repository->reorderRuleActions($rule, $ids);
|
$repository->reorderRuleActions($rule, $ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Response::json(true);
|
return Response::json('true');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ class RuleController extends Controller
|
|||||||
$repository->reorderRuleTriggers($rule, $ids);
|
$repository->reorderRuleTriggers($rule, $ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Response::json(true);
|
return Response::json('true');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,8 +446,9 @@ class RuleController extends Controller
|
|||||||
{
|
{
|
||||||
$newIndex = 0;
|
$newIndex = 0;
|
||||||
$actions = [];
|
$actions = [];
|
||||||
if (is_array(Input::old('rule-action'))) {
|
/** @var array $oldActions */
|
||||||
foreach (Input::old('rule-action') as $index => $entry) {
|
$oldActions = is_array(Input::old('rule-action')) ? Input::old('rule-action') : [];
|
||||||
|
foreach ($oldActions as $index => $entry) {
|
||||||
$count = ($newIndex + 1);
|
$count = ($newIndex + 1);
|
||||||
$checked = isset(Input::old('rule-action-stop')[$index]) ? true : false;
|
$checked = isset(Input::old('rule-action-stop')[$index]) ? true : false;
|
||||||
$actions[] = view(
|
$actions[] = view(
|
||||||
@@ -461,7 +462,6 @@ class RuleController extends Controller
|
|||||||
)->render();
|
)->render();
|
||||||
$newIndex++;
|
$newIndex++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $actions;
|
return $actions;
|
||||||
}
|
}
|
||||||
@@ -473,8 +473,9 @@ class RuleController extends Controller
|
|||||||
{
|
{
|
||||||
$newIndex = 0;
|
$newIndex = 0;
|
||||||
$triggers = [];
|
$triggers = [];
|
||||||
if (is_array(Input::old('rule-trigger'))) {
|
/** @var array $oldTriggers */
|
||||||
foreach (Input::old('rule-trigger') as $index => $entry) {
|
$oldTriggers = is_array(Input::old('rule-trigger')) ? Input::old('rule-trigger') : [];
|
||||||
|
foreach ($oldTriggers as $index => $entry) {
|
||||||
$count = ($newIndex + 1);
|
$count = ($newIndex + 1);
|
||||||
$oldChecked = isset(Input::old('rule-trigger-stop')[$index]) ? true : false;
|
$oldChecked = isset(Input::old('rule-trigger-stop')[$index]) ? true : false;
|
||||||
$triggers[] = view(
|
$triggers[] = view(
|
||||||
@@ -488,7 +489,6 @@ class RuleController extends Controller
|
|||||||
)->render();
|
)->render();
|
||||||
$newIndex++;
|
$newIndex++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $triggers;
|
return $triggers;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ use Watson\Validating\ValidatingTrait;
|
|||||||
* @property string $endBalance
|
* @property string $endBalance
|
||||||
* @property float $difference
|
* @property float $difference
|
||||||
* @property Carbon $lastActivityDate
|
* @property Carbon $lastActivityDate
|
||||||
|
* @property float $piggyBalance
|
||||||
|
* @property float $percentage
|
||||||
*/
|
*/
|
||||||
class Account extends Model
|
class Account extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
* @property string $dateFormatted
|
* @property string $dateFormatted
|
||||||
* @property float $spent
|
* @property float $spent
|
||||||
* @property Carbon $lastActivity
|
* @property Carbon $lastActivity
|
||||||
|
* @property string $type
|
||||||
*/
|
*/
|
||||||
class Category extends Model
|
class Category extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|||||||
* @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
|
* @property-read Collection|PiggyBankRepetition[] $piggyBankRepetitions
|
||||||
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
|
* @property-read Collection|PiggyBankEvent[] $piggyBankEvents
|
||||||
* @property string $reminder
|
* @property string $reminder
|
||||||
|
* @property PiggyBankRepetition $currentRep
|
||||||
*/
|
*/
|
||||||
class PiggyBank extends Model
|
class PiggyBank extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ use Watson\Validating\ValidatingTrait;
|
|||||||
* @property-read TransactionJournal $transactionJournal
|
* @property-read TransactionJournal $transactionJournal
|
||||||
* @method static Builder|Transaction after($date)
|
* @method static Builder|Transaction after($date)
|
||||||
* @method static Builder|Transaction before($date)
|
* @method static Builder|Transaction before($date)
|
||||||
|
* @property float $before
|
||||||
|
* @property float $after
|
||||||
*/
|
*/
|
||||||
class Transaction extends Model
|
class Transaction extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ use Watson\Validating\ValidatingTrait;
|
|||||||
* @method static Builder|TransactionJournal onDate($date)
|
* @method static Builder|TransactionJournal onDate($date)
|
||||||
* @method static Builder|TransactionJournal transactionTypes($types)
|
* @method static Builder|TransactionJournal transactionTypes($types)
|
||||||
* @method static Builder|TransactionJournal withRelevantData()
|
* @method static Builder|TransactionJournal withRelevantData()
|
||||||
|
* @property string $type
|
||||||
*/
|
*/
|
||||||
class TransactionJournal extends Model
|
class TransactionJournal extends Model
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user