mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Apply fixes from StyleCI
This commit is contained in:
		| @@ -86,16 +86,16 @@ Route::group( | ||||
|         'as'         => 'api.v1.bills.', ], static function () { | ||||
|  | ||||
|     // Bills API routes: | ||||
|          Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); | ||||
|          Route::post('', ['uses' => 'BillController@store', 'as' => 'store']); | ||||
|          Route::get('{bill}', ['uses' => 'BillController@show', 'as' => 'show']); | ||||
|          Route::put('{bill}', ['uses' => 'BillController@update', 'as' => 'update']); | ||||
|          Route::delete('{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']); | ||||
|             Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); | ||||
|             Route::post('', ['uses' => 'BillController@store', 'as' => 'store']); | ||||
|             Route::get('{bill}', ['uses' => 'BillController@show', 'as' => 'show']); | ||||
|             Route::put('{bill}', ['uses' => 'BillController@update', 'as' => 'update']); | ||||
|             Route::delete('{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']); | ||||
|  | ||||
|          Route::get('{bill}/attachments', ['uses' => 'BillController@attachments', 'as' => 'attachments']); | ||||
|          Route::get('{bill}/rules', ['uses' => 'BillController@rules', 'as' => 'rules']); | ||||
|          Route::get('{bill}/transactions', ['uses' => 'BillController@transactions', 'as' => 'transactions']); | ||||
|      } | ||||
|             Route::get('{bill}/attachments', ['uses' => 'BillController@attachments', 'as' => 'attachments']); | ||||
|             Route::get('{bill}/rules', ['uses' => 'BillController@rules', 'as' => 'rules']); | ||||
|             Route::get('{bill}/transactions', ['uses' => 'BillController@transactions', 'as' => 'transactions']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| Route::group( | ||||
|   | ||||
| @@ -114,8 +114,8 @@ try { | ||||
|             if (null !== $start && null !== $end) { | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start ? $start->formatLocalized((string)trans('config.month_and_day')) : '', | ||||
|                         'end'   => $end ? $end->formatLocalized((string)trans('config.month_and_day')) : '', ] | ||||
|                     ['start'    => $start ? $start->formatLocalized((string) trans('config.month_and_day')) : '', | ||||
|                         'end'   => $end ? $end->formatLocalized((string) trans('config.month_and_day')) : '', ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('accounts.show', $account)); | ||||
|             } | ||||
| @@ -415,8 +415,8 @@ try { | ||||
|             if (null !== $start && null !== $end) { | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start->formatLocalized((string)trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                     ['start'    => $start->formatLocalized((string) trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('budgets.no-budget')); | ||||
|             } | ||||
| @@ -449,8 +449,8 @@ try { | ||||
|  | ||||
|             $title = trans( | ||||
|                 'firefly.between_dates_breadcrumb', | ||||
|                 ['start'    => $budgetLimit->start_date->formatLocalized((string)trans('config.month_and_day')), | ||||
|                     'end'   => $budgetLimit->end_date->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                 ['start'    => $budgetLimit->start_date->formatLocalized((string) trans('config.month_and_day')), | ||||
|                     'end'   => $budgetLimit->end_date->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|             ); | ||||
|  | ||||
|             $breadcrumbs->push( | ||||
| @@ -499,8 +499,8 @@ try { | ||||
|             if (null !== $start && null !== $end) { | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start->formatLocalized((string)trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                     ['start'    => $start->formatLocalized((string) trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('categories.show', [$category->id])); | ||||
|             } | ||||
| @@ -524,8 +524,8 @@ try { | ||||
|             if (null !== $start && null !== $end) { | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start->formatLocalized((string)trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                     ['start'    => $start->formatLocalized((string) trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('categories.no-category')); | ||||
|             } | ||||
| @@ -744,10 +744,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_audit', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_audit', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.audit', [$accountIds, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -757,10 +757,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $budgetIds, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_budget', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_budget', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.budget', [$accountIds, $budgetIds, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -771,10 +771,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $tagTags, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_tag', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_tag', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.tag', [$accountIds, $tagTags, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -785,10 +785,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $categoryIds, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_category', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_category', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.category', [$accountIds, $categoryIds, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -799,10 +799,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $doubleIds, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_double', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_double', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.double', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -813,10 +813,10 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, Carbon $start, Carbon $end) { | ||||
|             $breadcrumbs->parent('reports.index'); | ||||
|  | ||||
|             $monthFormat = (string)trans('config.month_and_day'); | ||||
|             $monthFormat = (string) trans('config.month_and_day'); | ||||
|             $startString = $start->formatLocalized($monthFormat); | ||||
|             $endString   = $end->formatLocalized($monthFormat); | ||||
|             $title       = (string)trans('firefly.report_default', ['start' => $startString, 'end' => $endString]); | ||||
|             $title       = (string) trans('firefly.report_default', ['start' => $startString, 'end' => $endString]); | ||||
|  | ||||
|             $breadcrumbs->push($title, route('reports.report.default', [$accountIds, $start->format('Ymd'), $end->format('Ymd')])); | ||||
|         } | ||||
| @@ -1016,8 +1016,8 @@ try { | ||||
|             if (null !== $start && null !== $end) { | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start->formatLocalized((string)trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                     ['start'    => $start->formatLocalized((string) trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('tags.show', [$tag->id, $start, $end])); | ||||
|             } | ||||
| @@ -1029,7 +1029,7 @@ try { | ||||
|         static function (BreadcrumbsGenerator $breadcrumbs, Tag $tag) { | ||||
|             $breadcrumbs->parent('tags.index'); | ||||
|             $breadcrumbs->push($tag->tag, route('tags.show', [$tag->id])); | ||||
|             $title = (string)trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]); | ||||
|             $title = (string) trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]); | ||||
|             $breadcrumbs->push($title, route('tags.show.all', $tag->id)); | ||||
|         } | ||||
|     ); | ||||
| @@ -1046,8 +1046,8 @@ try { | ||||
|                 // add date range: | ||||
|                 $title = trans( | ||||
|                     'firefly.between_dates_breadcrumb', | ||||
|                     ['start'    => $start->formatLocalized((string)trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string)trans('config.month_and_day')), ] | ||||
|                     ['start'    => $start->formatLocalized((string) trans('config.month_and_day')), | ||||
|                         'end'   => $end->formatLocalized((string) trans('config.month_and_day')), ] | ||||
|                 ); | ||||
|                 $breadcrumbs->push($title, route('transactions.index', [$what, $start, $end])); | ||||
|             } | ||||
|   | ||||
| @@ -35,6 +35,6 @@ declare(strict_types=1); | ||||
|  | ||||
| Broadcast::channel( | ||||
|     'App.User.{id}', static function ($user, $id) { | ||||
|         return (int)$user->id === (int)$id; | ||||
|         return (int) $user->id === (int) $id; | ||||
|     } | ||||
| ); | ||||
|   | ||||
| @@ -24,9 +24,9 @@ declare(strict_types=1); | ||||
| Route::group( | ||||
|     ['namespace'    => 'FireflyIII\Http\Controllers\System', | ||||
|         'as'        => 'installer.', 'prefix' => 'install', ], static function () { | ||||
|          Route::get('', ['uses' => 'InstallController@index', 'as' => 'index']); | ||||
|          Route::post('runCommand', ['uses' => 'InstallController@runCommand', 'as' => 'runCommand']); | ||||
|      } | ||||
|             Route::get('', ['uses' => 'InstallController@index', 'as' => 'index']); | ||||
|             Route::post('runCommand', ['uses' => 'InstallController@runCommand', 'as' => 'runCommand']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| Route::group( | ||||
| @@ -747,10 +747,10 @@ Route::group( | ||||
| Route::group( | ||||
|     ['middleware'    => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Report', 'prefix' => 'report-data/operations', | ||||
|         'as'         => 'report-data.operations.', ], static function () { | ||||
|          Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@operations', 'as' => 'operations']); | ||||
|          Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@income', 'as' => 'income']); | ||||
|          Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']); | ||||
|      } | ||||
|             Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@operations', 'as' => 'operations']); | ||||
|             Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@income', 'as' => 'income']); | ||||
|             Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| /** | ||||
| @@ -761,20 +761,20 @@ Route::group( | ||||
|         'as'         => 'report-data.category.', ], static function () { | ||||
|  | ||||
|     // TODO three routes still in use? | ||||
|          Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); | ||||
|          Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']); | ||||
|          Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']); | ||||
|             Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); | ||||
|             Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']); | ||||
|             Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']); | ||||
|  | ||||
|          Route::get('accounts/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@accounts', 'as' => 'accounts']); | ||||
|          Route::get('categories/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@categories', 'as' => 'categories']); | ||||
|          Route::get('account-per-category/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@accountPerCategory', 'as' => 'account-per-category']); | ||||
|             Route::get('accounts/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@accounts', 'as' => 'accounts']); | ||||
|             Route::get('categories/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@categories', 'as' => 'categories']); | ||||
|             Route::get('account-per-category/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@accountPerCategory', 'as' => 'account-per-category']); | ||||
|  | ||||
|          Route::get('top-expenses/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@topExpenses', 'as' => 'top-expenses']); | ||||
|          Route::get('avg-expenses/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@avgExpenses', 'as' => 'avg-expenses']); | ||||
|             Route::get('top-expenses/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@topExpenses', 'as' => 'top-expenses']); | ||||
|             Route::get('avg-expenses/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@avgExpenses', 'as' => 'avg-expenses']); | ||||
|  | ||||
|          Route::get('top-income/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@topIncome', 'as' => 'top-income']); | ||||
|          Route::get('avg-income/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@avgIncome', 'as' => 'avg-income']); | ||||
|      } | ||||
|             Route::get('top-income/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@topIncome', 'as' => 'top-income']); | ||||
|             Route::get('avg-income/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryController@avgIncome', 'as' => 'avg-income']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| /** | ||||
| @@ -783,16 +783,16 @@ Route::group( | ||||
| Route::group( | ||||
|     ['middleware'    => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Report', 'prefix' => 'report-data/tag', | ||||
|         'as'         => 'report-data.tag.', ], static function () { | ||||
|          Route::get('accounts/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@accounts', 'as' => 'accounts']); | ||||
|          Route::get('tags/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@tags', 'as' => 'tags']); | ||||
|          Route::get('account-per-tag/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@accountPerTag', 'as' => 'account-per-tag']); | ||||
|             Route::get('accounts/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@accounts', 'as' => 'accounts']); | ||||
|             Route::get('tags/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@tags', 'as' => 'tags']); | ||||
|             Route::get('account-per-tag/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@accountPerTag', 'as' => 'account-per-tag']); | ||||
|  | ||||
|          Route::get('top-expenses/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@topExpenses', 'as' => 'top-expenses']); | ||||
|          Route::get('avg-expenses/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@avgExpenses', 'as' => 'avg-expenses']); | ||||
|             Route::get('top-expenses/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@topExpenses', 'as' => 'top-expenses']); | ||||
|             Route::get('avg-expenses/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@avgExpenses', 'as' => 'avg-expenses']); | ||||
|  | ||||
|          Route::get('top-income/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@topIncome', 'as' => 'top-income']); | ||||
|          Route::get('avg-income/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@avgIncome', 'as' => 'avg-income']); | ||||
|      } | ||||
|             Route::get('top-income/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@topIncome', 'as' => 'top-income']); | ||||
|             Route::get('avg-income/{accountList}/{tagList}/{start_date}/{end_date}', ['uses' => 'TagController@avgIncome', 'as' => 'avg-income']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| /** | ||||
| @@ -990,9 +990,9 @@ Route::group( | ||||
| Route::group( | ||||
|     ['middleware'    => 'user-full-auth', 'namespace' => 'FireflyIII\Http\Controllers\Transaction', 'prefix' => 'transactions/convert', | ||||
|         'as'         => 'transactions.convert.', ], static function () { | ||||
|          Route::get('{transactionType}/{transactionGroup}', ['uses' => 'ConvertController@index', 'as' => 'index']); | ||||
|          Route::post('{transactionType}/{transactionGroup}', ['uses' => 'ConvertController@postIndex', 'as' => 'index.post']); | ||||
|      } | ||||
|             Route::get('{transactionType}/{transactionGroup}', ['uses' => 'ConvertController@index', 'as' => 'index']); | ||||
|             Route::post('{transactionType}/{transactionGroup}', ['uses' => 'ConvertController@postIndex', 'as' => 'index.post']); | ||||
|         } | ||||
| ); | ||||
|  | ||||
| /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user