Apply fixes from StyleCI

This commit is contained in:
James Cole
2020-03-17 16:06:30 +00:00
committed by StyleCI Bot
parent 9a25d6a741
commit ba4c1d95a7
73 changed files with 1163 additions and 1365 deletions

View File

@@ -1,9 +1,8 @@
<?php
/**
* firefly.php
* Copyright (c) 2019 james@firefly-iii.org
* Copyright (c) 2019 james@firefly-iii.org.
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
@@ -133,7 +132,7 @@ return [
'is_demo_site' => false,
],
'feature_flags' => [
'export' => true,
'export' => true,
'telemetry' => false,
],
@@ -182,7 +181,6 @@ return [
/* PDF */
'application/pdf',
/* MS word */
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
@@ -246,66 +244,61 @@ return [
'1Y' => 'yearly',
'custom' => 'custom',
],
'subTitlesByIdentifier' =>
[
'asset' => 'Asset accounts',
'expense' => 'Expense accounts',
'revenue' => 'Revenue accounts',
'cash' => 'Cash accounts',
'liabilities' => 'Liabilities',
'liability' => 'Liabilities',
],
'subIconsByIdentifier' =>
[
'asset' => 'fa-money',
'Asset account' => 'fa-money',
'Default account' => 'fa-money',
'Cash account' => 'fa-money',
'expense' => 'fa-shopping-cart',
'Expense account' => 'fa-shopping-cart',
'Beneficiary account' => 'fa-shopping-cart',
'revenue' => 'fa-download',
'Revenue account' => 'fa-download',
'import' => 'fa-download',
'Import account' => 'fa-download',
'liabilities' => 'fa-ticket',
],
'accountTypesByIdentifier' =>
[
'asset' => ['Default account', 'Asset account'],
'expense' => ['Expense account', 'Beneficiary account'],
'revenue' => ['Revenue account'],
'import' => ['Import account'],
'liabilities' => ['Loan', 'Debt', 'Credit card', 'Mortgage'],
],
'accountTypeByIdentifier' =>
[
'asset' => ['Asset account'],
'expense' => ['Expense account'],
'revenue' => ['Revenue account'],
'opening' => ['Initial balance account'],
'initial' => ['Initial balance account'],
'import' => ['Import account'],
'reconcile' => ['Reconciliation account'],
'liabilities' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
'liability' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
],
'shortNamesByFullName' =>
[
'Default account' => 'asset',
'Asset account' => 'asset',
'Import account' => 'import',
'Expense account' => 'expense',
'Beneficiary account' => 'expense',
'Revenue account' => 'revenue',
'Cash account' => 'cash',
'Initial balance account' => 'initial-balance',
'Reconciliation account' => 'reconciliation',
'Credit card' => 'liabilities',
'Loan' => 'liabilities',
'Debt' => 'liabilities',
'Mortgage' => 'liabilities',
],
'subTitlesByIdentifier' => [
'asset' => 'Asset accounts',
'expense' => 'Expense accounts',
'revenue' => 'Revenue accounts',
'cash' => 'Cash accounts',
'liabilities' => 'Liabilities',
'liability' => 'Liabilities',
],
'subIconsByIdentifier' => [
'asset' => 'fa-money',
'Asset account' => 'fa-money',
'Default account' => 'fa-money',
'Cash account' => 'fa-money',
'expense' => 'fa-shopping-cart',
'Expense account' => 'fa-shopping-cart',
'Beneficiary account' => 'fa-shopping-cart',
'revenue' => 'fa-download',
'Revenue account' => 'fa-download',
'import' => 'fa-download',
'Import account' => 'fa-download',
'liabilities' => 'fa-ticket',
],
'accountTypesByIdentifier' => [
'asset' => ['Default account', 'Asset account'],
'expense' => ['Expense account', 'Beneficiary account'],
'revenue' => ['Revenue account'],
'import' => ['Import account'],
'liabilities' => ['Loan', 'Debt', 'Credit card', 'Mortgage'],
],
'accountTypeByIdentifier' => [
'asset' => ['Asset account'],
'expense' => ['Expense account'],
'revenue' => ['Revenue account'],
'opening' => ['Initial balance account'],
'initial' => ['Initial balance account'],
'import' => ['Import account'],
'reconcile' => ['Reconciliation account'],
'liabilities' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
'liability' => ['Loan', 'Debt', 'Mortgage', 'Credit card'],
],
'shortNamesByFullName' => [
'Default account' => 'asset',
'Asset account' => 'asset',
'Import account' => 'import',
'Expense account' => 'expense',
'Beneficiary account' => 'expense',
'Revenue account' => 'revenue',
'Cash account' => 'cash',
'Initial balance account' => 'initial-balance',
'Reconciliation account' => 'reconciliation',
'Credit card' => 'liabilities',
'Loan' => 'liabilities',
'Debt' => 'liabilities',
'Mortgage' => 'liabilities',
],
'shortLiabilityNameByFullName' => [
'Credit card' => 'creditcard',
'Loan' => 'loan',
@@ -313,7 +306,7 @@ return [
'Mortgage' => 'mortgage',
],
/**
* Languages configuration
* Languages configuration.
*/
'languages' => [
// currently enabled languages
@@ -337,7 +330,6 @@ return [
'fi_FI' => ['name_locale' => 'Suomi', 'name_english' => 'Finnish'],
'vi_VN' => ['name_locale' => 'Tiếng Việt', 'name_english' => 'Vietnamese'],
// currently disabled languages:
// 'bg_BG' => ['name_locale' => 'Български', 'name_english' => 'Bulgarian'],
// 'ca_ES' => ['name_locale' => 'Catalan', 'name_english' => 'Catalan'],
@@ -434,7 +426,6 @@ return [
'tagOrId' => TagOrId::class,
'configName' => ConfigurationName::class,
],
'rule-triggers' => [
'user_action' => UserAction::class,
@@ -547,7 +538,6 @@ return [
'notes_are',
],
'test-triggers' => [
'limit' => 10,
'range' => 200,
@@ -555,8 +545,8 @@ return [
'default_currency' => 'EUR',
'default_language' => envNonEmpty('DEFAULT_LANGUAGE', 'en_US'),
'search_modifiers' => ['amount_is', 'amount', 'amount_max', 'amount_min', 'amount_less', 'amount_more', 'source', 'destination', 'category',
'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on',
'updated_on'],
'budget', 'bill', 'type', 'date', 'date_before', 'date_after', 'on', 'before', 'after', 'from', 'to', 'tag', 'created_on',
'updated_on', ],
// TODO notes has_attachments
'cer_providers' => [
@@ -569,10 +559,10 @@ return [
'source' => [
TransactionTypeModel::WITHDRAWAL => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::DEPOSIT => [AccountType::REVENUE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE,
AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION],
AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION, ],
TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET],
// in case no transaction type is known yet, it could be anything.
'none' => [
@@ -586,43 +576,43 @@ return [
],
'destination' => [
TransactionTypeModel::WITHDRAWAL => [AccountType::EXPENSE, AccountType::CASH, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
TransactionTypeModel::DEPOSIT => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::TRANSFER => [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE],
TransactionTypeModel::OPENING_BALANCE => [AccountType::INITIAL_BALANCE, AccountType::ASSET, AccountType::LOAN, AccountType::DEBT,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
TransactionTypeModel::RECONCILIATION => [AccountType::RECONCILIATION, AccountType::ASSET],
],
],
'allowed_opposing_types' => [
'source' => [
AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE,
AccountType::LOAN, AccountType::RECONCILIATION],
AccountType::LOAN, AccountType::RECONCILIATION, ],
AccountType::CASH => [AccountType::ASSET],
AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
AccountType::EXPENSE => [], // is not allowed as a source.
AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::EXPENSE, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE],
AccountType::MORTGAGE, ],
AccountType::RECONCILIATION => [AccountType::ASSET],
AccountType::REVENUE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
],
'destination' => [
AccountType::ASSET => [AccountType::ASSET, AccountType::CASH, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN,
AccountType::MORTGAGE, AccountType::RECONCILIATION, AccountType::REVENUE],
AccountType::MORTGAGE, AccountType::RECONCILIATION, AccountType::REVENUE, ],
AccountType::CASH => [AccountType::ASSET],
AccountType::DEBT => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE],
AccountType::REVENUE, ],
AccountType::EXPENSE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::INITIAL_BALANCE => [AccountType::ASSET, AccountType::DEBT, AccountType::LOAN, AccountType::MORTGAGE],
AccountType::LOAN => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE],
AccountType::REVENUE, ],
AccountType::MORTGAGE => [AccountType::ASSET, AccountType::DEBT, AccountType::INITIAL_BALANCE, AccountType::LOAN, AccountType::MORTGAGE,
AccountType::REVENUE],
AccountType::REVENUE, ],
AccountType::RECONCILIATION => [AccountType::ASSET],
AccountType::REVENUE => [], // is not allowed as a destination
],
@@ -631,29 +621,29 @@ return [
'allowed_transaction_types' => [
'source' => [
AccountType::ASSET => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE,
TransactionTypeModel::RECONCILIATION],
TransactionTypeModel::RECONCILIATION, ],
AccountType::EXPENSE => [], // is not allowed as a source.
AccountType::REVENUE => [TransactionTypeModel::DEPOSIT],
AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::INITIAL_BALANCE => [], // todo fill me in.
AccountType::RECONCILIATION => [], // todo fill me in.
],
'destination' => [
AccountType::ASSET => [TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER, TransactionTypeModel::OPENING_BALANCE,
TransactionTypeModel::RECONCILIATION],
TransactionTypeModel::RECONCILIATION, ],
AccountType::EXPENSE => [TransactionTypeModel::WITHDRAWAL],
AccountType::REVENUE => [], // is not allowed as destination.
AccountType::LOAN => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::DEBT => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::MORTGAGE => [TransactionTypeModel::WITHDRAWAL, TransactionTypeModel::DEPOSIT, TransactionTypeModel::TRANSFER,
TransactionTypeModel::OPENING_BALANCE],
TransactionTypeModel::OPENING_BALANCE, ],
AccountType::INITIAL_BALANCE => [], // todo fill me in.
AccountType::RECONCILIATION => [], // todo fill me in.
],