mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-29 06:34:37 +00:00 
			
		
		
		
	Some cleaning up courtesy of PHPStorm.
This commit is contained in:
		| @@ -24,13 +24,15 @@ class Kernel extends ConsoleKernel | |||||||
|      * |      * | ||||||
|      * @var array |      * @var array | ||||||
|      */ |      */ | ||||||
|     protected $commands = [ |     protected $commands | ||||||
|     ]; |         = [ | ||||||
|  |         ]; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Define the application's command schedule. |      * Define the application's command schedule. | ||||||
|      * |      * | ||||||
|      * @param  \Illuminate\Console\Scheduling\Schedule  $schedule |      * @param  \Illuminate\Console\Scheduling\Schedule $schedule | ||||||
|  |      * | ||||||
|      * @return void |      * @return void | ||||||
|      * |      * | ||||||
|      * @SuppressWarnings(PHPMD.UnusedFormalParameters) |      * @SuppressWarnings(PHPMD.UnusedFormalParameters) | ||||||
|   | |||||||
| @@ -35,7 +35,7 @@ class ChartJsBillChartGenerator implements BillChartGenerator | |||||||
|                 'color'     => 'rgba(0, 141, 76, 0.7)', |                 'color'     => 'rgba(0, 141, 76, 0.7)', | ||||||
|                 'highlight' => 'rgba(0, 141, 76, 0.9)', |                 'highlight' => 'rgba(0, 141, 76, 0.9)', | ||||||
|                 'label'     => trans('firefly.paid'), |                 'label'     => trans('firefly.paid'), | ||||||
|             ] |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         return $data; |         return $data; | ||||||
|   | |||||||
| @@ -28,12 +28,12 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.spent'), |                     'label' => trans('firefly.spent'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ], |                 ], | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.earned'), |                     'label' => trans('firefly.earned'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
| @@ -95,8 +95,8 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.spent'), |                     'label' => trans('firefly.spent'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|         foreach ($entries as $entry) { |         foreach ($entries as $entry) { | ||||||
|   | |||||||
| @@ -31,8 +31,8 @@ class ChartJsPiggyBankChartGenerator implements PiggyBankChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => 'Diff', |                     'label' => 'Diff', | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|         $sum  = '0'; |         $sum  = '0'; | ||||||
|   | |||||||
| @@ -27,12 +27,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.income'), |                     'label' => trans('firefly.income'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ], |                 ], | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.expenses'), |                     'label' => trans('firefly.expenses'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
| @@ -60,12 +60,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.income'), |                     'label' => trans('firefly.income'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ], |                 ], | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.expenses'), |                     'label' => trans('firefly.expenses'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|         $data['datasets'][0]['data'][] = round($income, 2); |         $data['datasets'][0]['data'][] = round($income, 2); | ||||||
| @@ -92,12 +92,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.income'), |                     'label' => trans('firefly.income'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ], |                 ], | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.expenses'), |                     'label' => trans('firefly.expenses'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
| @@ -126,12 +126,12 @@ class ChartJsReportChartGenerator implements ReportChartGenerator | |||||||
|             'datasets' => [ |             'datasets' => [ | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.income'), |                     'label' => trans('firefly.income'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ], |                 ], | ||||||
|                 [ |                 [ | ||||||
|                     'label' => trans('firefly.expenses'), |                     'label' => trans('firefly.expenses'), | ||||||
|                     'data'  => [] |                     'data'  => [], | ||||||
|                 ] |                 ], | ||||||
|             ], |             ], | ||||||
|         ]; |         ]; | ||||||
|         $data['datasets'][0]['data'][] = round($income, 2); |         $data['datasets'][0]['data'][] = round($income, 2); | ||||||
|   | |||||||
| @@ -74,7 +74,7 @@ class FireRulesForStore | |||||||
|  |  | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| //        echo 'Done processing rules. See log.'; |         //        echo 'Done processing rules. See log.'; | ||||||
| //        exit; |         //        exit; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -8,6 +8,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| namespace FireflyIII\Handlers\Events; | namespace FireflyIII\Handlers\Events; | ||||||
|  |  | ||||||
| use FireflyIII\Events\TransactionJournalUpdated; | use FireflyIII\Events\TransactionJournalUpdated; | ||||||
| use Log; | use Log; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ class CategoryName extends BasicConverter implements ConverterInterface | |||||||
|             $category = Category::firstOrCreateEncrypted( |             $category = Category::firstOrCreateEncrypted( | ||||||
|                 [ |                 [ | ||||||
|                     'name'    => $this->value, |                     'name'    => $this->value, | ||||||
|                     'user_id' => Auth::user()->id |                     'user_id' => Auth::user()->id, | ||||||
|                 ] |                 ] | ||||||
|             ); |             ); | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -64,7 +64,7 @@ class Data | |||||||
|     protected function sessionHasHeaders() |     protected function sessionHasHeaders() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-has-headers')) { |         if (Session::has('csv-has-headers')) { | ||||||
|             $this->hasHeaders = (bool) Session::get('csv-has-headers'); |             $this->hasHeaders = (bool)Session::get('csv-has-headers'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -78,42 +78,42 @@ class Data | |||||||
|     protected function sessionDateFormat() |     protected function sessionDateFormat() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-date-format')) { |         if (Session::has('csv-date-format')) { | ||||||
|             $this->dateFormat = (string) Session::get('csv-date-format'); |             $this->dateFormat = (string)Session::get('csv-date-format'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function sessionCsvFileLocation() |     protected function sessionCsvFileLocation() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-file')) { |         if (Session::has('csv-file')) { | ||||||
|             $this->csvFileLocation = (string) Session::get('csv-file'); |             $this->csvFileLocation = (string)Session::get('csv-file'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function sessionMap() |     protected function sessionMap() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-map')) { |         if (Session::has('csv-map')) { | ||||||
|             $this->map = (array) Session::get('csv-map'); |             $this->map = (array)Session::get('csv-map'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function sessionRoles() |     protected function sessionRoles() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-roles')) { |         if (Session::has('csv-roles')) { | ||||||
|             $this->roles = (array) Session::get('csv-roles'); |             $this->roles = (array)Session::get('csv-roles'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function sessionMapped() |     protected function sessionMapped() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-mapped')) { |         if (Session::has('csv-mapped')) { | ||||||
|             $this->mapped = (array) Session::get('csv-mapped'); |             $this->mapped = (array)Session::get('csv-mapped'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     protected function sessionSpecifix() |     protected function sessionSpecifix() | ||||||
|     { |     { | ||||||
|         if (Session::has('csv-specifix')) { |         if (Session::has('csv-specifix')) { | ||||||
|             $this->specifix = (array) Session::get('csv-specifix'); |             $this->specifix = (array)Session::get('csv-specifix'); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -230,8 +230,8 @@ class Data | |||||||
|  |  | ||||||
|     protected function loadCsvFile() |     protected function loadCsvFile() | ||||||
|     { |     { | ||||||
|         $file = $this->getCsvFileLocation(); |         $file             = $this->getCsvFileLocation(); | ||||||
|         $content = file_get_contents($file); |         $content          = file_get_contents($file); | ||||||
|         $contentDecrypted = Crypt::decrypt($content); |         $contentDecrypted = Crypt::decrypt($content); | ||||||
|         $this->setCsvFileContent($contentDecrypted); |         $this->setCsvFileContent($contentDecrypted); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -18,8 +18,8 @@ use FireflyIII\Helpers\Collection\Expense; | |||||||
| use FireflyIII\Helpers\Collection\Income; | use FireflyIII\Helpers\Collection\Income; | ||||||
| use FireflyIII\Models\Account; | use FireflyIII\Models\Account; | ||||||
| use FireflyIII\Models\Bill; | use FireflyIII\Models\Bill; | ||||||
| use FireflyIII\Models\Budget; |  | ||||||
| use FireflyIII\Models\Budget as BudgetModel; | use FireflyIII\Models\Budget as BudgetModel; | ||||||
|  | use FireflyIII\Models\Budget; | ||||||
| use FireflyIII\Models\LimitRepetition; | use FireflyIII\Models\LimitRepetition; | ||||||
| use FireflyIII\Models\Tag; | use FireflyIII\Models\Tag; | ||||||
| use FireflyIII\Models\TransactionJournal; | use FireflyIII\Models\TransactionJournal; | ||||||
|   | |||||||
| @@ -50,7 +50,7 @@ class ReportQuery implements ReportQueryInterface | |||||||
|                      ->get( |                      ->get( | ||||||
|                          [ |                          [ | ||||||
|                              DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'), |                              DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'), | ||||||
|                              DB::Raw('SUM(`t_from`.`amount`) AS `sum`') |                              DB::Raw('SUM(`t_from`.`amount`) AS `sum`'), | ||||||
|                          ] |                          ] | ||||||
|                      ); |                      ); | ||||||
|         $array = []; |         $array = []; | ||||||
| @@ -95,7 +95,7 @@ class ReportQuery implements ReportQueryInterface | |||||||
|                      ->get( |                      ->get( | ||||||
|                          [ |                          [ | ||||||
|                              DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'), |                              DB::Raw('DATE_FORMAT(`transaction_journals`.`date`,"%Y-%m") AS `dateFormatted`'), | ||||||
|                              DB::Raw('SUM(`t_to`.`amount`) AS `sum`') |                              DB::Raw('SUM(`t_to`.`amount`) AS `sum`'), | ||||||
|                          ] |                          ] | ||||||
|                      ); |                      ); | ||||||
|         $array = []; |         $array = []; | ||||||
|   | |||||||
| @@ -133,7 +133,7 @@ class AccountController extends Controller | |||||||
|             'ccMonthlyPaymentDate' => $account->getMeta('ccMonthlyPaymentDate'), |             'ccMonthlyPaymentDate' => $account->getMeta('ccMonthlyPaymentDate'), | ||||||
|             'openingBalanceDate'   => $openingBalance ? $openingBalance->date->format('Y-m-d') : null, |             'openingBalanceDate'   => $openingBalance ? $openingBalance->date->format('Y-m-d') : null, | ||||||
|             'openingBalance'       => $openingBalanceAmount, |             'openingBalance'       => $openingBalanceAmount, | ||||||
|             'virtualBalance'       => round($account->virtual_balance, 2) |             'virtualBalance'       => round($account->virtual_balance, 2), | ||||||
|         ]; |         ]; | ||||||
|         Session::flash('preFilled', $preFilled); |         Session::flash('preFilled', $preFilled); | ||||||
|         Session::flash('gaEventCategory', 'accounts'); |         Session::flash('gaEventCategory', 'accounts'); | ||||||
|   | |||||||
| @@ -57,7 +57,7 @@ class Controller extends BaseController | |||||||
|             $localeconv      = [ |             $localeconv      = [ | ||||||
|                 'mon_decimal_point' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL)), |                 'mon_decimal_point' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::DECIMAL_SEPARATOR_SYMBOL)), | ||||||
|                 'mon_thousands_sep' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL)), |                 'mon_thousands_sep' => $numberFormatter->getSymbol($numberFormatter->getAttribute(NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL)), | ||||||
|                 'frac_digits'       => $numberFormatter->getAttribute(NumberFormatter::MAX_FRACTION_DIGITS) |                 'frac_digits'       => $numberFormatter->getAttribute(NumberFormatter::MAX_FRACTION_DIGITS), | ||||||
|             ]; |             ]; | ||||||
|             View::share('monthFormat', $this->monthFormat); |             View::share('monthFormat', $this->monthFormat); | ||||||
|             View::share('monthAndDayFormat', $this->monthAndDayFormat); |             View::share('monthAndDayFormat', $this->monthAndDayFormat); | ||||||
|   | |||||||
| @@ -186,7 +186,7 @@ class PiggyBankController extends Controller | |||||||
|                     'leftForPiggyBanks' => $repository->leftOnAccount($account, $end), |                     'leftForPiggyBanks' => $repository->leftOnAccount($account, $end), | ||||||
|                     'sumOfSaved'        => $piggyBank->savedSoFar, |                     'sumOfSaved'        => $piggyBank->savedSoFar, | ||||||
|                     'sumOfTargets'      => round($piggyBank->targetamount, 2), |                     'sumOfTargets'      => round($piggyBank->targetamount, 2), | ||||||
|                     'leftToSave'        => $piggyBank->leftToSave |                     'leftToSave'        => $piggyBank->leftToSave, | ||||||
|                 ]; |                 ]; | ||||||
|             } else { |             } else { | ||||||
|                 $accounts[$account->id]['sumOfSaved']   = bcadd($accounts[$account->id]['sumOfSaved'], $piggyBank->savedSoFar); |                 $accounts[$account->id]['sumOfSaved']   = bcadd($accounts[$account->id]['sumOfSaved'], $piggyBank->savedSoFar); | ||||||
|   | |||||||
| @@ -126,7 +126,7 @@ class ProfileController extends Controller | |||||||
|                 'email'        => $email, |                 'email'        => $email, | ||||||
|                 'password'     => 'deleted', |                 'password'     => 'deleted', | ||||||
|                 'blocked'      => 1, |                 'blocked'      => 1, | ||||||
|                 'blocked_code' => 'deleted' |                 'blocked_code' => 'deleted', | ||||||
|             ] |             ] | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ class TagController extends Controller | |||||||
|         $subTitleIcon = 'fa-tag'; |         $subTitleIcon = 'fa-tag'; | ||||||
|  |  | ||||||
|         $preFilled = [ |         $preFilled = [ | ||||||
|             'tagMode' => 'nothing' |             'tagMode' => 'nothing', | ||||||
|         ]; |         ]; | ||||||
|         if (!Input::old('tagMode')) { |         if (!Input::old('tagMode')) { | ||||||
|             Session::flash('preFilled', $preFilled); |             Session::flash('preFilled', $preFilled); | ||||||
|   | |||||||
| @@ -54,6 +54,7 @@ class Binder | |||||||
|     private function performBinding($key, $value, $route) |     private function performBinding($key, $value, $route) | ||||||
|     { |     { | ||||||
|         $class = $this->binders[$key]; |         $class = $this->binders[$key]; | ||||||
|  |  | ||||||
|         return $class::routeBinder($value, $route); |         return $class::routeBinder($value, $route); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -16,7 +16,8 @@ class EncryptCookies extends BaseEncrypter | |||||||
|      * |      * | ||||||
|      * @var array |      * @var array | ||||||
|      */ |      */ | ||||||
|     protected $except = [ |     protected $except | ||||||
|         // |         = [ | ||||||
|     ]; |             // | ||||||
|  |         ]; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -53,7 +53,7 @@ class AccountFormRequest extends Request | |||||||
|             'ccMonthlyPaymentDate'              => 'date', |             'ccMonthlyPaymentDate'              => 'date', | ||||||
|             'amount_currency_id_openingBalance' => 'exists:transaction_currencies,id', |             'amount_currency_id_openingBalance' => 'exists:transaction_currencies,id', | ||||||
|             'amount_currency_id_virtualBalance' => 'exists:transaction_currencies,id', |             'amount_currency_id_virtualBalance' => 'exists:transaction_currencies,id', | ||||||
|             'what'                              => 'in:' . $types |             'what'                              => 'in:' . $types, | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -36,7 +36,7 @@ class BudgetFormRequest extends Request | |||||||
|  |  | ||||||
|         return [ |         return [ | ||||||
|             'name'   => $nameRule, |             'name'   => $nameRule, | ||||||
|             'active' => 'numeric|between:0,1' |             'active' => 'numeric|between:0,1', | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -62,6 +62,7 @@ class RuleFormRequest extends Request | |||||||
|         for ($i = 0; $i < 10; $i++) { |         for ($i = 0; $i < 10; $i++) { | ||||||
|             $rules['rule-action-value.' . $i] = 'required_if:rule-action.' . $i . ',' . $contextActions . '|ruleActionValue'; |             $rules['rule-action-value.' . $i] = 'required_if:rule-action.' . $i . ',' . $contextActions . '|ruleActionValue'; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return $rules; |         return $rules; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ class RuleGroupFormRequest extends Request | |||||||
|         } |         } | ||||||
|  |  | ||||||
|         return [ |         return [ | ||||||
|             'title'        => $titleRule, |             'title'       => $titleRule, | ||||||
|             'description' => 'between:1,5000', |             'description' => 'between:1,5000', | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -42,7 +42,7 @@ class TagFormRequest extends Request | |||||||
|             'latitude'    => 'numeric|min:-90|max:90', |             'latitude'    => 'numeric|min:-90|max:90', | ||||||
|             'longitude'   => 'numeric|min:-90|max:90', |             'longitude'   => 'numeric|min:-90|max:90', | ||||||
|             'zoomLevel'   => 'numeric|min:0|max:80', |             'zoomLevel'   => 'numeric|min:0|max:80', | ||||||
|             'tagMode'     => 'required|in:nothing,balancingAct,advancePayment' |             'tagMode'     => 'required|in:nothing,balancingAct,advancePayment', | ||||||
|         ]; |         ]; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -17,9 +17,9 @@ use Illuminate\Database\Eloquent\Model; | |||||||
| class AccountMeta extends Model | class AccountMeta extends Model | ||||||
| { | { | ||||||
|  |  | ||||||
|  |     protected $dates    = ['created_at', 'updated_at']; | ||||||
|     protected $fillable = ['account_id', 'name', 'data']; |     protected $fillable = ['account_id', 'name', 'data']; | ||||||
|     protected $table    = 'account_meta'; |     protected $table    = 'account_meta'; | ||||||
|     protected $dates    = ['created_at', 'updated_at']; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * |      * | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ class BudgetLimit extends Model | |||||||
| { | { | ||||||
|  |  | ||||||
|     protected $hidden = ['amount_encrypted']; |     protected $hidden = ['amount_encrypted']; | ||||||
|     protected $dates = ['created_at', 'updated_at', 'startdate']; |     protected $dates  = ['created_at', 'updated_at', 'startdate']; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||||
|   | |||||||
| @@ -1,8 +1,6 @@ | |||||||
| <?php namespace FireflyIII\Models; | <?php namespace FireflyIII\Models; | ||||||
|  |  | ||||||
| use Carbon\Carbon; |  | ||||||
| use Illuminate\Database\Eloquent\Model; | use Illuminate\Database\Eloquent\Model; | ||||||
| use Illuminate\Database\Eloquent\SoftDeletes; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Class Component |  * Class Component | ||||||
|   | |||||||
| @@ -19,9 +19,9 @@ use Illuminate\Database\Eloquent\Model; | |||||||
| class PiggyBankEvent extends Model | class PiggyBankEvent extends Model | ||||||
| { | { | ||||||
|  |  | ||||||
|  |     protected $dates    = ['created_at', 'updated_at', 'date']; | ||||||
|     protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount']; |     protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount']; | ||||||
|     protected $hidden   = ['amount_encrypted']; |     protected $hidden   = ['amount_encrypted']; | ||||||
|     protected $dates    = ['created_at', 'updated_at', 'date']; |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ class PiggyBankRepetition extends Model | |||||||
|  |  | ||||||
|     protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount']; |     protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount']; | ||||||
|     protected $hidden   = ['currentamount_encrypted']; |     protected $hidden   = ['currentamount_encrypted']; | ||||||
|     protected $dates = ['created_at', 'updated_at', 'startdate', 'targetdate']; |     protected $dates    = ['created_at', 'updated_at', 'startdate', 'targetdate']; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||||
|   | |||||||
| @@ -23,7 +23,8 @@ class Preference extends Model | |||||||
|  |  | ||||||
|     protected $fillable = ['user_id', 'data', 'name']; |     protected $fillable = ['user_id', 'data', 'name']; | ||||||
|     protected $hidden   = ['data_encrypted', 'name_encrypted']; |     protected $hidden   = ['data_encrypted', 'name_encrypted']; | ||||||
| protected $dates = ['created_at', 'updated_at']; |     protected $dates    = ['created_at', 'updated_at']; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @param $value |      * @param $value | ||||||
|      * |      * | ||||||
|   | |||||||
| @@ -37,6 +37,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |||||||
| class Rule extends Model | class Rule extends Model | ||||||
| { | { | ||||||
|     use SoftDeletes; |     use SoftDeletes; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |      * @return \Illuminate\Database\Eloquent\Relations\BelongsTo | ||||||
|      */ |      */ | ||||||
|   | |||||||
| @@ -15,15 +15,15 @@ use Illuminate\Database\Eloquent\Model; | |||||||
| /** | /** | ||||||
|  * FireflyIII\Models\RuleAction |  * FireflyIII\Models\RuleAction | ||||||
|  * |  * | ||||||
|  * @property integer $id |  * @property integer                      $id | ||||||
|  * @property \Carbon\Carbon $created_at |  * @property \Carbon\Carbon               $created_at | ||||||
|  * @property \Carbon\Carbon $updated_at |  * @property \Carbon\Carbon               $updated_at | ||||||
|  * @property integer $rule_id |  * @property integer                      $rule_id | ||||||
|  * @property integer $order |  * @property integer                      $order | ||||||
|  * @property boolean $active |  * @property boolean                      $active | ||||||
|  * @property boolean $stop_processing |  * @property boolean                      $stop_processing | ||||||
|  * @property string $action_type |  * @property string                       $action_type | ||||||
|  * @property string $action_value |  * @property string                       $action_value | ||||||
|  * @property-read \FireflyIII\Models\Rule $rule |  * @property-read \FireflyIII\Models\Rule $rule | ||||||
|  */ |  */ | ||||||
| class RuleAction extends Model | class RuleAction extends Model | ||||||
|   | |||||||
| @@ -14,16 +14,16 @@ use Illuminate\Database\Eloquent\Model; | |||||||
| /** | /** | ||||||
|  * FireflyIII\Models\RuleTrigger |  * FireflyIII\Models\RuleTrigger | ||||||
|  * |  * | ||||||
|  * @property integer $id |  * @property integer                      $id | ||||||
|  * @property \Carbon\Carbon $created_at |  * @property \Carbon\Carbon               $created_at | ||||||
|  * @property \Carbon\Carbon $updated_at |  * @property \Carbon\Carbon               $updated_at | ||||||
|  * @property integer $rule_id |  * @property integer                      $rule_id | ||||||
|  * @property integer $order |  * @property integer                      $order | ||||||
|  * @property string $title |  * @property string                       $title | ||||||
|  * @property string $trigger_type |  * @property string                       $trigger_type | ||||||
|  * @property string $trigger_value |  * @property string                       $trigger_value | ||||||
|  * @property boolean $active |  * @property boolean                      $active | ||||||
|  * @property boolean $stop_processing |  * @property boolean                      $stop_processing | ||||||
|  * @property-read \FireflyIII\Models\Rule $rule |  * @property-read \FireflyIII\Models\Rule $rule | ||||||
|  */ |  */ | ||||||
| class RuleTrigger extends Model | class RuleTrigger extends Model | ||||||
|   | |||||||
| @@ -17,14 +17,16 @@ class AuthServiceProvider extends ServiceProvider | |||||||
|      * |      * | ||||||
|      * @var array |      * @var array | ||||||
|      */ |      */ | ||||||
|     protected $policies = [ |     protected $policies | ||||||
|         'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy', |         = [ | ||||||
|     ]; |             'FireflyIII\Model' => 'FireflyIII\Policies\ModelPolicy', | ||||||
|  |         ]; | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Register any application authentication / authorization services. |      * Register any application authentication / authorization services. | ||||||
|      * |      * | ||||||
|      * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate |      * @param  \Illuminate\Contracts\Auth\Access\Gate $gate | ||||||
|  |      * | ||||||
|      * @return void |      * @return void | ||||||
|      */ |      */ | ||||||
|     public function boot(GateContract $gate) |     public function boot(GateContract $gate) | ||||||
|   | |||||||
| @@ -29,19 +29,19 @@ class EventServiceProvider extends ServiceProvider | |||||||
|      */ |      */ | ||||||
|     protected $listen |     protected $listen | ||||||
|         = [ |         = [ | ||||||
|             'FireflyIII\Events\TransactionJournalUpdated'   => [ |             'FireflyIII\Events\TransactionJournalUpdated' => [ | ||||||
|                 'FireflyIII\Handlers\Events\ScanForBillsAfterUpdate', |                 'FireflyIII\Handlers\Events\ScanForBillsAfterUpdate', | ||||||
|  |  | ||||||
|                 'FireflyIII\Handlers\Events\UpdateJournalConnection', |                 'FireflyIII\Handlers\Events\UpdateJournalConnection', | ||||||
|                 'FireflyIII\Handlers\Events\FireRulesForUpdate', |                 'FireflyIII\Handlers\Events\FireRulesForUpdate', | ||||||
|  |  | ||||||
|             ], |             ], | ||||||
|             'FireflyIII\Events\TransactionJournalStored' => [ |             'FireflyIII\Events\TransactionJournalStored'  => [ | ||||||
|                 'FireflyIII\Handlers\Events\ScanForBillsAfterStore', |                 'FireflyIII\Handlers\Events\ScanForBillsAfterStore', | ||||||
|  |  | ||||||
|                 'FireflyIII\Handlers\Events\ConnectJournalToPiggyBank', |                 'FireflyIII\Handlers\Events\ConnectJournalToPiggyBank', | ||||||
|                 'FireflyIII\Handlers\Events\FireRulesForStore', |                 'FireflyIII\Handlers\Events\FireRulesForStore', | ||||||
|             ] |             ], | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
| @@ -11,8 +11,8 @@ use FireflyIII\Support\Twig\Budget; | |||||||
| use FireflyIII\Support\Twig\General; | use FireflyIII\Support\Twig\General; | ||||||
| use FireflyIII\Support\Twig\Journal; | use FireflyIII\Support\Twig\Journal; | ||||||
| use FireflyIII\Support\Twig\PiggyBank; | use FireflyIII\Support\Twig\PiggyBank; | ||||||
| use FireflyIII\Support\Twig\Translation; |  | ||||||
| use FireflyIII\Support\Twig\Rule; | use FireflyIII\Support\Twig\Rule; | ||||||
|  | use FireflyIII\Support\Twig\Translation; | ||||||
| use FireflyIII\Validation\FireflyValidator; | use FireflyIII\Validation\FireflyValidator; | ||||||
| use Illuminate\Support\ServiceProvider; | use Illuminate\Support\ServiceProvider; | ||||||
| use Twig; | use Twig; | ||||||
|   | |||||||
| @@ -2,8 +2,8 @@ | |||||||
|  |  | ||||||
| namespace FireflyIII\Providers; | namespace FireflyIII\Providers; | ||||||
|  |  | ||||||
| use Illuminate\Routing\Router; |  | ||||||
| use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | ||||||
|  | use Illuminate\Routing\Router; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Class RouteServiceProvider |  * Class RouteServiceProvider | ||||||
| @@ -24,7 +24,8 @@ class RouteServiceProvider extends ServiceProvider | |||||||
|     /** |     /** | ||||||
|      * Define your route model bindings, pattern filters, etc. |      * Define your route model bindings, pattern filters, etc. | ||||||
|      * |      * | ||||||
|      * @param  \Illuminate\Routing\Router  $router |      * @param  \Illuminate\Routing\Router $router | ||||||
|  |      * | ||||||
|      * @return void |      * @return void | ||||||
|      */ |      */ | ||||||
|     public function boot(Router $router) |     public function boot(Router $router) | ||||||
| @@ -37,13 +38,16 @@ class RouteServiceProvider extends ServiceProvider | |||||||
|     /** |     /** | ||||||
|      * Define the routes for the application. |      * Define the routes for the application. | ||||||
|      * |      * | ||||||
|      * @param  \Illuminate\Routing\Router  $router |      * @param  \Illuminate\Routing\Router $router | ||||||
|  |      * | ||||||
|      * @return void |      * @return void | ||||||
|      */ |      */ | ||||||
|     public function map(Router $router) |     public function map(Router $router) | ||||||
|     { |     { | ||||||
|         $router->group(['namespace' => $this->namespace], function ($router) { |         $router->group( | ||||||
|  |             ['namespace' => $this->namespace], function ($router) { | ||||||
|             require app_path('Http/routes.php'); |             require app_path('Http/routes.php'); | ||||||
|         }); |         } | ||||||
|  |         ); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -61,7 +61,7 @@ class BillRepository implements BillRepositoryInterface | |||||||
|                    ->get( |                    ->get( | ||||||
|                        [ |                        [ | ||||||
|                            'transaction_journals.bill_id', |                            'transaction_journals.bill_id', | ||||||
|                            DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`') |                            DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
| @@ -476,7 +476,7 @@ class BillRepository implements BillRepositoryInterface | |||||||
|                    ->get( |                    ->get( | ||||||
|                        [ |                        [ | ||||||
|                            'bills.*', |                            'bills.*', | ||||||
|                            DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`') |                            DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`'), | ||||||
|                        ] |                        ] | ||||||
|                    )->sortBy('name'); |                    )->sortBy('name'); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -89,7 +89,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn | |||||||
|                    ->get( |                    ->get( | ||||||
|                        [ |                        [ | ||||||
|                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'), |                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'), | ||||||
|                            DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`') |                            DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
| @@ -316,7 +316,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn | |||||||
|                        [ |                        [ | ||||||
|                            'budgets.*', |                            'budgets.*', | ||||||
|                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'), |                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'), | ||||||
|                            DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`') |                            DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
| @@ -559,7 +559,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn | |||||||
|                        [ |                        [ | ||||||
|                            'budgets.*', |                            'budgets.*', | ||||||
|                            DB::Raw('DATE_FORMAT(`limit_repetitions`.`startdate`,"%Y") as `dateFormatted`'), |                            DB::Raw('DATE_FORMAT(`limit_repetitions`.`startdate`,"%Y") as `dateFormatted`'), | ||||||
|                            DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`') |                            DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
| @@ -603,7 +603,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn | |||||||
|                        [ |                        [ | ||||||
|                            'budgets.*', |                            'budgets.*', | ||||||
|                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y") AS `dateFormatted`'), |                            DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y") AS `dateFormatted`'), | ||||||
|                            DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`') |                            DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
| @@ -720,7 +720,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn | |||||||
|                           ->get( |                           ->get( | ||||||
|                               [ |                               [ | ||||||
|                                   't_from.account_id', 'budget_transaction_journal.budget_id', |                                   't_from.account_id', 'budget_transaction_journal.budget_id', | ||||||
|                                   DB::Raw('SUM(`t_from`.`amount`) AS `spent`') |                                   DB::Raw('SUM(`t_from`.`amount`) AS `spent`'), | ||||||
|                               ] |                               ] | ||||||
|                           ); |                           ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -196,14 +196,14 @@ class JournalRepository implements JournalRepositoryInterface | |||||||
|             [ |             [ | ||||||
|                 'account_id'             => $fromAccount->id, |                 'account_id'             => $fromAccount->id, | ||||||
|                 'transaction_journal_id' => $journal->id, |                 'transaction_journal_id' => $journal->id, | ||||||
|                 'amount'                 => $data['amount'] * -1 |                 'amount'                 => $data['amount'] * -1, | ||||||
|             ] |             ] | ||||||
|         ); |         ); | ||||||
|         Transaction::create( // second transaction. |         Transaction::create( // second transaction. | ||||||
|             [ |             [ | ||||||
|                 'account_id'             => $toAccount->id, |                 'account_id'             => $toAccount->id, | ||||||
|                 'transaction_journal_id' => $journal->id, |                 'transaction_journal_id' => $journal->id, | ||||||
|                 'amount'                 => $data['amount'] |                 'amount'                 => $data['amount'], | ||||||
|             ] |             ] | ||||||
|         ); |         ); | ||||||
|         $journal->completed = 1; |         $journal->completed = 1; | ||||||
|   | |||||||
| @@ -131,7 +131,7 @@ class TagRepository implements TagRepositoryInterface | |||||||
|                    ->get( |                    ->get( | ||||||
|                        [ |                        [ | ||||||
|                            't_to.account_id', |                            't_to.account_id', | ||||||
|                            DB::Raw('SUM(`t_to`.`amount`) as `sum`') |                            DB::Raw('SUM(`t_to`.`amount`) as `sum`'), | ||||||
|                        ] |                        ] | ||||||
|                    ); |                    ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -8,6 +8,7 @@ | |||||||
|  */ |  */ | ||||||
|  |  | ||||||
| namespace FireflyIII\Rules\Actions; | namespace FireflyIII\Rules\Actions; | ||||||
|  |  | ||||||
| use FireflyIII\Models\RuleAction; | use FireflyIII\Models\RuleAction; | ||||||
| use FireflyIII\Models\TransactionJournal; | use FireflyIII\Models\TransactionJournal; | ||||||
|  |  | ||||||
| @@ -21,7 +22,7 @@ interface ActionInterface | |||||||
|     /** |     /** | ||||||
|      * TriggerInterface constructor. |      * TriggerInterface constructor. | ||||||
|      * |      * | ||||||
|      * @param RuleAction $action |      * @param RuleAction         $action | ||||||
|      * @param TransactionJournal $journal |      * @param TransactionJournal $journal | ||||||
|      */ |      */ | ||||||
|     public function __construct(RuleAction $action, TransactionJournal $journal); |     public function __construct(RuleAction $action, TransactionJournal $journal); | ||||||
|   | |||||||
| @@ -15,6 +15,7 @@ use FireflyIII\Models\RuleAction; | |||||||
| use FireflyIII\Models\TransactionJournal; | use FireflyIII\Models\TransactionJournal; | ||||||
| use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; | use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; | ||||||
| use Log; | use Log; | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Class SetBudget |  * Class SetBudget | ||||||
|  * |  * | ||||||
| @@ -56,7 +57,7 @@ class SetBudget implements ActionInterface | |||||||
|             Log::debug('Will set budget "' . $search . '" (#' . $budget->id . ') on journal #' . $this->journal->id . '.'); |             Log::debug('Will set budget "' . $search . '" (#' . $budget->id . ') on journal #' . $this->journal->id . '.'); | ||||||
|             $this->journal->budgets()->save($budget); |             $this->journal->budgets()->save($budget); | ||||||
|         } else { |         } else { | ||||||
|             Log::debug('Could not find budget "'.$search.'". Failed.'); |             Log::debug('Could not find budget "' . $search . '". Failed.'); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         return true; |         return true; | ||||||
|   | |||||||
| @@ -30,16 +30,16 @@ class Domain | |||||||
|     /** |     /** | ||||||
|      * @return array |      * @return array | ||||||
|      */ |      */ | ||||||
|     public static function getRuleTriggers() |     public static function getRuleActions() | ||||||
|     { |     { | ||||||
|         return Config::get('firefly.rule-triggers'); |         return Config::get('firefly.rule-actions'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return array |      * @return array | ||||||
|      */ |      */ | ||||||
|     public static function getRuleActions() |     public static function getRuleTriggers() | ||||||
|     { |     { | ||||||
|         return Config::get('firefly.rule-actions'); |         return Config::get('firefly.rule-triggers'); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -37,7 +37,7 @@ class Journal extends Twig_Extension | |||||||
|     { |     { | ||||||
|         $functions = [ |         $functions = [ | ||||||
|             $this->invalidJournal(), |             $this->invalidJournal(), | ||||||
|             $this->relevantTags() |             $this->relevantTags(), | ||||||
|         ]; |         ]; | ||||||
|  |  | ||||||
|         return $functions; |         return $functions; | ||||||
|   | |||||||
							
								
								
									
										98
									
								
								app/User.php
									
									
									
									
									
								
							
							
						
						
									
										98
									
								
								app/User.php
									
									
									
									
									
								
							| @@ -9,24 +9,24 @@ use Zizaco\Entrust\Traits\EntrustUserTrait; | |||||||
|  * Class User |  * Class User | ||||||
|  * |  * | ||||||
|  * @package FireflyIII |  * @package FireflyIII | ||||||
|  * @property integer $id |  * @property integer                                                                               $id | ||||||
|  * @property \Carbon\Carbon $created_at |  * @property \Carbon\Carbon                                                                        $created_at | ||||||
|  * @property \Carbon\Carbon $updated_at |  * @property \Carbon\Carbon                                                                        $updated_at | ||||||
|  * @property string $email |  * @property string                                                                                $email | ||||||
|  * @property string $password |  * @property string                                                                                $password | ||||||
|  * @property string $remember_token |  * @property string                                                                                $remember_token | ||||||
|  * @property string $reset |  * @property string                                                                                $reset | ||||||
|  * @property boolean $blocked |  * @property boolean                                                                               $blocked | ||||||
|  * @property string $blocked_code |  * @property string                                                                                $blocked_code | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[] $accounts |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Account[]            $accounts | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[] $attachments |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Attachment[]         $attachments | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Tag[] $tags |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Tag[]                $tags | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[] $bills |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Bill[]               $bills | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Budget[] $budgets |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Budget[]             $budgets | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Category[] $categories |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Category[]           $categories | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Preference[] $preferences |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Preference[]         $preferences | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionJournal[] $transactionjournals |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\TransactionJournal[] $transactionjournals | ||||||
|  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Role[] $roles |  * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Role[]               $roles | ||||||
|  */ |  */ | ||||||
| class User extends Authenticatable | class User extends Authenticatable | ||||||
| { | { | ||||||
| @@ -71,30 +71,6 @@ class User extends Authenticatable | |||||||
|         return $this->hasMany('FireflyIII\Models\Attachment'); |         return $this->hasMany('FireflyIII\Models\Attachment'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |  | ||||||
|      */ |  | ||||||
|     public function tags() |  | ||||||
|     { |  | ||||||
|         return $this->hasMany('FireflyIII\Models\Tag'); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |  | ||||||
|      */ |  | ||||||
|     public function rules() |  | ||||||
|     { |  | ||||||
|         return $this->hasMany('FireflyIII\Models\Rule'); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |  | ||||||
|      */ |  | ||||||
|     public function ruleGroups() |  | ||||||
|     { |  | ||||||
|         return $this->hasMany('FireflyIII\Models\RuleGroup'); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|      */ |      */ | ||||||
| @@ -127,14 +103,6 @@ class User extends Authenticatable | |||||||
|         return $this->hasManyThrough('FireflyIII\Models\PiggyBank', 'FireflyIII\Models\Account'); |         return $this->hasManyThrough('FireflyIII\Models\PiggyBank', 'FireflyIII\Models\Account'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |  | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough |  | ||||||
|      */ |  | ||||||
|     public function transactions() |  | ||||||
|     { |  | ||||||
|         return $this->hasManyThrough('FireflyIII\Models\Transaction', 'FireflyIII\Models\TransactionJournal'); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|      */ |      */ | ||||||
| @@ -143,6 +111,30 @@ class User extends Authenticatable | |||||||
|         return $this->hasMany('FireflyIII\Models\Preference'); |         return $this->hasMany('FireflyIII\Models\Preference'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|  |      */ | ||||||
|  |     public function ruleGroups() | ||||||
|  |     { | ||||||
|  |         return $this->hasMany('FireflyIII\Models\RuleGroup'); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|  |      */ | ||||||
|  |     public function rules() | ||||||
|  |     { | ||||||
|  |         return $this->hasMany('FireflyIII\Models\Rule'); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|  |      */ | ||||||
|  |     public function tags() | ||||||
|  |     { | ||||||
|  |         return $this->hasMany('FireflyIII\Models\Tag'); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * @return \Illuminate\Database\Eloquent\Relations\HasMany |      * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||||
|      */ |      */ | ||||||
| @@ -151,4 +143,12 @@ class User extends Authenticatable | |||||||
|         return $this->hasMany('FireflyIII\Models\TransactionJournal'); |         return $this->hasMany('FireflyIII\Models\TransactionJournal'); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * @return \Illuminate\Database\Eloquent\Relations\HasManyThrough | ||||||
|  |      */ | ||||||
|  |     public function transactions() | ||||||
|  |     { | ||||||
|  |         return $this->hasManyThrough('FireflyIII\Models\Transaction', 'FireflyIII\Models\TransactionJournal'); | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -282,7 +282,7 @@ return [ | |||||||
|     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', |     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', | ||||||
|     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', |     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', | ||||||
|     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', |     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', | ||||||
|     'csv_delimiter_help'	                 => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', |     'csv_delimiter_help'                     => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', | ||||||
|     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', |     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', | ||||||
|  |  | ||||||
|     // create new stuff: |     // create new stuff: | ||||||
|   | |||||||
| @@ -17,6 +17,6 @@ return [ | |||||||
|     "token"    => "This password reset token is invalid.", |     "token"    => "This password reset token is invalid.", | ||||||
|     "sent"     => "We have e-mailed your password reset link!", |     "sent"     => "We have e-mailed your password reset link!", | ||||||
|     "reset"    => "Your password has been reset!", |     "reset"    => "Your password has been reset!", | ||||||
|     'blocked'  => 'Nice try though.' |     'blocked'  => 'Nice try though.', | ||||||
|  |  | ||||||
| ]; | ]; | ||||||
|   | |||||||
| @@ -282,7 +282,7 @@ return [ | |||||||
|     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', |     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', | ||||||
|     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', |     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', | ||||||
|     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', |     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', | ||||||
|     'csv_delimiter_help'	                 => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', |     'csv_delimiter_help'                     => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', | ||||||
|     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', |     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', | ||||||
|  |  | ||||||
|     // create new stuff: |     // create new stuff: | ||||||
|   | |||||||
| @@ -17,6 +17,6 @@ return [ | |||||||
|     "token"    => "Le jeton de réinitialisation de mot de passe est invalide.", |     "token"    => "Le jeton de réinitialisation de mot de passe est invalide.", | ||||||
|     "sent"     => "Nous avons envoyé votre lien de réinitialisation de mot de passe!", |     "sent"     => "Nous avons envoyé votre lien de réinitialisation de mot de passe!", | ||||||
|     "reset"    => "Le mot de passe a été réinitialisé!", |     "reset"    => "Le mot de passe a été réinitialisé!", | ||||||
|     'blocked'  => 'Nice try though.' |     'blocked'  => 'Nice try though.', | ||||||
|  |  | ||||||
| ]; | ]; | ||||||
|   | |||||||
| @@ -282,7 +282,7 @@ return [ | |||||||
|     'csv_specifix_RabobankDescription'       => 'Vink dit aan als je Rabobank bestanden importeert.', |     'csv_specifix_RabobankDescription'       => 'Vink dit aan als je Rabobank bestanden importeert.', | ||||||
|     'csv_specifix_Dummy'                     => 'Dit vinkje doet niks (dummy).', |     'csv_specifix_Dummy'                     => 'Dit vinkje doet niks (dummy).', | ||||||
|     'csv_import_account_help'                => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', |     'csv_import_account_help'                => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', | ||||||
|     'csv_delimiter_help'	                 => 'Kies het veldscheidingsteken dat in het invoerbestand is gebruikt. Bij twijfel is de komma de veiligste optie.', |     'csv_delimiter_help'                     => 'Kies het veldscheidingsteken dat in het invoerbestand is gebruikt. Bij twijfel is de komma de veiligste optie.', | ||||||
|     'csv_date_parse_error'                   => 'Firefly kan van ":value" geen datum maken, gegeven het formaat ":format". Weet je zeker dat je CSV goed is?', |     'csv_date_parse_error'                   => 'Firefly kan van ":value" geen datum maken, gegeven het formaat ":format". Weet je zeker dat je CSV goed is?', | ||||||
|  |  | ||||||
|     // create new stuff: |     // create new stuff: | ||||||
|   | |||||||
| @@ -17,6 +17,6 @@ return [ | |||||||
|     "token"    => "Ongeldig token! Sorry", |     "token"    => "Ongeldig token! Sorry", | ||||||
|     "sent"     => "Je krijgt een mailtje met een linkje om je wachtwoord te herstellen!", |     "sent"     => "Je krijgt een mailtje met een linkje om je wachtwoord te herstellen!", | ||||||
|     "reset"    => "Je wachtwoord is hersteld!", |     "reset"    => "Je wachtwoord is hersteld!", | ||||||
|     'blocked'  => 'Leuk geprobeerd wel.' |     'blocked'  => 'Leuk geprobeerd wel.', | ||||||
|  |  | ||||||
| ]; | ]; | ||||||
|   | |||||||
| @@ -282,7 +282,7 @@ return [ | |||||||
|     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', |     'csv_specifix_RabobankDescription'       => 'Select this when you\'re importing Rabobank CSV export files.', | ||||||
|     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', |     'csv_specifix_Dummy'                     => 'Checking this has no effect whatsoever.', | ||||||
|     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', |     'csv_import_account_help'                => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', | ||||||
|     'csv_delimiter_help'	                 => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', |     'csv_delimiter_help'                     => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', | ||||||
|     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', |     'csv_date_parse_error'                   => 'Could not parse a valid date from ":value", using the format ":format". Are you sure your CSV is correct?', | ||||||
|  |  | ||||||
|     // create new stuff: |     // create new stuff: | ||||||
|   | |||||||
| @@ -17,6 +17,6 @@ return [ | |||||||
|     "token"    => "Este token de redefinição de senha é inválido.", |     "token"    => "Este token de redefinição de senha é inválido.", | ||||||
|     "sent"     => "Nós te enviamos um email com um link para trocar a senha!", |     "sent"     => "Nós te enviamos um email com um link para trocar a senha!", | ||||||
|     "reset"    => "Sua senha foi redefinida!", |     "reset"    => "Sua senha foi redefinida!", | ||||||
|     'blocked'  => 'Nice try though.' |     'blocked'  => 'Nice try though.', | ||||||
|  |  | ||||||
| ]; | ]; | ||||||
|   | |||||||
| @@ -62,6 +62,7 @@ | |||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
| </body> | </body> | ||||||
|   | |||||||
| @@ -23,9 +23,9 @@ | |||||||
|         <input type="text" value="{{ oldValue }}" name="rule-trigger-value[{{ count }}]" |         <input type="text" value="{{ oldValue }}" name="rule-trigger-value[{{ count }}]" | ||||||
|                class="form-control"> |                class="form-control"> | ||||||
|         {% if errors.has(('rule-trigger-value.'~count)) %} |         {% if errors.has(('rule-trigger-value.'~count)) %} | ||||||
|         <p class="text-danger"> |             <p class="text-danger"> | ||||||
|             {{ errors.first('rule-trigger-value.'~count) }} |                 {{ errors.first('rule-trigger-value.'~count) }} | ||||||
|         </p> |             </p> | ||||||
|         {% endif %} |         {% endif %} | ||||||
|     </td> |     </td> | ||||||
|     <td style="width:20%;"> |     <td style="width:20%;"> | ||||||
|   | |||||||
| @@ -1,4 +1,3 @@ | |||||||
|  |  | ||||||
| {% extends "./layout/default.twig" %} | {% extends "./layout/default.twig" %} | ||||||
|  |  | ||||||
| {% block breadcrumbs %} | {% block breadcrumbs %} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user