From dc784c53b503fde0ef888942ba90705c80c354c1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 4 Oct 2016 21:51:46 +0200 Subject: [PATCH 01/28] Fix for #343 --- app/Support/Navigation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 063f04be03..4431225faf 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -41,7 +41,7 @@ class Navigation '1W' => 'addWeeks', 'weekly' => 'addWeeks', 'week' => 'addWeeks', '1M' => 'addMonths', 'month' => 'addMonths', 'monthly' => 'addMonths', '3M' => 'addMonths', 'quarter' => 'addMonths', 'quarterly' => 'addMonths', '6M' => 'addMonths', 'half-year' => 'addMonths', - 'year' => 'addYears', 'yearly' => 'addYears', + 'year' => 'addYears', 'yearly' => 'addYears', '1Y' => 'addYears', ]; $modifierMap = [ 'quarter' => 3, From b355c18e0c6dafaf935ccae608f2f1b84d9e1719 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 5 Oct 2016 06:52:15 +0200 Subject: [PATCH 02/28] Some code cleanup and copyright cleanup. [skip ci] --- app/Bootstrap/ConfigureLogging.php | 6 ++- app/Console/Commands/EncryptFile.php | 6 ++- app/Console/Commands/Import.php | 6 ++- app/Console/Commands/ScanAttachments.php | 6 ++- .../Commands/UpgradeFireflyInstructions.php | 6 ++- app/Console/Commands/VerifyDatabase.php | 6 ++- app/Console/Kernel.php | 6 ++- app/Crud/Account/AccountCrud.php | 6 ++- app/Crud/Account/AccountCrudInterface.php | 6 ++- app/Crud/Split/Journal.php | 6 ++- app/Crud/Split/JournalInterface.php | 6 ++- app/Events/BudgetLimitStored.php | 6 ++- app/Events/BudgetLimitUpdated.php | 6 ++- app/Events/Event.php | 6 ++- app/Events/ResendConfirmation.php | 6 ++- app/Events/TransactionJournalStored.php | 6 ++- app/Events/TransactionJournalUpdated.php | 6 ++- app/Events/TransactionStored.php | 6 ++- app/Events/UserIsConfirmed.php | 6 ++- app/Events/UserIsDeleted.php | 6 ++- app/Events/UserRegistration.php | 6 ++- app/Exceptions/FireflyException.php | 6 ++- app/Exceptions/Handler.php | 6 ++- app/Exceptions/NotImplementedException.php | 6 ++- app/Exceptions/ValidationException.php | 6 ++- app/Export/Collector/AttachmentCollector.php | 6 ++- app/Export/Collector/BasicCollector.php | 6 ++- app/Export/Collector/CollectorInterface.php | 6 ++- app/Export/Collector/UploadCollector.php | 6 ++- app/Export/ConfigurationFile.php | 6 ++- app/Export/Entry/Entry.php | 6 ++- app/Export/Entry/EntryAccount.php | 6 ++- app/Export/Entry/EntryBill.php | 6 ++- app/Export/Entry/EntryBudget.php | 6 ++- app/Export/Entry/EntryCategory.php | 6 ++- app/Export/Exporter/BasicExporter.php | 6 ++- app/Export/Exporter/CsvExporter.php | 6 ++- app/Export/Exporter/ExporterInterface.php | 6 ++- app/Export/Processor.php | 6 ++- .../AccountChartGeneratorInterface.php | 6 ++- .../Account/ChartJsAccountChartGenerator.php | 6 ++- .../Bill/BillChartGeneratorInterface.php | 6 ++- .../Chart/Bill/ChartJsBillChartGenerator.php | 6 ++- .../Budget/BudgetChartGeneratorInterface.php | 6 ++- .../Budget/ChartJsBudgetChartGenerator.php | 6 ++- .../CategoryChartGeneratorInterface.php | 6 ++- .../ChartJsCategoryChartGenerator.php | 6 ++- .../ChartJsPiggyBankChartGenerator.php | 6 ++- .../PiggyBankChartGeneratorInterface.php | 6 ++- .../Report/ChartJsReportChartGenerator.php | 6 ++- .../Report/ReportChartGeneratorInterface.php | 6 ++- app/Handlers/Events/AttachUserRole.php | 6 ++- .../Events/BudgetLimitEventHandler.php | 6 ++- .../Events/ConnectJournalToPiggyBank.php | 6 ++- .../Events/ConnectTransactionToPiggyBank.php | 6 ++- app/Handlers/Events/FireRulesForStore.php | 6 ++- app/Handlers/Events/FireRulesForUpdate.php | 6 ++- .../Events/ScanForBillsAfterStore.php | 6 ++- .../Events/ScanForBillsAfterUpdate.php | 6 ++- app/Handlers/Events/SendRegistrationMail.php | 6 ++- .../Events/UpdateJournalConnection.php | 6 ++- app/Handlers/Events/UserConfirmation.php | 6 ++- app/Handlers/Events/UserEventListener.php | 6 ++- app/Handlers/Events/UserSaveIpAddress.php | 6 ++- app/Helpers/Attachments/AttachmentHelper.php | 6 ++- .../Attachments/AttachmentHelperInterface.php | 6 ++- app/Helpers/Collection/Account.php | 6 ++- app/Helpers/Collection/Balance.php | 6 ++- app/Helpers/Collection/BalanceEntry.php | 6 ++- app/Helpers/Collection/BalanceHeader.php | 6 ++- app/Helpers/Collection/BalanceLine.php | 6 ++- app/Helpers/Collection/Bill.php | 6 ++- app/Helpers/Collection/BillLine.php | 6 ++- app/Helpers/Collection/Budget.php | 6 ++- app/Helpers/Collection/BudgetLine.php | 6 ++- app/Helpers/Collection/Category.php | 6 ++- app/Helpers/Collection/Expense.php | 6 ++- app/Helpers/Collection/Income.php | 6 ++- app/Helpers/FiscalHelper.php | 6 ++- app/Helpers/FiscalHelperInterface.php | 6 ++- app/Helpers/Help/Help.php | 6 ++- app/Helpers/Help/HelpInterface.php | 6 ++- app/Helpers/Report/AccountReportHelper.php | 6 ++- .../Report/AccountReportHelperInterface.php | 6 ++- app/Helpers/Report/BalanceReportHelper.php | 6 ++- .../Report/BalanceReportHelperInterface.php | 6 ++- app/Helpers/Report/BudgetReportHelper.php | 6 ++- .../Report/BudgetReportHelperInterface.php | 6 ++- app/Helpers/Report/ReportHelper.php | 6 ++- app/Helpers/Report/ReportHelperInterface.php | 6 ++- app/Http/Controllers/AccountController.php | 6 ++- .../Admin/ConfigurationController.php | 6 ++- .../Controllers/Admin/DomainController.php | 6 ++- app/Http/Controllers/Admin/HomeController.php | 6 ++- app/Http/Controllers/Admin/UserController.php | 6 ++- app/Http/Controllers/AttachmentController.php | 6 ++- .../Auth/ConfirmationController.php | 6 ++- .../Auth/ForgotPasswordController.php | 6 ++- app/Http/Controllers/Auth/LoginController.php | 6 ++- .../Controllers/Auth/PasswordController.php | 6 ++- .../Controllers/Auth/RegisterController.php | 6 ++- .../Auth/ResetPasswordController.php | 6 ++- .../Controllers/Auth/TwoFactorController.php | 6 ++- app/Http/Controllers/BillController.php | 6 ++- app/Http/Controllers/BudgetController.php | 6 ++- app/Http/Controllers/CategoryController.php | 6 ++- .../Controllers/Chart/AccountController.php | 6 ++- app/Http/Controllers/Chart/BillController.php | 6 ++- .../Controllers/Chart/BudgetController.php | 6 ++- .../Controllers/Chart/CategoryController.php | 6 ++- .../Controllers/Chart/PiggyBankController.php | 6 ++- .../Controllers/Chart/ReportController.php | 6 ++- app/Http/Controllers/Controller.php | 6 ++- app/Http/Controllers/CurrencyController.php | 6 ++- app/Http/Controllers/ExportController.php | 6 ++- app/Http/Controllers/HelpController.php | 6 ++- app/Http/Controllers/HomeController.php | 6 ++- app/Http/Controllers/ImportController.php | 6 ++- app/Http/Controllers/JsonController.php | 6 ++- app/Http/Controllers/NewUserController.php | 6 ++- app/Http/Controllers/PiggyBankController.php | 6 ++- .../Controllers/Popup/ReportController.php | 6 ++- .../Controllers/PreferencesController.php | 6 ++- app/Http/Controllers/ProfileController.php | 6 ++- app/Http/Controllers/ReportController.php | 6 ++- app/Http/Controllers/RuleController.php | 6 ++- app/Http/Controllers/RuleGroupController.php | 6 ++- app/Http/Controllers/SearchController.php | 6 ++- app/Http/Controllers/TagController.php | 6 ++- .../Transaction/MassController.php | 6 ++- .../Transaction/SplitController.php | 6 ++- .../Controllers/TransactionController.php | 6 ++- app/Http/Kernel.php | 6 ++- app/Http/Middleware/Authenticate.php | 6 ++- app/Http/Middleware/AuthenticateTwoFactor.php | 6 ++- app/Http/Middleware/Binder.php | 6 ++- app/Http/Middleware/EncryptCookies.php | 6 ++- app/Http/Middleware/IsAdmin.php | 6 ++- app/Http/Middleware/IsConfirmed.php | 6 ++- app/Http/Middleware/IsNotConfirmed.php | 6 ++- app/Http/Middleware/Range.php | 6 ++- .../Middleware/RedirectIfAuthenticated.php | 6 ++- .../RedirectIfTwoFactorAuthenticated.php | 6 ++- app/Http/Middleware/VerifyCsrfToken.php | 6 ++- app/Http/Requests/AccountFormRequest.php | 6 ++- app/Http/Requests/AttachmentFormRequest.php | 6 ++- app/Http/Requests/BillFormRequest.php | 6 ++- app/Http/Requests/BudgetFormRequest.php | 6 ++- app/Http/Requests/CategoryFormRequest.php | 6 ++- app/Http/Requests/ConfigurationRequest.php | 6 ++- app/Http/Requests/CurrencyFormRequest.php | 6 ++- .../Requests/DeleteAccountFormRequest.php | 6 ++- app/Http/Requests/ExportFormRequest.php | 6 ++- app/Http/Requests/ImportUploadRequest.php | 6 ++- app/Http/Requests/JournalFormRequest.php | 6 ++- .../Requests/MassDeleteJournalRequest.php | 6 ++- app/Http/Requests/MassEditJournalRequest.php | 6 ++- app/Http/Requests/NewUserFormRequest.php | 6 ++- app/Http/Requests/PiggyBankFormRequest.php | 6 ++- app/Http/Requests/ProfileFormRequest.php | 6 ++- app/Http/Requests/Request.php | 6 ++- app/Http/Requests/RuleFormRequest.php | 6 ++- app/Http/Requests/RuleGroupFormRequest.php | 6 ++- .../Requests/SelectTransactionsRequest.php | 6 ++- app/Http/Requests/SplitJournalFormRequest.php | 6 ++- app/Http/Requests/TagFormRequest.php | 6 ++- app/Http/Requests/TestRuleFormRequest.php | 6 ++- app/Http/Requests/TokenFormRequest.php | 6 ++- app/Http/breadcrumbs.php | 6 ++- app/Import/Converter/AccountId.php | 6 ++- app/Import/Converter/Amount.php | 6 ++- app/Import/Converter/AssetAccountIban.php | 6 ++- app/Import/Converter/AssetAccountName.php | 6 ++- app/Import/Converter/AssetAccountNumber.php | 6 ++- app/Import/Converter/BasicConverter.php | 6 ++- app/Import/Converter/BillId.php | 6 ++- app/Import/Converter/BillName.php | 6 ++- app/Import/Converter/BudgetId.php | 6 ++- app/Import/Converter/BudgetName.php | 6 ++- app/Import/Converter/CategoryId.php | 6 ++- app/Import/Converter/CategoryName.php | 6 ++- app/Import/Converter/ConverterInterface.php | 6 ++- app/Import/Converter/CurrencyCode.php | 6 ++- app/Import/Converter/CurrencyId.php | 6 ++- app/Import/Converter/CurrencyName.php | 6 ++- app/Import/Converter/CurrencySymbol.php | 6 ++- app/Import/Converter/Date.php | 6 ++- app/Import/Converter/Description.php | 6 ++- app/Import/Converter/ExternalId.php | 6 ++- app/Import/Converter/INGDebetCredit.php | 6 ++- app/Import/Converter/Ignore.php | 6 ++- app/Import/Converter/OpposingAccountIban.php | 6 ++- app/Import/Converter/OpposingAccountName.php | 6 ++- .../Converter/OpposingAccountNumber.php | 6 ++- app/Import/Converter/RabobankDebetCredit.php | 6 ++- app/Import/Converter/TagsComma.php | 6 ++- app/Import/Converter/TagsSpace.php | 6 ++- app/Import/ImportEntry.php | 6 ++- app/Import/ImportProcedure.php | 6 ++- app/Import/ImportStorage.php | 6 ++- app/Import/ImportValidator.php | 6 ++- app/Import/Importer/CsvImporter.php | 6 ++- app/Import/Importer/ImporterInterface.php | 6 ++- app/Import/Logging/CommandHandler.php | 8 ++-- app/Import/Mapper/AssetAccountIbans.php | 6 ++- app/Import/Mapper/AssetAccounts.php | 6 ++- app/Import/Mapper/Bills.php | 6 ++- app/Import/Mapper/Budgets.php | 6 ++- app/Import/Mapper/Categories.php | 6 ++- app/Import/Mapper/MapperInterface.php | 6 ++- app/Import/Mapper/OpposingAccountIbans.php | 6 ++- app/Import/Mapper/OpposingAccounts.php | 6 ++- app/Import/Mapper/Tags.php | 6 ++- app/Import/Mapper/TransactionCurrencies.php | 6 ++- .../PreProcessorInterface.php | 6 ++- app/Import/MapperPreProcess/TagsComma.php | 6 ++- app/Import/MapperPreProcess/TagsSpace.php | 6 ++- app/Import/Setup/CsvSetup.php | 6 ++- app/Import/Setup/SetupInterface.php | 6 ++- app/Import/Specifics/AbnAmroDescription.php | 6 ++- app/Import/Specifics/IngDescription.php | 47 ++++++++++--------- app/Import/Specifics/PresidentsChoice.php | 6 ++- app/Import/Specifics/RabobankDescription.php | 6 ++- app/Import/Specifics/SpecificInterface.php | 6 ++- ...ExecuteRuleGroupOnExistingTransactions.php | 6 ++- app/Jobs/Job.php | 6 ++- app/Jobs/MailError.php | 6 ++- app/Models/Account.php | 6 ++- app/Models/AccountMeta.php | 6 ++- app/Models/AccountType.php | 6 ++- app/Models/Attachment.php | 6 ++- app/Models/Bill.php | 6 ++- app/Models/Budget.php | 6 ++- app/Models/BudgetLimit.php | 6 ++- app/Models/Category.php | 6 ++- app/Models/Component.php | 6 ++- app/Models/Configuration.php | 6 ++- app/Models/ExportJob.php | 6 ++- app/Models/ImportJob.php | 6 ++- app/Models/LimitRepetition.php | 6 ++- app/Models/PiggyBank.php | 6 ++- app/Models/PiggyBankEvent.php | 6 ++- app/Models/PiggyBankRepetition.php | 6 ++- app/Models/Preference.php | 6 ++- app/Models/Role.php | 6 ++- app/Models/Rule.php | 6 ++- app/Models/RuleAction.php | 6 ++- app/Models/RuleGroup.php | 6 ++- app/Models/RuleTrigger.php | 6 ++- app/Models/Tag.php | 6 ++- app/Models/Transaction.php | 6 ++- app/Models/TransactionCurrency.php | 6 ++- app/Models/TransactionGroup.php | 6 ++- app/Models/TransactionJournal.php | 6 ++- app/Models/TransactionJournalMeta.php | 6 ++- app/Models/TransactionType.php | 6 ++- app/Providers/AccountServiceProvider.php | 6 ++- app/Providers/AppServiceProvider.php | 6 ++- app/Providers/AttachmentServiceProvider.php | 6 ++- app/Providers/AuthServiceProvider.php | 6 ++- app/Providers/BillServiceProvider.php | 6 ++- app/Providers/BroadcastServiceProvider.php | 6 ++- app/Providers/BudgetServiceProvider.php | 6 ++- app/Providers/CategoryServiceProvider.php | 6 ++- app/Providers/CrudServiceProvider.php | 6 ++- app/Providers/EventServiceProvider.php | 6 ++- app/Providers/ExportJobServiceProvider.php | 6 ++- app/Providers/FireflyServiceProvider.php | 6 ++- app/Providers/JournalServiceProvider.php | 6 ++- app/Providers/PiggyBankServiceProvider.php | 6 ++- app/Providers/RouteServiceProvider.php | 6 ++- app/Providers/RuleGroupServiceProvider.php | 6 ++- app/Providers/RuleServiceProvider.php | 6 ++- app/Providers/TagServiceProvider.php | 6 ++- .../Account/AccountRepository.php | 6 ++- .../Account/AccountRepositoryInterface.php | 6 ++- .../Attachment/AttachmentRepository.php | 6 ++- .../AttachmentRepositoryInterface.php | 6 ++- app/Repositories/Bill/BillRepository.php | 6 ++- .../Bill/BillRepositoryInterface.php | 6 ++- app/Repositories/Budget/BudgetRepository.php | 6 ++- .../Budget/BudgetRepositoryInterface.php | 6 ++- .../Category/CategoryRepository.php | 6 ++- .../Category/CategoryRepositoryInterface.php | 6 ++- .../Currency/CurrencyRepository.php | 6 ++- .../Currency/CurrencyRepositoryInterface.php | 6 ++- .../ExportJob/ExportJobRepository.php | 6 ++- .../ExportJobRepositoryInterface.php | 6 ++- .../ImportJob/ImportJobRepository.php | 6 ++- .../ImportJobRepositoryInterface.php | 6 ++- .../Journal/JournalRepository.php | 6 ++- .../Journal/JournalRepositoryInterface.php | 6 ++- .../PiggyBank/PiggyBankRepository.php | 6 ++- .../PiggyBankRepositoryInterface.php | 6 ++- app/Repositories/Rule/RuleRepository.php | 6 ++- .../Rule/RuleRepositoryInterface.php | 6 ++- .../RuleGroup/RuleGroupRepository.php | 6 ++- .../RuleGroupRepositoryInterface.php | 6 ++- app/Repositories/Tag/TagRepository.php | 6 ++- .../Tag/TagRepositoryInterface.php | 6 ++- app/Repositories/User/UserRepository.php | 6 ++- .../User/UserRepositoryInterface.php | 6 ++- app/Rules/Actions/ActionInterface.php | 6 ++- app/Rules/Actions/AddTag.php | 6 ++- app/Rules/Actions/AppendDescription.php | 6 ++- app/Rules/Actions/ClearBudget.php | 6 ++- app/Rules/Actions/ClearCategory.php | 6 ++- app/Rules/Actions/PrependDescription.php | 6 ++- app/Rules/Actions/RemoveAllTags.php | 6 ++- app/Rules/Actions/RemoveTag.php | 6 ++- app/Rules/Actions/SetBudget.php | 6 ++- app/Rules/Actions/SetCategory.php | 6 ++- app/Rules/Actions/SetDescription.php | 6 ++- app/Rules/Factory/ActionFactory.php | 10 ++++ app/Rules/Factory/TriggerFactory.php | 6 ++- app/Rules/Processor.php | 6 ++- app/Rules/TransactionMatcher.php | 6 ++- app/Rules/Triggers/AbstractTrigger.php | 6 ++- app/Rules/Triggers/AmountExactly.php | 6 ++- app/Rules/Triggers/AmountLess.php | 6 ++- app/Rules/Triggers/AmountMore.php | 6 ++- app/Rules/Triggers/DescriptionContains.php | 6 ++- app/Rules/Triggers/DescriptionEnds.php | 6 ++- app/Rules/Triggers/DescriptionIs.php | 6 ++- app/Rules/Triggers/DescriptionStarts.php | 6 ++- app/Rules/Triggers/FromAccountContains.php | 6 ++- app/Rules/Triggers/FromAccountEnds.php | 6 ++- app/Rules/Triggers/FromAccountIs.php | 6 ++- app/Rules/Triggers/FromAccountStarts.php | 6 ++- app/Rules/Triggers/ToAccountContains.php | 6 ++- app/Rules/Triggers/ToAccountEnds.php | 6 ++- app/Rules/Triggers/ToAccountIs.php | 6 ++- app/Rules/Triggers/ToAccountStarts.php | 6 ++- app/Rules/Triggers/TransactionType.php | 6 ++- app/Rules/Triggers/TriggerInterface.php | 6 ++- app/Rules/Triggers/UserAction.php | 6 ++- app/Support/Amount.php | 6 ++- app/Support/Binder/AccountList.php | 6 ++- app/Support/Binder/BinderInterface.php | 6 ++- app/Support/Binder/BudgetList.php | 6 ++- app/Support/Binder/CategoryList.php | 6 ++- app/Support/Binder/Date.php | 6 ++- app/Support/Binder/JournalList.php | 6 ++- app/Support/Binder/UnfinishedJournal.php | 6 ++- app/Support/CacheProperties.php | 6 ++- app/Support/Domain.php | 6 ++- app/Support/Events/BillScanner.php | 6 ++- app/Support/ExpandedForm.php | 6 ++- app/Support/Facades/Amount.php | 6 ++- app/Support/Facades/ExpandedForm.php | 6 ++- app/Support/Facades/FireflyConfig.php | 6 ++- app/Support/Facades/Navigation.php | 6 ++- app/Support/Facades/Preferences.php | 6 ++- app/Support/Facades/Steam.php | 6 ++- app/Support/FireflyConfig.php | 6 ++- app/Support/Migration/TestData.php | 6 ++- app/Support/Models/TagSupport.php | 6 ++- .../Models/TransactionJournalSupport.php | 6 ++- app/Support/Navigation.php | 6 ++- app/Support/Preferences.php | 6 ++- app/Support/Search/Search.php | 6 ++- app/Support/Search/SearchInterface.php | 6 ++- app/Support/Steam.php | 6 ++- app/Support/Twig/Budget.php | 6 ++- app/Support/Twig/General.php | 6 ++- app/Support/Twig/Journal.php | 6 ++- app/Support/Twig/PiggyBank.php | 6 ++- app/Support/Twig/Rule.php | 6 ++- app/Support/Twig/Translation.php | 6 ++- app/User.php | 6 ++- app/Validation/FireflyValidator.php | 6 ++- bootstrap/app.php | 6 ++- bootstrap/autoload.php | 6 ++- config/app.php | 10 ++++ config/auth.php | 9 ++++ config/broadcasting.php | 9 ++++ config/cache.php | 9 ++++ config/compile.php | 9 ++++ config/csv.php | 10 ++++ config/database.php | 9 ++++ config/filesystems.php | 9 ++++ config/firefly.php | 10 ++++ config/mail.php | 9 ++++ config/queue.php | 9 ++++ config/services.php | 9 ++++ config/session.php | 10 ++++ config/upgrade.php | 10 ++++ config/view.php | 10 ++++ database/factories/ModelFactory.php | 6 ++- ...016_06_16_000000_create_support_tables.php | 6 ++- .../2016_06_16_000001_create_users_table.php | 6 ++- .../2016_06_16_000002_create_main_tables.php | 6 ++- .../2016_08_25_091522_changes_for_3101.php | 6 ++- .../2016_09_12_121359_fix_nullables.php | 6 ++- database/seeds/AccountTypeSeeder.php | 6 ++- database/seeds/DatabaseSeeder.php | 6 ++- database/seeds/PermissionSeeder.php | 6 ++- database/seeds/TestDataSeeder.php | 6 ++- database/seeds/TransactionCurrencySeeder.php | 6 ++- database/seeds/TransactionTypeSeeder.php | 6 ++- resources/lang/de_DE/breadcrumbs.php | 6 ++- resources/lang/de_DE/config.php | 6 ++- resources/lang/de_DE/csv.php | 6 ++- resources/lang/de_DE/firefly.php | 6 ++- resources/lang/de_DE/form.php | 6 ++- resources/lang/de_DE/help.php | 6 ++- resources/lang/de_DE/list.php | 6 ++- resources/lang/de_DE/pagination.php | 6 ++- resources/lang/de_DE/passwords.php | 6 ++- resources/lang/de_DE/validation.php | 6 ++- resources/lang/en_US/auth.php | 9 ++++ resources/lang/en_US/breadcrumbs.php | 6 ++- resources/lang/en_US/config.php | 6 ++- resources/lang/en_US/csv.php | 6 ++- resources/lang/en_US/firefly.php | 6 ++- resources/lang/en_US/form.php | 6 ++- resources/lang/en_US/help.php | 6 ++- resources/lang/en_US/list.php | 6 ++- resources/lang/en_US/pagination.php | 6 ++- resources/lang/en_US/passwords.php | 6 ++- resources/lang/en_US/validation.php | 6 ++- resources/lang/fr_FR/breadcrumbs.php | 6 ++- resources/lang/fr_FR/config.php | 6 ++- resources/lang/fr_FR/csv.php | 6 ++- resources/lang/fr_FR/firefly.php | 6 ++- resources/lang/fr_FR/form.php | 6 ++- resources/lang/fr_FR/help.php | 6 ++- resources/lang/fr_FR/list.php | 6 ++- resources/lang/fr_FR/pagination.php | 6 ++- resources/lang/fr_FR/passwords.php | 6 ++- resources/lang/fr_FR/validation.php | 6 ++- resources/lang/nl_NL/breadcrumbs.php | 6 ++- resources/lang/nl_NL/config.php | 6 ++- resources/lang/nl_NL/csv.php | 6 ++- resources/lang/nl_NL/firefly.php | 6 ++- resources/lang/nl_NL/form.php | 6 ++- resources/lang/nl_NL/help.php | 6 ++- resources/lang/nl_NL/list.php | 6 ++- resources/lang/nl_NL/pagination.php | 6 ++- resources/lang/nl_NL/passwords.php | 6 ++- resources/lang/nl_NL/validation.php | 6 ++- resources/lang/pt_BR/breadcrumbs.php | 6 ++- resources/lang/pt_BR/config.php | 6 ++- resources/lang/pt_BR/csv.php | 6 ++- resources/lang/pt_BR/firefly.php | 6 ++- resources/lang/pt_BR/form.php | 6 ++- resources/lang/pt_BR/help.php | 6 ++- resources/lang/pt_BR/list.php | 6 ++- resources/lang/pt_BR/pagination.php | 6 ++- resources/lang/pt_BR/passwords.php | 6 ++- resources/lang/pt_BR/validation.php | 6 ++- resources/lang/zh-HK/breadcrumbs.php | 6 ++- resources/lang/zh-HK/config.php | 6 ++- resources/lang/zh-HK/csv.php | 6 ++- resources/lang/zh-HK/firefly.php | 6 ++- resources/lang/zh-HK/form.php | 6 ++- resources/lang/zh-HK/help.php | 6 ++- resources/lang/zh-HK/list.php | 6 ++- resources/lang/zh-HK/pagination.php | 6 ++- resources/lang/zh-HK/passwords.php | 6 ++- resources/lang/zh-HK/validation.php | 6 ++- resources/lang/zh-TW/breadcrumbs.php | 6 ++- resources/lang/zh-TW/config.php | 6 ++- resources/lang/zh-TW/csv.php | 6 ++- resources/lang/zh-TW/firefly.php | 6 ++- resources/lang/zh-TW/form.php | 6 ++- resources/lang/zh-TW/help.php | 6 ++- resources/lang/zh-TW/list.php | 6 ++- resources/lang/zh-TW/pagination.php | 6 ++- resources/lang/zh-TW/passwords.php | 6 ++- resources/lang/zh-TW/validation.php | 6 ++- 471 files changed, 1998 insertions(+), 929 deletions(-) diff --git a/app/Bootstrap/ConfigureLogging.php b/app/Bootstrap/ConfigureLogging.php index eff190f44c..03b704d0f2 100644 --- a/app/Bootstrap/ConfigureLogging.php +++ b/app/Bootstrap/ConfigureLogging.php @@ -3,8 +3,10 @@ * ConfigureLogging.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Commands/EncryptFile.php b/app/Console/Commands/EncryptFile.php index 734da2de91..415649f9a4 100644 --- a/app/Console/Commands/EncryptFile.php +++ b/app/Console/Commands/EncryptFile.php @@ -3,8 +3,10 @@ * EncryptFile.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index 44a10acbe4..7b8c77e9f3 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -3,8 +3,10 @@ * Import.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Commands/ScanAttachments.php b/app/Console/Commands/ScanAttachments.php index 1f9293335f..04254afb6f 100644 --- a/app/Console/Commands/ScanAttachments.php +++ b/app/Console/Commands/ScanAttachments.php @@ -3,8 +3,10 @@ * ScanAttachments.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php index 8b14d6e545..2a4a801ade 100644 --- a/app/Console/Commands/UpgradeFireflyInstructions.php +++ b/app/Console/Commands/UpgradeFireflyInstructions.php @@ -3,8 +3,10 @@ * UpgradeFireflyInstructions.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index c14a9187f1..6d29ac9b68 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -3,8 +3,10 @@ * VerifyDatabase.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 363eccabf5..d3f6037429 100755 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -3,8 +3,10 @@ * Kernel.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index e5feeba19e..e1d63dc8fe 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -3,8 +3,10 @@ * AccountCrud.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Crud/Account/AccountCrudInterface.php b/app/Crud/Account/AccountCrudInterface.php index 3f4ebf45e2..8a3d7507c4 100644 --- a/app/Crud/Account/AccountCrudInterface.php +++ b/app/Crud/Account/AccountCrudInterface.php @@ -3,8 +3,10 @@ * AccountCrudInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Crud/Split/Journal.php b/app/Crud/Split/Journal.php index 94eda45c5b..b87600ea44 100644 --- a/app/Crud/Split/Journal.php +++ b/app/Crud/Split/Journal.php @@ -3,8 +3,10 @@ * Journal.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Crud/Split/JournalInterface.php b/app/Crud/Split/JournalInterface.php index 15793101f2..955b61ded8 100644 --- a/app/Crud/Split/JournalInterface.php +++ b/app/Crud/Split/JournalInterface.php @@ -3,8 +3,10 @@ * JournalInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/BudgetLimitStored.php b/app/Events/BudgetLimitStored.php index bcfa5f4083..3a60ceabd6 100644 --- a/app/Events/BudgetLimitStored.php +++ b/app/Events/BudgetLimitStored.php @@ -3,8 +3,10 @@ * BudgetLimitStored.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/BudgetLimitUpdated.php b/app/Events/BudgetLimitUpdated.php index f953b84285..596c59c8b2 100644 --- a/app/Events/BudgetLimitUpdated.php +++ b/app/Events/BudgetLimitUpdated.php @@ -3,8 +3,10 @@ * BudgetLimitUpdated.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/Event.php b/app/Events/Event.php index 65b6e30824..feaaa07846 100644 --- a/app/Events/Event.php +++ b/app/Events/Event.php @@ -3,8 +3,10 @@ * Event.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/ResendConfirmation.php b/app/Events/ResendConfirmation.php index 0b49a2c3f6..cb14ea8b75 100644 --- a/app/Events/ResendConfirmation.php +++ b/app/Events/ResendConfirmation.php @@ -3,8 +3,10 @@ * ResendConfirmation.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/TransactionJournalStored.php b/app/Events/TransactionJournalStored.php index 74d2be5d8b..6269425485 100644 --- a/app/Events/TransactionJournalStored.php +++ b/app/Events/TransactionJournalStored.php @@ -3,8 +3,10 @@ * TransactionJournalStored.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/TransactionJournalUpdated.php b/app/Events/TransactionJournalUpdated.php index 03ed37a609..862fcef4db 100644 --- a/app/Events/TransactionJournalUpdated.php +++ b/app/Events/TransactionJournalUpdated.php @@ -3,8 +3,10 @@ * TransactionJournalUpdated.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/TransactionStored.php b/app/Events/TransactionStored.php index bb50964738..1233ff43fd 100644 --- a/app/Events/TransactionStored.php +++ b/app/Events/TransactionStored.php @@ -3,8 +3,10 @@ * TransactionStored.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/UserIsConfirmed.php b/app/Events/UserIsConfirmed.php index 8313d835a0..0da2da63b4 100644 --- a/app/Events/UserIsConfirmed.php +++ b/app/Events/UserIsConfirmed.php @@ -3,8 +3,10 @@ * UserIsConfirmed.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/UserIsDeleted.php b/app/Events/UserIsDeleted.php index 34459decec..4312cc0178 100644 --- a/app/Events/UserIsDeleted.php +++ b/app/Events/UserIsDeleted.php @@ -3,8 +3,10 @@ * UserIsDeleted.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Events/UserRegistration.php b/app/Events/UserRegistration.php index 46670d59d1..0af1bc833e 100644 --- a/app/Events/UserRegistration.php +++ b/app/Events/UserRegistration.php @@ -3,8 +3,10 @@ * UserRegistration.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Exceptions/FireflyException.php b/app/Exceptions/FireflyException.php index 7f61b642c8..7b288959a2 100644 --- a/app/Exceptions/FireflyException.php +++ b/app/Exceptions/FireflyException.php @@ -3,8 +3,10 @@ * FireflyException.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index bc8f6e9fd1..543fe47f12 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,8 +3,10 @@ * Handler.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Exceptions/NotImplementedException.php b/app/Exceptions/NotImplementedException.php index 6cab7e0510..406989bf09 100644 --- a/app/Exceptions/NotImplementedException.php +++ b/app/Exceptions/NotImplementedException.php @@ -3,8 +3,10 @@ * NotImplementedException.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Exceptions/ValidationException.php b/app/Exceptions/ValidationException.php index f7e2251ee6..5de31b4fdd 100644 --- a/app/Exceptions/ValidationException.php +++ b/app/Exceptions/ValidationException.php @@ -3,8 +3,10 @@ * ValidationException.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Collector/AttachmentCollector.php b/app/Export/Collector/AttachmentCollector.php index a0caa261ce..2fcb534b13 100644 --- a/app/Export/Collector/AttachmentCollector.php +++ b/app/Export/Collector/AttachmentCollector.php @@ -3,8 +3,10 @@ * AttachmentCollector.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Collector/BasicCollector.php b/app/Export/Collector/BasicCollector.php index b6f0f1e7cb..353dfaf04a 100644 --- a/app/Export/Collector/BasicCollector.php +++ b/app/Export/Collector/BasicCollector.php @@ -3,8 +3,10 @@ * BasicCollector.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Collector/CollectorInterface.php b/app/Export/Collector/CollectorInterface.php index 05c4c52d8b..abf427c2d2 100644 --- a/app/Export/Collector/CollectorInterface.php +++ b/app/Export/Collector/CollectorInterface.php @@ -3,8 +3,10 @@ * CollectorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Collector/UploadCollector.php b/app/Export/Collector/UploadCollector.php index d2900e51ff..b60a17035f 100644 --- a/app/Export/Collector/UploadCollector.php +++ b/app/Export/Collector/UploadCollector.php @@ -3,8 +3,10 @@ * UploadCollector.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/ConfigurationFile.php b/app/Export/ConfigurationFile.php index 778369dbe8..be32ea8df5 100644 --- a/app/Export/ConfigurationFile.php +++ b/app/Export/ConfigurationFile.php @@ -3,8 +3,10 @@ * ConfigurationFile.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Entry/Entry.php b/app/Export/Entry/Entry.php index 531d6ef72b..fb7c12b68a 100644 --- a/app/Export/Entry/Entry.php +++ b/app/Export/Entry/Entry.php @@ -3,8 +3,10 @@ * Entry.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Entry/EntryAccount.php b/app/Export/Entry/EntryAccount.php index da23d80b68..8ea2f95b8e 100644 --- a/app/Export/Entry/EntryAccount.php +++ b/app/Export/Entry/EntryAccount.php @@ -3,8 +3,10 @@ * EntryAccount.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Entry/EntryBill.php b/app/Export/Entry/EntryBill.php index 696fb58985..723975253a 100644 --- a/app/Export/Entry/EntryBill.php +++ b/app/Export/Entry/EntryBill.php @@ -3,8 +3,10 @@ * EntryBill.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Entry/EntryBudget.php b/app/Export/Entry/EntryBudget.php index 0ca9d38ae5..cbad41a283 100644 --- a/app/Export/Entry/EntryBudget.php +++ b/app/Export/Entry/EntryBudget.php @@ -3,8 +3,10 @@ * EntryBudget.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Entry/EntryCategory.php b/app/Export/Entry/EntryCategory.php index 8a8de50dfa..051137f11f 100644 --- a/app/Export/Entry/EntryCategory.php +++ b/app/Export/Entry/EntryCategory.php @@ -3,8 +3,10 @@ * EntryCategory.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Exporter/BasicExporter.php b/app/Export/Exporter/BasicExporter.php index feed1a8674..b16b19776a 100644 --- a/app/Export/Exporter/BasicExporter.php +++ b/app/Export/Exporter/BasicExporter.php @@ -3,8 +3,10 @@ * BasicExporter.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Exporter/CsvExporter.php b/app/Export/Exporter/CsvExporter.php index 2fd8b88da2..d13497ce6a 100644 --- a/app/Export/Exporter/CsvExporter.php +++ b/app/Export/Exporter/CsvExporter.php @@ -3,8 +3,10 @@ * CsvExporter.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Exporter/ExporterInterface.php b/app/Export/Exporter/ExporterInterface.php index a529f02be6..9b8a4e4ed9 100644 --- a/app/Export/Exporter/ExporterInterface.php +++ b/app/Export/Exporter/ExporterInterface.php @@ -3,8 +3,10 @@ * ExporterInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Export/Processor.php b/app/Export/Processor.php index c3d23b7091..f5c69be451 100644 --- a/app/Export/Processor.php +++ b/app/Export/Processor.php @@ -3,8 +3,10 @@ * Processor.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Account/AccountChartGeneratorInterface.php b/app/Generator/Chart/Account/AccountChartGeneratorInterface.php index 48304d6245..c27376b837 100644 --- a/app/Generator/Chart/Account/AccountChartGeneratorInterface.php +++ b/app/Generator/Chart/Account/AccountChartGeneratorInterface.php @@ -3,8 +3,10 @@ * AccountChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php b/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php index 13a0e066ef..215a9969b0 100644 --- a/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php +++ b/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsAccountChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Bill/BillChartGeneratorInterface.php b/app/Generator/Chart/Bill/BillChartGeneratorInterface.php index 6ad00c4606..27b1c11cef 100644 --- a/app/Generator/Chart/Bill/BillChartGeneratorInterface.php +++ b/app/Generator/Chart/Bill/BillChartGeneratorInterface.php @@ -3,8 +3,10 @@ * BillChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Bill/ChartJsBillChartGenerator.php b/app/Generator/Chart/Bill/ChartJsBillChartGenerator.php index 5125c4bc16..e59b49f136 100644 --- a/app/Generator/Chart/Bill/ChartJsBillChartGenerator.php +++ b/app/Generator/Chart/Bill/ChartJsBillChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsBillChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php index 7e1e8f8d2a..fc466aa418 100644 --- a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php +++ b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php @@ -3,8 +3,10 @@ * BudgetChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php index 105db7462a..f82fb807c5 100644 --- a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php +++ b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsBudgetChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php index 834f19aa12..56d57f6966 100644 --- a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php +++ b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php @@ -3,8 +3,10 @@ * CategoryChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php index 28e7b87c47..631b867cd1 100644 --- a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php +++ b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsCategoryChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/PiggyBank/ChartJsPiggyBankChartGenerator.php b/app/Generator/Chart/PiggyBank/ChartJsPiggyBankChartGenerator.php index e31a8a23ec..2908fa0661 100644 --- a/app/Generator/Chart/PiggyBank/ChartJsPiggyBankChartGenerator.php +++ b/app/Generator/Chart/PiggyBank/ChartJsPiggyBankChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsPiggyBankChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/PiggyBank/PiggyBankChartGeneratorInterface.php b/app/Generator/Chart/PiggyBank/PiggyBankChartGeneratorInterface.php index 14bf3888e9..2841cd928e 100644 --- a/app/Generator/Chart/PiggyBank/PiggyBankChartGeneratorInterface.php +++ b/app/Generator/Chart/PiggyBank/PiggyBankChartGeneratorInterface.php @@ -3,8 +3,10 @@ * PiggyBankChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Report/ChartJsReportChartGenerator.php b/app/Generator/Chart/Report/ChartJsReportChartGenerator.php index c3d411093b..1cdb1bdedd 100644 --- a/app/Generator/Chart/Report/ChartJsReportChartGenerator.php +++ b/app/Generator/Chart/Report/ChartJsReportChartGenerator.php @@ -3,8 +3,10 @@ * ChartJsReportChartGenerator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Generator/Chart/Report/ReportChartGeneratorInterface.php b/app/Generator/Chart/Report/ReportChartGeneratorInterface.php index df15fd750f..021fad844a 100644 --- a/app/Generator/Chart/Report/ReportChartGeneratorInterface.php +++ b/app/Generator/Chart/Report/ReportChartGeneratorInterface.php @@ -3,8 +3,10 @@ * ReportChartGeneratorInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/AttachUserRole.php b/app/Handlers/Events/AttachUserRole.php index e41d18dfff..15855e3391 100644 --- a/app/Handlers/Events/AttachUserRole.php +++ b/app/Handlers/Events/AttachUserRole.php @@ -3,8 +3,10 @@ * AttachUserRole.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/BudgetLimitEventHandler.php b/app/Handlers/Events/BudgetLimitEventHandler.php index d7eb7327c4..a05a752cd2 100644 --- a/app/Handlers/Events/BudgetLimitEventHandler.php +++ b/app/Handlers/Events/BudgetLimitEventHandler.php @@ -3,8 +3,10 @@ * BudgetLimitEventHandler.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/ConnectJournalToPiggyBank.php b/app/Handlers/Events/ConnectJournalToPiggyBank.php index ae1b0c6188..1d7d75d28c 100644 --- a/app/Handlers/Events/ConnectJournalToPiggyBank.php +++ b/app/Handlers/Events/ConnectJournalToPiggyBank.php @@ -3,8 +3,10 @@ * ConnectJournalToPiggyBank.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/ConnectTransactionToPiggyBank.php b/app/Handlers/Events/ConnectTransactionToPiggyBank.php index c96c9dbfaa..8e56987a0d 100644 --- a/app/Handlers/Events/ConnectTransactionToPiggyBank.php +++ b/app/Handlers/Events/ConnectTransactionToPiggyBank.php @@ -3,8 +3,10 @@ * ConnectTransactionToPiggyBank.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/FireRulesForStore.php b/app/Handlers/Events/FireRulesForStore.php index a789585bcd..65cc16d67a 100644 --- a/app/Handlers/Events/FireRulesForStore.php +++ b/app/Handlers/Events/FireRulesForStore.php @@ -3,8 +3,10 @@ * FireRulesForStore.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/FireRulesForUpdate.php b/app/Handlers/Events/FireRulesForUpdate.php index e3c76bf9d0..889d1e3156 100644 --- a/app/Handlers/Events/FireRulesForUpdate.php +++ b/app/Handlers/Events/FireRulesForUpdate.php @@ -3,8 +3,10 @@ * FireRulesForUpdate.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/ScanForBillsAfterStore.php b/app/Handlers/Events/ScanForBillsAfterStore.php index 090fd852ef..499370eab9 100644 --- a/app/Handlers/Events/ScanForBillsAfterStore.php +++ b/app/Handlers/Events/ScanForBillsAfterStore.php @@ -3,8 +3,10 @@ * ScanForBillsAfterStore.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/ScanForBillsAfterUpdate.php b/app/Handlers/Events/ScanForBillsAfterUpdate.php index b8b1c1b9ba..11ddfee6aa 100644 --- a/app/Handlers/Events/ScanForBillsAfterUpdate.php +++ b/app/Handlers/Events/ScanForBillsAfterUpdate.php @@ -3,8 +3,10 @@ * ScanForBillsAfterUpdate.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/SendRegistrationMail.php b/app/Handlers/Events/SendRegistrationMail.php index 1bc1e9f71f..aabb3714af 100644 --- a/app/Handlers/Events/SendRegistrationMail.php +++ b/app/Handlers/Events/SendRegistrationMail.php @@ -3,8 +3,10 @@ * SendRegistrationMail.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/UpdateJournalConnection.php b/app/Handlers/Events/UpdateJournalConnection.php index 4434c82862..a30f63923a 100644 --- a/app/Handlers/Events/UpdateJournalConnection.php +++ b/app/Handlers/Events/UpdateJournalConnection.php @@ -3,8 +3,10 @@ * UpdateJournalConnection.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/UserConfirmation.php b/app/Handlers/Events/UserConfirmation.php index 09300a37ed..439db35e75 100644 --- a/app/Handlers/Events/UserConfirmation.php +++ b/app/Handlers/Events/UserConfirmation.php @@ -3,8 +3,10 @@ * UserConfirmation.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/UserEventListener.php b/app/Handlers/Events/UserEventListener.php index 984a9a0929..f81303d084 100644 --- a/app/Handlers/Events/UserEventListener.php +++ b/app/Handlers/Events/UserEventListener.php @@ -3,8 +3,10 @@ * UserEventListener.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Handlers/Events/UserSaveIpAddress.php b/app/Handlers/Events/UserSaveIpAddress.php index 7c9cab2917..1533d84127 100644 --- a/app/Handlers/Events/UserSaveIpAddress.php +++ b/app/Handlers/Events/UserSaveIpAddress.php @@ -3,8 +3,10 @@ * UserSaveIpAddress.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php index 375f5ec915..a7bb7c8573 100644 --- a/app/Helpers/Attachments/AttachmentHelper.php +++ b/app/Helpers/Attachments/AttachmentHelper.php @@ -3,8 +3,10 @@ * AttachmentHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Attachments/AttachmentHelperInterface.php b/app/Helpers/Attachments/AttachmentHelperInterface.php index c6de207c8b..ba98fd07db 100644 --- a/app/Helpers/Attachments/AttachmentHelperInterface.php +++ b/app/Helpers/Attachments/AttachmentHelperInterface.php @@ -3,8 +3,10 @@ * AttachmentHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Account.php b/app/Helpers/Collection/Account.php index 4f0adf563d..e3fc70e702 100644 --- a/app/Helpers/Collection/Account.php +++ b/app/Helpers/Collection/Account.php @@ -3,8 +3,10 @@ * Account.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Balance.php b/app/Helpers/Collection/Balance.php index db1766e4af..b708321536 100644 --- a/app/Helpers/Collection/Balance.php +++ b/app/Helpers/Collection/Balance.php @@ -3,8 +3,10 @@ * Balance.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/BalanceEntry.php b/app/Helpers/Collection/BalanceEntry.php index 9e1e758022..85701ea48b 100644 --- a/app/Helpers/Collection/BalanceEntry.php +++ b/app/Helpers/Collection/BalanceEntry.php @@ -3,8 +3,10 @@ * BalanceEntry.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/BalanceHeader.php b/app/Helpers/Collection/BalanceHeader.php index 8e4c7180f6..66a6145b44 100644 --- a/app/Helpers/Collection/BalanceHeader.php +++ b/app/Helpers/Collection/BalanceHeader.php @@ -3,8 +3,10 @@ * BalanceHeader.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/BalanceLine.php b/app/Helpers/Collection/BalanceLine.php index 905814b011..28b0d879ba 100644 --- a/app/Helpers/Collection/BalanceLine.php +++ b/app/Helpers/Collection/BalanceLine.php @@ -3,8 +3,10 @@ * BalanceLine.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Bill.php b/app/Helpers/Collection/Bill.php index da30164dbf..ce83c87551 100644 --- a/app/Helpers/Collection/Bill.php +++ b/app/Helpers/Collection/Bill.php @@ -3,8 +3,10 @@ * Bill.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/BillLine.php b/app/Helpers/Collection/BillLine.php index 67dada038e..07e49bc30b 100644 --- a/app/Helpers/Collection/BillLine.php +++ b/app/Helpers/Collection/BillLine.php @@ -3,8 +3,10 @@ * BillLine.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Budget.php b/app/Helpers/Collection/Budget.php index 3d7cc056e8..8821940b3e 100644 --- a/app/Helpers/Collection/Budget.php +++ b/app/Helpers/Collection/Budget.php @@ -3,8 +3,10 @@ * Budget.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/BudgetLine.php b/app/Helpers/Collection/BudgetLine.php index 710f0cf0a7..5538c9e8f1 100644 --- a/app/Helpers/Collection/BudgetLine.php +++ b/app/Helpers/Collection/BudgetLine.php @@ -3,8 +3,10 @@ * BudgetLine.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Category.php b/app/Helpers/Collection/Category.php index 04c356c798..7090d387ba 100644 --- a/app/Helpers/Collection/Category.php +++ b/app/Helpers/Collection/Category.php @@ -3,8 +3,10 @@ * Category.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Expense.php b/app/Helpers/Collection/Expense.php index 8550d4d86f..86ff175e28 100644 --- a/app/Helpers/Collection/Expense.php +++ b/app/Helpers/Collection/Expense.php @@ -3,8 +3,10 @@ * Expense.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php index 023b45dad2..6c1075b606 100644 --- a/app/Helpers/Collection/Income.php +++ b/app/Helpers/Collection/Income.php @@ -3,8 +3,10 @@ * Income.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/FiscalHelper.php b/app/Helpers/FiscalHelper.php index 177a7182b4..16e965f82b 100644 --- a/app/Helpers/FiscalHelper.php +++ b/app/Helpers/FiscalHelper.php @@ -3,8 +3,10 @@ * FiscalHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/FiscalHelperInterface.php b/app/Helpers/FiscalHelperInterface.php index c8c9d4e1b3..830610fa9f 100644 --- a/app/Helpers/FiscalHelperInterface.php +++ b/app/Helpers/FiscalHelperInterface.php @@ -3,8 +3,10 @@ * FiscalHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 4a283bb224..2c7d83e219 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -3,8 +3,10 @@ * Help.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Help/HelpInterface.php b/app/Helpers/Help/HelpInterface.php index a7cb671802..28665be118 100644 --- a/app/Helpers/Help/HelpInterface.php +++ b/app/Helpers/Help/HelpInterface.php @@ -3,8 +3,10 @@ * HelpInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/AccountReportHelper.php b/app/Helpers/Report/AccountReportHelper.php index 7baa188dab..c5ecb3b155 100644 --- a/app/Helpers/Report/AccountReportHelper.php +++ b/app/Helpers/Report/AccountReportHelper.php @@ -3,8 +3,10 @@ * AccountReportHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/AccountReportHelperInterface.php b/app/Helpers/Report/AccountReportHelperInterface.php index 8243656853..f5703957b2 100644 --- a/app/Helpers/Report/AccountReportHelperInterface.php +++ b/app/Helpers/Report/AccountReportHelperInterface.php @@ -3,8 +3,10 @@ * AccountReportHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index f8c26ce902..781191b576 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -3,8 +3,10 @@ * BalanceReportHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.php index 45c6822245..5aa14d09cb 100644 --- a/app/Helpers/Report/BalanceReportHelperInterface.php +++ b/app/Helpers/Report/BalanceReportHelperInterface.php @@ -3,8 +3,10 @@ * BalanceReportHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index 4478a00066..9c250e8560 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -3,8 +3,10 @@ * BudgetReportHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.php index d776da2ead..3660447c99 100644 --- a/app/Helpers/Report/BudgetReportHelperInterface.php +++ b/app/Helpers/Report/BudgetReportHelperInterface.php @@ -3,8 +3,10 @@ * BudgetReportHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 67de6c1e97..8e9803a233 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -3,8 +3,10 @@ * ReportHelper.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index d4a887d8a0..34ffcc9e7b 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -3,8 +3,10 @@ * ReportHelperInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index b1b8e7c10f..6fe2ba4f8c 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -3,8 +3,10 @@ * AccountController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index 322068234e..489b1d96e9 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -3,8 +3,10 @@ * ConfigurationController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Admin/DomainController.php b/app/Http/Controllers/Admin/DomainController.php index 51ca04b37d..31569eeba2 100644 --- a/app/Http/Controllers/Admin/DomainController.php +++ b/app/Http/Controllers/Admin/DomainController.php @@ -3,8 +3,10 @@ * DomainController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 4ca5dafeb9..d2d32751fb 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -3,8 +3,10 @@ * HomeController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index c55b586188..ad91ad8c58 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -3,8 +3,10 @@ * UserController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 2f62c3ba27..7063877e88 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -3,8 +3,10 @@ * AttachmentController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/ConfirmationController.php b/app/Http/Controllers/Auth/ConfirmationController.php index 9acdb32d43..4e34c7dcb8 100644 --- a/app/Http/Controllers/Auth/ConfirmationController.php +++ b/app/Http/Controllers/Auth/ConfirmationController.php @@ -3,8 +3,10 @@ * ConfirmationController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 46a4bedf9a..7d6e12b3fc 100755 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -3,8 +3,10 @@ * ForgotPasswordController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 51544b9813..1362584111 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -3,8 +3,10 @@ * LoginController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/PasswordController.php b/app/Http/Controllers/Auth/PasswordController.php index d91227f2c0..82f8e00770 100644 --- a/app/Http/Controllers/Auth/PasswordController.php +++ b/app/Http/Controllers/Auth/PasswordController.php @@ -3,8 +3,10 @@ * PasswordController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index f949166e88..35cd6a7ec0 100755 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -3,8 +3,10 @@ * RegisterController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index f51a4aa70d..e9a3e7b3fc 100755 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -3,8 +3,10 @@ * ResetPasswordController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index 45b599b785..d310cc3bd7 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -3,8 +3,10 @@ * TwoFactorController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index 1aad01c385..fc0e907480 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -3,8 +3,10 @@ * BillController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 46b1082a2f..fcd6928cd6 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -3,8 +3,10 @@ * BudgetController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index e9b05fd324..577a52b8d8 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -3,8 +3,10 @@ * CategoryController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 10d90f4f31..44bd381f47 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -3,8 +3,10 @@ * AccountController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 9a30caa682..78385b915b 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -3,8 +3,10 @@ * BillController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index aed2622482..0e255ec0db 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -3,8 +3,10 @@ * BudgetController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index cd195ce859..ab65675c37 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -3,8 +3,10 @@ * CategoryController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index c80f2ba6ae..bdcf1408f5 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -3,8 +3,10 @@ * PiggyBankController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 3824bfccea..261c2fa39d 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -3,8 +3,10 @@ * ReportController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index b1402eb54c..6101c947f6 100755 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -3,8 +3,10 @@ * Controller.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index cb4483e9ac..1b3e817aa7 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -3,8 +3,10 @@ * CurrencyController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 8d5808685a..5628797153 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -3,8 +3,10 @@ * ExportController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index ca1ab22164..b813a4371e 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -3,8 +3,10 @@ * HelpController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 240a44846d..889eda4c9a 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -3,8 +3,10 @@ * HomeController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php index c41a0b9f93..51a8b15123 100644 --- a/app/Http/Controllers/ImportController.php +++ b/app/Http/Controllers/ImportController.php @@ -3,8 +3,10 @@ * ImportController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php index 7897d1cf83..9153196476 100644 --- a/app/Http/Controllers/JsonController.php +++ b/app/Http/Controllers/JsonController.php @@ -3,8 +3,10 @@ * JsonController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index adc053e65b..145bc80230 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -3,8 +3,10 @@ * NewUserController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index 5acc9a5a04..fe832390aa 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -3,8 +3,10 @@ * PiggyBankController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index cc5a538139..11b052b34d 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -3,8 +3,10 @@ * ReportController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index d3b47e5558..0c4b037d07 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -3,8 +3,10 @@ * PreferencesController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index e51948dd3e..24939b2406 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -3,8 +3,10 @@ * ProfileController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 113f384f51..2540dfa588 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -3,8 +3,10 @@ * ReportController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.php index 1149c536f3..b6524dbc9e 100644 --- a/app/Http/Controllers/RuleController.php +++ b/app/Http/Controllers/RuleController.php @@ -3,8 +3,10 @@ * RuleController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/RuleGroupController.php b/app/Http/Controllers/RuleGroupController.php index a2a6cb70d9..e1ffdec383 100644 --- a/app/Http/Controllers/RuleGroupController.php +++ b/app/Http/Controllers/RuleGroupController.php @@ -3,8 +3,10 @@ * RuleGroupController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 3f0b21041b..2066537371 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -3,8 +3,10 @@ * SearchController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index cc736a793e..8459a12af8 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -3,8 +3,10 @@ * TagController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index f7c164b5ac..8334b23668 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -3,8 +3,10 @@ * MassController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index 10cde184dd..29fbaa4e57 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -3,8 +3,10 @@ * SplitController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 466e375119..164a3e8ffb 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -3,8 +3,10 @@ * TransactionController.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 8732441d0f..b9f1190f10 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -3,8 +3,10 @@ * Kernel.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 0c26c37041..529546437d 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -3,8 +3,10 @@ * Authenticate.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/AuthenticateTwoFactor.php b/app/Http/Middleware/AuthenticateTwoFactor.php index 6f4d3dcd26..7dbaa77505 100644 --- a/app/Http/Middleware/AuthenticateTwoFactor.php +++ b/app/Http/Middleware/AuthenticateTwoFactor.php @@ -3,8 +3,10 @@ * AuthenticateTwoFactor.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/Binder.php b/app/Http/Middleware/Binder.php index c4ae645a99..79cf3267fd 100644 --- a/app/Http/Middleware/Binder.php +++ b/app/Http/Middleware/Binder.php @@ -3,8 +3,10 @@ * Binder.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index b61a40ea41..6475f4f6da 100755 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -3,8 +3,10 @@ * EncryptCookies.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/IsAdmin.php b/app/Http/Middleware/IsAdmin.php index 11addec25f..598de92d86 100644 --- a/app/Http/Middleware/IsAdmin.php +++ b/app/Http/Middleware/IsAdmin.php @@ -3,8 +3,10 @@ * IsAdmin.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/IsConfirmed.php b/app/Http/Middleware/IsConfirmed.php index df7638cbcb..bd6dfa1c02 100644 --- a/app/Http/Middleware/IsConfirmed.php +++ b/app/Http/Middleware/IsConfirmed.php @@ -3,8 +3,10 @@ * IsConfirmed.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/IsNotConfirmed.php b/app/Http/Middleware/IsNotConfirmed.php index e0fb82464f..62887408c0 100644 --- a/app/Http/Middleware/IsNotConfirmed.php +++ b/app/Http/Middleware/IsNotConfirmed.php @@ -3,8 +3,10 @@ * IsNotConfirmed.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index fe4526d3ad..f64f5939e0 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -3,8 +3,10 @@ * Range.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index a0486084c0..e7cf7f3bcf 100755 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -3,8 +3,10 @@ * RedirectIfAuthenticated.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php index df21bc9583..43cc865dc7 100644 --- a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php +++ b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php @@ -3,8 +3,10 @@ * RedirectIfTwoFactorAuthenticated.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index dd56e47a6b..6eb1050494 100755 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -3,8 +3,10 @@ * VerifyCsrfToken.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php index 2522a9440d..3bad8d5ec6 100644 --- a/app/Http/Requests/AccountFormRequest.php +++ b/app/Http/Requests/AccountFormRequest.php @@ -3,8 +3,10 @@ * AccountFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/AttachmentFormRequest.php b/app/Http/Requests/AttachmentFormRequest.php index 2f3a6712c1..78cbda523b 100644 --- a/app/Http/Requests/AttachmentFormRequest.php +++ b/app/Http/Requests/AttachmentFormRequest.php @@ -3,8 +3,10 @@ * AttachmentFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.php index 02e7a2891e..3e1b5eb93b 100644 --- a/app/Http/Requests/BillFormRequest.php +++ b/app/Http/Requests/BillFormRequest.php @@ -3,8 +3,10 @@ * BillFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/BudgetFormRequest.php b/app/Http/Requests/BudgetFormRequest.php index 3dbb576214..6d1b8a02b1 100644 --- a/app/Http/Requests/BudgetFormRequest.php +++ b/app/Http/Requests/BudgetFormRequest.php @@ -3,8 +3,10 @@ * BudgetFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/CategoryFormRequest.php b/app/Http/Requests/CategoryFormRequest.php index 02b95cb14f..020777a827 100644 --- a/app/Http/Requests/CategoryFormRequest.php +++ b/app/Http/Requests/CategoryFormRequest.php @@ -3,8 +3,10 @@ * CategoryFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/ConfigurationRequest.php b/app/Http/Requests/ConfigurationRequest.php index fedd9ff04b..e45dd77f6c 100644 --- a/app/Http/Requests/ConfigurationRequest.php +++ b/app/Http/Requests/ConfigurationRequest.php @@ -3,8 +3,10 @@ * ConfigurationRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/CurrencyFormRequest.php b/app/Http/Requests/CurrencyFormRequest.php index 818597c3d1..6bfe964e65 100644 --- a/app/Http/Requests/CurrencyFormRequest.php +++ b/app/Http/Requests/CurrencyFormRequest.php @@ -3,8 +3,10 @@ * CurrencyFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/DeleteAccountFormRequest.php b/app/Http/Requests/DeleteAccountFormRequest.php index 137e718a30..9586af3767 100644 --- a/app/Http/Requests/DeleteAccountFormRequest.php +++ b/app/Http/Requests/DeleteAccountFormRequest.php @@ -3,8 +3,10 @@ * DeleteAccountFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/ExportFormRequest.php b/app/Http/Requests/ExportFormRequest.php index e20e38cf9a..028a3246cf 100644 --- a/app/Http/Requests/ExportFormRequest.php +++ b/app/Http/Requests/ExportFormRequest.php @@ -3,8 +3,10 @@ * ExportFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/ImportUploadRequest.php b/app/Http/Requests/ImportUploadRequest.php index 0884ed524f..62e4f117d8 100644 --- a/app/Http/Requests/ImportUploadRequest.php +++ b/app/Http/Requests/ImportUploadRequest.php @@ -3,8 +3,10 @@ * ImportUploadRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.php index abce71e17c..9f1a5fcdf5 100644 --- a/app/Http/Requests/JournalFormRequest.php +++ b/app/Http/Requests/JournalFormRequest.php @@ -3,8 +3,10 @@ * JournalFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/MassDeleteJournalRequest.php b/app/Http/Requests/MassDeleteJournalRequest.php index 167d8f306f..13283012d1 100644 --- a/app/Http/Requests/MassDeleteJournalRequest.php +++ b/app/Http/Requests/MassDeleteJournalRequest.php @@ -3,8 +3,10 @@ * MassDeleteJournalRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/MassEditJournalRequest.php b/app/Http/Requests/MassEditJournalRequest.php index 7f7ae97f89..03ae6ae6f7 100644 --- a/app/Http/Requests/MassEditJournalRequest.php +++ b/app/Http/Requests/MassEditJournalRequest.php @@ -3,8 +3,10 @@ * MassEditJournalRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/NewUserFormRequest.php b/app/Http/Requests/NewUserFormRequest.php index 24b094b48d..b8627cffa2 100644 --- a/app/Http/Requests/NewUserFormRequest.php +++ b/app/Http/Requests/NewUserFormRequest.php @@ -3,8 +3,10 @@ * NewUserFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php index 0363a37f33..5ef35a1541 100644 --- a/app/Http/Requests/PiggyBankFormRequest.php +++ b/app/Http/Requests/PiggyBankFormRequest.php @@ -3,8 +3,10 @@ * PiggyBankFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/ProfileFormRequest.php b/app/Http/Requests/ProfileFormRequest.php index 0b20e398d3..02bce0c99c 100644 --- a/app/Http/Requests/ProfileFormRequest.php +++ b/app/Http/Requests/ProfileFormRequest.php @@ -3,8 +3,10 @@ * ProfileFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index ad6dca8f33..84cb318d3e 100644 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -3,8 +3,10 @@ * Request.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/RuleFormRequest.php b/app/Http/Requests/RuleFormRequest.php index ffb057bcdd..975a331480 100644 --- a/app/Http/Requests/RuleFormRequest.php +++ b/app/Http/Requests/RuleFormRequest.php @@ -3,8 +3,10 @@ * RuleFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/RuleGroupFormRequest.php b/app/Http/Requests/RuleGroupFormRequest.php index 6160d4fd58..675acec024 100644 --- a/app/Http/Requests/RuleGroupFormRequest.php +++ b/app/Http/Requests/RuleGroupFormRequest.php @@ -3,8 +3,10 @@ * RuleGroupFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/SelectTransactionsRequest.php b/app/Http/Requests/SelectTransactionsRequest.php index b11e2db6aa..097089ff79 100644 --- a/app/Http/Requests/SelectTransactionsRequest.php +++ b/app/Http/Requests/SelectTransactionsRequest.php @@ -3,8 +3,10 @@ * SelectTransactionsRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/SplitJournalFormRequest.php b/app/Http/Requests/SplitJournalFormRequest.php index 828a79b888..ea246fc2d1 100644 --- a/app/Http/Requests/SplitJournalFormRequest.php +++ b/app/Http/Requests/SplitJournalFormRequest.php @@ -3,8 +3,10 @@ * SplitJournalFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/TagFormRequest.php b/app/Http/Requests/TagFormRequest.php index bb69349675..086943d7f5 100644 --- a/app/Http/Requests/TagFormRequest.php +++ b/app/Http/Requests/TagFormRequest.php @@ -3,8 +3,10 @@ * TagFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/TestRuleFormRequest.php b/app/Http/Requests/TestRuleFormRequest.php index 9eba85b2f4..df76fd08a3 100644 --- a/app/Http/Requests/TestRuleFormRequest.php +++ b/app/Http/Requests/TestRuleFormRequest.php @@ -3,8 +3,10 @@ * TestRuleFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/Requests/TokenFormRequest.php b/app/Http/Requests/TokenFormRequest.php index bdf9410799..4c90a2539f 100644 --- a/app/Http/Requests/TokenFormRequest.php +++ b/app/Http/Requests/TokenFormRequest.php @@ -3,8 +3,10 @@ * TokenFormRequest.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php index 3803ef08d9..284269215c 100644 --- a/app/Http/breadcrumbs.php +++ b/app/Http/breadcrumbs.php @@ -3,8 +3,10 @@ * breadcrumbs.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/AccountId.php b/app/Import/Converter/AccountId.php index 1f07603f63..98fa24434b 100644 --- a/app/Import/Converter/AccountId.php +++ b/app/Import/Converter/AccountId.php @@ -3,8 +3,10 @@ * AccountId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index 9bb8663b1c..bf15ad63ab 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -3,8 +3,10 @@ * Amount.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/AssetAccountIban.php b/app/Import/Converter/AssetAccountIban.php index 97f1932e14..f87f365630 100644 --- a/app/Import/Converter/AssetAccountIban.php +++ b/app/Import/Converter/AssetAccountIban.php @@ -3,8 +3,10 @@ * AssetAccountIban.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/AssetAccountName.php b/app/Import/Converter/AssetAccountName.php index f20cd7b798..9ee4b02f03 100644 --- a/app/Import/Converter/AssetAccountName.php +++ b/app/Import/Converter/AssetAccountName.php @@ -3,8 +3,10 @@ * AssetAccountName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/AssetAccountNumber.php b/app/Import/Converter/AssetAccountNumber.php index b19fce1433..2d866388f7 100644 --- a/app/Import/Converter/AssetAccountNumber.php +++ b/app/Import/Converter/AssetAccountNumber.php @@ -3,8 +3,10 @@ * AssetAccountNumber.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/BasicConverter.php b/app/Import/Converter/BasicConverter.php index dbe7b56663..bce8b5e46b 100644 --- a/app/Import/Converter/BasicConverter.php +++ b/app/Import/Converter/BasicConverter.php @@ -3,8 +3,10 @@ * BasicConverter.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/BillId.php b/app/Import/Converter/BillId.php index edb8817a10..06713afaf4 100644 --- a/app/Import/Converter/BillId.php +++ b/app/Import/Converter/BillId.php @@ -3,8 +3,10 @@ * BillId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/BillName.php b/app/Import/Converter/BillName.php index 04b48ea156..6c4aa2fc17 100644 --- a/app/Import/Converter/BillName.php +++ b/app/Import/Converter/BillName.php @@ -3,8 +3,10 @@ * BillName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/BudgetId.php b/app/Import/Converter/BudgetId.php index 617bf487fc..0fe769f70e 100644 --- a/app/Import/Converter/BudgetId.php +++ b/app/Import/Converter/BudgetId.php @@ -3,8 +3,10 @@ * BudgetId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/BudgetName.php b/app/Import/Converter/BudgetName.php index 36158c834d..fc5d5416fc 100644 --- a/app/Import/Converter/BudgetName.php +++ b/app/Import/Converter/BudgetName.php @@ -3,8 +3,10 @@ * BudgetName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CategoryId.php b/app/Import/Converter/CategoryId.php index 9f350f3fa6..5d538f4b90 100644 --- a/app/Import/Converter/CategoryId.php +++ b/app/Import/Converter/CategoryId.php @@ -3,8 +3,10 @@ * CategoryId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CategoryName.php b/app/Import/Converter/CategoryName.php index 9b79c33a1e..28e7650c1f 100644 --- a/app/Import/Converter/CategoryName.php +++ b/app/Import/Converter/CategoryName.php @@ -3,8 +3,10 @@ * CategoryName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/ConverterInterface.php b/app/Import/Converter/ConverterInterface.php index 8e74c719e3..0cc0137a05 100644 --- a/app/Import/Converter/ConverterInterface.php +++ b/app/Import/Converter/ConverterInterface.php @@ -3,8 +3,10 @@ * ConverterInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CurrencyCode.php b/app/Import/Converter/CurrencyCode.php index 57b7284765..48901cceaa 100644 --- a/app/Import/Converter/CurrencyCode.php +++ b/app/Import/Converter/CurrencyCode.php @@ -3,8 +3,10 @@ * CurrencyCode.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CurrencyId.php b/app/Import/Converter/CurrencyId.php index 644ef6ff77..6622899264 100644 --- a/app/Import/Converter/CurrencyId.php +++ b/app/Import/Converter/CurrencyId.php @@ -3,8 +3,10 @@ * CurrencyId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CurrencyName.php b/app/Import/Converter/CurrencyName.php index cb750150ff..ad28107f4b 100644 --- a/app/Import/Converter/CurrencyName.php +++ b/app/Import/Converter/CurrencyName.php @@ -3,8 +3,10 @@ * CurrencyName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/CurrencySymbol.php b/app/Import/Converter/CurrencySymbol.php index 7643087a0a..307d409cd0 100644 --- a/app/Import/Converter/CurrencySymbol.php +++ b/app/Import/Converter/CurrencySymbol.php @@ -3,8 +3,10 @@ * CurrencySymbol.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/Date.php b/app/Import/Converter/Date.php index 4cc9808291..e4b6cbb0e9 100644 --- a/app/Import/Converter/Date.php +++ b/app/Import/Converter/Date.php @@ -3,8 +3,10 @@ * Date.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/Description.php b/app/Import/Converter/Description.php index d7a2cde245..b9c3bdf807 100644 --- a/app/Import/Converter/Description.php +++ b/app/Import/Converter/Description.php @@ -3,8 +3,10 @@ * Description.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/ExternalId.php b/app/Import/Converter/ExternalId.php index 5f8c493fed..344e793be4 100644 --- a/app/Import/Converter/ExternalId.php +++ b/app/Import/Converter/ExternalId.php @@ -3,8 +3,10 @@ * ExternalId.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/INGDebetCredit.php b/app/Import/Converter/INGDebetCredit.php index b023e4c09d..1640e76d0c 100644 --- a/app/Import/Converter/INGDebetCredit.php +++ b/app/Import/Converter/INGDebetCredit.php @@ -3,8 +3,10 @@ * INGDebetCredit.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/Ignore.php b/app/Import/Converter/Ignore.php index e96b5fabb1..88f1c2c889 100644 --- a/app/Import/Converter/Ignore.php +++ b/app/Import/Converter/Ignore.php @@ -3,8 +3,10 @@ * Ignore.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/OpposingAccountIban.php b/app/Import/Converter/OpposingAccountIban.php index a0ccc57038..f035bb2d7f 100644 --- a/app/Import/Converter/OpposingAccountIban.php +++ b/app/Import/Converter/OpposingAccountIban.php @@ -3,8 +3,10 @@ * OpposingAccountIban.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/OpposingAccountName.php b/app/Import/Converter/OpposingAccountName.php index e035de8ad0..38005919f8 100644 --- a/app/Import/Converter/OpposingAccountName.php +++ b/app/Import/Converter/OpposingAccountName.php @@ -3,8 +3,10 @@ * OpposingAccountName.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/OpposingAccountNumber.php b/app/Import/Converter/OpposingAccountNumber.php index d8fbc02e62..524663ed51 100644 --- a/app/Import/Converter/OpposingAccountNumber.php +++ b/app/Import/Converter/OpposingAccountNumber.php @@ -3,8 +3,10 @@ * OpposingAccountNumber.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/RabobankDebetCredit.php b/app/Import/Converter/RabobankDebetCredit.php index 2cd9e2ed98..dfa8363e2a 100644 --- a/app/Import/Converter/RabobankDebetCredit.php +++ b/app/Import/Converter/RabobankDebetCredit.php @@ -3,8 +3,10 @@ * RabobankDebetCredit.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/TagsComma.php b/app/Import/Converter/TagsComma.php index 2fb5981378..d4e4687e3a 100644 --- a/app/Import/Converter/TagsComma.php +++ b/app/Import/Converter/TagsComma.php @@ -3,8 +3,10 @@ * TagsComma.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Converter/TagsSpace.php b/app/Import/Converter/TagsSpace.php index 4f8c7e3196..d2d86eb8eb 100644 --- a/app/Import/Converter/TagsSpace.php +++ b/app/Import/Converter/TagsSpace.php @@ -3,8 +3,10 @@ * TagsSpace.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/ImportEntry.php b/app/Import/ImportEntry.php index 931079fc55..cd3f48b402 100644 --- a/app/Import/ImportEntry.php +++ b/app/Import/ImportEntry.php @@ -3,8 +3,10 @@ * ImportEntry.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/ImportProcedure.php b/app/Import/ImportProcedure.php index 9b26b1dff5..a85872d5b3 100644 --- a/app/Import/ImportProcedure.php +++ b/app/Import/ImportProcedure.php @@ -3,8 +3,10 @@ * ImportProcedure.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/ImportStorage.php b/app/Import/ImportStorage.php index 44be15d5e6..3fdb48cc79 100644 --- a/app/Import/ImportStorage.php +++ b/app/Import/ImportStorage.php @@ -3,8 +3,10 @@ * ImportStorage.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/ImportValidator.php b/app/Import/ImportValidator.php index 65dfbbe96a..53a075f630 100644 --- a/app/Import/ImportValidator.php +++ b/app/Import/ImportValidator.php @@ -3,8 +3,10 @@ * ImportValidator.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Importer/CsvImporter.php b/app/Import/Importer/CsvImporter.php index efd1584e20..21bc7813f7 100644 --- a/app/Import/Importer/CsvImporter.php +++ b/app/Import/Importer/CsvImporter.php @@ -3,8 +3,10 @@ * CsvImporter.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Importer/ImporterInterface.php b/app/Import/Importer/ImporterInterface.php index 2ebd905f09..9994faa205 100644 --- a/app/Import/Importer/ImporterInterface.php +++ b/app/Import/Importer/ImporterInterface.php @@ -3,8 +3,10 @@ * ImporterInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Logging/CommandHandler.php b/app/Import/Logging/CommandHandler.php index b76b683e66..56813cd2ad 100644 --- a/app/Import/Logging/CommandHandler.php +++ b/app/Import/Logging/CommandHandler.php @@ -1,10 +1,12 @@ row = $row; if (count($this->row) >= 8) { // check if the array is correct switch ($this->row[4]) { // Get value for the mutation type - case 'GT': // InternetBanieren + case 'GT': // InternetBankieren case 'OV': // Overschrijving case 'VZ': // Verzamelbetaling case 'IC': // Incasso @@ -70,6 +72,19 @@ class IngDescription implements SpecificInterface return $this->row; } + /** + * Add the Opposing name from cell 1 in the description for Betaalautomaten + * Otherwise the description is only: 'Pasvolgnr: Transactie: Term:' + * + * @return bool true + */ + protected function addNameIngDescription() + { + $this->row[8] = $this->row[1] . " " . $this->row[8]; + + return true; + } + /** * Remove IBAN number out of the description * Default description of Description is: Naam: Omschrijving: IBAN: @@ -79,11 +94,11 @@ class IngDescription implements SpecificInterface protected function removeIBANIngDescription() { // Try replace the iban number with nothing. The IBAN nr is found in the third row - $this->row[8] = preg_replace('/\sIBAN:\s'.$this->row[3].'/', '', $this->row[8]); + $this->row[8] = preg_replace('/\sIBAN:\s' . $this->row[3] . '/', '', $this->row[8]); + return true; } - /** * Remove name from the description (Remove everything before the description incl the word 'Omschrijving' ) * @@ -93,19 +108,7 @@ class IngDescription implements SpecificInterface { // Try remove everything bevore the 'Omschrijving' $this->row[8] = preg_replace('/.+Omschrijving: /', '', $this->row[8]); - return true; - } - - /** - * Add the Opposing name from cell 1 in the description for Betaalautomaten - * Otherwise the description is only: 'Pasvolgnr: Transactie: Term:' - * - * @return bool true - */ - protected function addNameIngDescription() - { - $this->row[8] = $this->row[1]. " " . $this->row[8]; return true; } diff --git a/app/Import/Specifics/PresidentsChoice.php b/app/Import/Specifics/PresidentsChoice.php index d4f704887a..4e5079a949 100644 --- a/app/Import/Specifics/PresidentsChoice.php +++ b/app/Import/Specifics/PresidentsChoice.php @@ -3,8 +3,10 @@ * PresidentsChoice.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Specifics/RabobankDescription.php b/app/Import/Specifics/RabobankDescription.php index 75e074acb9..a3988f2a61 100644 --- a/app/Import/Specifics/RabobankDescription.php +++ b/app/Import/Specifics/RabobankDescription.php @@ -3,8 +3,10 @@ * RabobankDescription.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Import/Specifics/SpecificInterface.php b/app/Import/Specifics/SpecificInterface.php index c1536110e4..56a11b9f6b 100644 --- a/app/Import/Specifics/SpecificInterface.php +++ b/app/Import/Specifics/SpecificInterface.php @@ -3,8 +3,10 @@ * SpecificInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php index 3c791ddeaf..e6437ec74d 100644 --- a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php +++ b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php @@ -3,8 +3,10 @@ * ExecuteRuleGroupOnExistingTransactions.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php index 65794cc160..b5c465e455 100644 --- a/app/Jobs/Job.php +++ b/app/Jobs/Job.php @@ -3,8 +3,10 @@ * Job.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index fe01e3f2c4..a0974e694b 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -3,8 +3,10 @@ * MailError.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Account.php b/app/Models/Account.php index ff3745af39..22b5fadcfa 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -3,8 +3,10 @@ * Account.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php index ccb01e5d73..c6a2c6004a 100644 --- a/app/Models/AccountMeta.php +++ b/app/Models/AccountMeta.php @@ -3,8 +3,10 @@ * AccountMeta.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php index 88bc502ff6..920b62a950 100644 --- a/app/Models/AccountType.php +++ b/app/Models/AccountType.php @@ -3,8 +3,10 @@ * AccountType.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php index 81e067afb6..85d21c16c8 100644 --- a/app/Models/Attachment.php +++ b/app/Models/Attachment.php @@ -3,8 +3,10 @@ * Attachment.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Bill.php b/app/Models/Bill.php index 4003278f8e..1cf67c5665 100644 --- a/app/Models/Bill.php +++ b/app/Models/Bill.php @@ -3,8 +3,10 @@ * Bill.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Budget.php b/app/Models/Budget.php index 656260bf47..cfd8461f9f 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -3,8 +3,10 @@ * Budget.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php index 40229622bf..fa1ab82f95 100644 --- a/app/Models/BudgetLimit.php +++ b/app/Models/BudgetLimit.php @@ -3,8 +3,10 @@ * BudgetLimit.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Category.php b/app/Models/Category.php index 6ea3be8e99..4d83e11fc5 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -3,8 +3,10 @@ * Category.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Component.php b/app/Models/Component.php index 720f3a53a9..5d4762b515 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -3,8 +3,10 @@ * Component.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 9b3c7066a6..d74eb7255d 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -3,8 +3,10 @@ * Configuration.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/ExportJob.php b/app/Models/ExportJob.php index d82111ff62..4e9997abe1 100644 --- a/app/Models/ExportJob.php +++ b/app/Models/ExportJob.php @@ -3,8 +3,10 @@ * ExportJob.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.php index 29caecba9d..c7ba8c4427 100644 --- a/app/Models/ImportJob.php +++ b/app/Models/ImportJob.php @@ -3,8 +3,10 @@ * ImportJob.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/LimitRepetition.php b/app/Models/LimitRepetition.php index 888897357a..9d2dc5b416 100644 --- a/app/Models/LimitRepetition.php +++ b/app/Models/LimitRepetition.php @@ -3,8 +3,10 @@ * LimitRepetition.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php index a9b3b0b775..c784f8555f 100644 --- a/app/Models/PiggyBank.php +++ b/app/Models/PiggyBank.php @@ -3,8 +3,10 @@ * PiggyBank.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php index 7a2fe12d75..5e959c66c9 100644 --- a/app/Models/PiggyBankEvent.php +++ b/app/Models/PiggyBankEvent.php @@ -3,8 +3,10 @@ * PiggyBankEvent.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php index cbe16a866f..57aff06279 100644 --- a/app/Models/PiggyBankRepetition.php +++ b/app/Models/PiggyBankRepetition.php @@ -3,8 +3,10 @@ * PiggyBankRepetition.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Preference.php b/app/Models/Preference.php index 5698a48306..6bedbdd24a 100644 --- a/app/Models/Preference.php +++ b/app/Models/Preference.php @@ -3,8 +3,10 @@ * Preference.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Role.php b/app/Models/Role.php index 390db24268..c560cd6e3c 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -3,8 +3,10 @@ * Role.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Rule.php b/app/Models/Rule.php index c97e9f7f3b..43d3631773 100644 --- a/app/Models/Rule.php +++ b/app/Models/Rule.php @@ -3,8 +3,10 @@ * Rule.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php index 720a7ec753..2e13c89b9f 100644 --- a/app/Models/RuleAction.php +++ b/app/Models/RuleAction.php @@ -3,8 +3,10 @@ * RuleAction.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php index 27a1621d14..532ca0eba2 100644 --- a/app/Models/RuleGroup.php +++ b/app/Models/RuleGroup.php @@ -3,8 +3,10 @@ * RuleGroup.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php index a00f003742..684d9a9509 100644 --- a/app/Models/RuleTrigger.php +++ b/app/Models/RuleTrigger.php @@ -3,8 +3,10 @@ * RuleTrigger.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Tag.php b/app/Models/Tag.php index 1d87311a3d..afd7c4ef1b 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -3,8 +3,10 @@ * Tag.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 480c7f89f0..e03a9a84a2 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -3,8 +3,10 @@ * Transaction.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php index aa6ac48eed..1cf89fc7de 100644 --- a/app/Models/TransactionCurrency.php +++ b/app/Models/TransactionCurrency.php @@ -3,8 +3,10 @@ * TransactionCurrency.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/TransactionGroup.php b/app/Models/TransactionGroup.php index 59859cf3c2..b7dcba9627 100644 --- a/app/Models/TransactionGroup.php +++ b/app/Models/TransactionGroup.php @@ -3,8 +3,10 @@ * TransactionGroup.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index f38288e919..c9e7ffaf6c 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -3,8 +3,10 @@ * TransactionJournal.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php index c868d2ad0d..d855897713 100644 --- a/app/Models/TransactionJournalMeta.php +++ b/app/Models/TransactionJournalMeta.php @@ -3,8 +3,10 @@ * TransactionJournalMeta.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php index baf44372c5..84a1da7ccf 100644 --- a/app/Models/TransactionType.php +++ b/app/Models/TransactionType.php @@ -3,8 +3,10 @@ * TransactionType.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index a41f4890bd..dd65e6f5d6 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -3,8 +3,10 @@ * AccountServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 8b4a758db2..56ff3467cf 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,8 +3,10 @@ * AppServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/AttachmentServiceProvider.php b/app/Providers/AttachmentServiceProvider.php index 0cd70ecc90..77debb7354 100644 --- a/app/Providers/AttachmentServiceProvider.php +++ b/app/Providers/AttachmentServiceProvider.php @@ -3,8 +3,10 @@ * AttachmentServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 1d69ceb777..c46b897aa5 100755 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,8 +3,10 @@ * AuthServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/BillServiceProvider.php b/app/Providers/BillServiceProvider.php index 20bdd0f6bc..7275348a8d 100644 --- a/app/Providers/BillServiceProvider.php +++ b/app/Providers/BillServiceProvider.php @@ -3,8 +3,10 @@ * BillServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 69878d22ab..76858e1e64 100755 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -3,8 +3,10 @@ * BroadcastServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/BudgetServiceProvider.php b/app/Providers/BudgetServiceProvider.php index aa7f6687f3..51408c5098 100644 --- a/app/Providers/BudgetServiceProvider.php +++ b/app/Providers/BudgetServiceProvider.php @@ -3,8 +3,10 @@ * BudgetServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/CategoryServiceProvider.php b/app/Providers/CategoryServiceProvider.php index fbea960b60..a3deb55f30 100644 --- a/app/Providers/CategoryServiceProvider.php +++ b/app/Providers/CategoryServiceProvider.php @@ -3,8 +3,10 @@ * CategoryServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/CrudServiceProvider.php b/app/Providers/CrudServiceProvider.php index 7deb62bab1..8a18f117d1 100644 --- a/app/Providers/CrudServiceProvider.php +++ b/app/Providers/CrudServiceProvider.php @@ -3,8 +3,10 @@ * CrudServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index efc8f34d3f..d8373a2be6 100755 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -3,8 +3,10 @@ * EventServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/ExportJobServiceProvider.php b/app/Providers/ExportJobServiceProvider.php index cd908bc969..220a678623 100644 --- a/app/Providers/ExportJobServiceProvider.php +++ b/app/Providers/ExportJobServiceProvider.php @@ -3,8 +3,10 @@ * ExportJobServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php index 8380895404..6396519875 100644 --- a/app/Providers/FireflyServiceProvider.php +++ b/app/Providers/FireflyServiceProvider.php @@ -3,8 +3,10 @@ * FireflyServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.php index 4e82de187e..f7efb67dec 100644 --- a/app/Providers/JournalServiceProvider.php +++ b/app/Providers/JournalServiceProvider.php @@ -3,8 +3,10 @@ * JournalServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/PiggyBankServiceProvider.php b/app/Providers/PiggyBankServiceProvider.php index d662698511..11ba540e3c 100644 --- a/app/Providers/PiggyBankServiceProvider.php +++ b/app/Providers/PiggyBankServiceProvider.php @@ -3,8 +3,10 @@ * PiggyBankServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index e899134b7a..f8f1240557 100755 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -3,8 +3,10 @@ * RouteServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/RuleGroupServiceProvider.php b/app/Providers/RuleGroupServiceProvider.php index 4cff99454f..bddd6a8480 100644 --- a/app/Providers/RuleGroupServiceProvider.php +++ b/app/Providers/RuleGroupServiceProvider.php @@ -3,8 +3,10 @@ * RuleGroupServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/RuleServiceProvider.php b/app/Providers/RuleServiceProvider.php index 14d3163a53..a395e8cda3 100644 --- a/app/Providers/RuleServiceProvider.php +++ b/app/Providers/RuleServiceProvider.php @@ -3,8 +3,10 @@ * RuleServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Providers/TagServiceProvider.php b/app/Providers/TagServiceProvider.php index 34ef48591a..8889c9fbeb 100644 --- a/app/Providers/TagServiceProvider.php +++ b/app/Providers/TagServiceProvider.php @@ -3,8 +3,10 @@ * TagServiceProvider.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 62534384a9..a1a13961cf 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -3,8 +3,10 @@ * AccountRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 288ae35d96..255572fe3e 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -3,8 +3,10 @@ * AccountRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php index aeb518376c..4f60e36982 100644 --- a/app/Repositories/Attachment/AttachmentRepository.php +++ b/app/Repositories/Attachment/AttachmentRepository.php @@ -3,8 +3,10 @@ * AttachmentRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Attachment/AttachmentRepositoryInterface.php b/app/Repositories/Attachment/AttachmentRepositoryInterface.php index b95cc969f8..92c86b5203 100644 --- a/app/Repositories/Attachment/AttachmentRepositoryInterface.php +++ b/app/Repositories/Attachment/AttachmentRepositoryInterface.php @@ -3,8 +3,10 @@ * AttachmentRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 08c9c7f54d..b333b26cf1 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -3,8 +3,10 @@ * BillRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php index ff28c7b521..f740921cec 100644 --- a/app/Repositories/Bill/BillRepositoryInterface.php +++ b/app/Repositories/Bill/BillRepositoryInterface.php @@ -3,8 +3,10 @@ * BillRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index e80bf2e1c9..d8459de23d 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -3,8 +3,10 @@ * BudgetRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index ae5a07f3fc..0f6aba141e 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -3,8 +3,10 @@ * BudgetRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 8f4bce7e42..4f675182a5 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -3,8 +3,10 @@ * CategoryRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index d6ad9e3407..6ad9176a60 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -3,8 +3,10 @@ * CategoryRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index f713cc22ad..3b88e9ede4 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -3,8 +3,10 @@ * CurrencyRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php index b6d2a591a2..4bd01fa256 100644 --- a/app/Repositories/Currency/CurrencyRepositoryInterface.php +++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php @@ -3,8 +3,10 @@ * CurrencyRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.php index 009aadbf6e..1aae76d43e 100644 --- a/app/Repositories/ExportJob/ExportJobRepository.php +++ b/app/Repositories/ExportJob/ExportJobRepository.php @@ -3,8 +3,10 @@ * ExportJobRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php index 18ef2827f0..c9d6167873 100644 --- a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php +++ b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php @@ -3,8 +3,10 @@ * ExportJobRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php index fbf6e67eda..e8683a611f 100644 --- a/app/Repositories/ImportJob/ImportJobRepository.php +++ b/app/Repositories/ImportJob/ImportJobRepository.php @@ -3,8 +3,10 @@ * ImportJobRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php index 3d6c46b94d..a17d9ca62c 100644 --- a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php +++ b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php @@ -3,8 +3,10 @@ * ImportJobRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index d7c7ed10fb..404e5e4f21 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -3,8 +3,10 @@ * JournalRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index 0b452ec64c..56c0af0347 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -3,8 +3,10 @@ * JournalRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index d9ce4660a7..a1fc615774 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -3,8 +3,10 @@ * PiggyBankRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 54f3dd655f..22eb0a4e9a 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -3,8 +3,10 @@ * PiggyBankRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 6dcfca8e09..c1e26fec4b 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -3,8 +3,10 @@ * RuleRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Rule/RuleRepositoryInterface.php b/app/Repositories/Rule/RuleRepositoryInterface.php index 2acf299b30..518417d94a 100644 --- a/app/Repositories/Rule/RuleRepositoryInterface.php +++ b/app/Repositories/Rule/RuleRepositoryInterface.php @@ -3,8 +3,10 @@ * RuleRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php index a24dcf683c..d1292c7f72 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepository.php +++ b/app/Repositories/RuleGroup/RuleGroupRepository.php @@ -3,8 +3,10 @@ * RuleGroupRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php index 5faab4fbe3..b283160ea3 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php +++ b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php @@ -3,8 +3,10 @@ * RuleGroupRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 39ad12bc9d..0033f3c807 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -3,8 +3,10 @@ * TagRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index e0613d7cd1..aa10d6a839 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -3,8 +3,10 @@ * TagRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index e2fec6aa11..b3551077b1 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -3,8 +3,10 @@ * UserRepository.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php index 2d20707cd4..e37cd1a39d 100644 --- a/app/Repositories/User/UserRepositoryInterface.php +++ b/app/Repositories/User/UserRepositoryInterface.php @@ -3,8 +3,10 @@ * UserRepositoryInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/ActionInterface.php b/app/Rules/Actions/ActionInterface.php index c5fae472d6..0c66106d7f 100644 --- a/app/Rules/Actions/ActionInterface.php +++ b/app/Rules/Actions/ActionInterface.php @@ -3,8 +3,10 @@ * ActionInterface.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/AddTag.php b/app/Rules/Actions/AddTag.php index c05b67461a..8dc7cb17a2 100644 --- a/app/Rules/Actions/AddTag.php +++ b/app/Rules/Actions/AddTag.php @@ -3,8 +3,10 @@ * AddTag.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/AppendDescription.php b/app/Rules/Actions/AppendDescription.php index ba5c9a37e4..4169399773 100644 --- a/app/Rules/Actions/AppendDescription.php +++ b/app/Rules/Actions/AppendDescription.php @@ -3,8 +3,10 @@ * AppendDescription.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/ClearBudget.php b/app/Rules/Actions/ClearBudget.php index 6caaa96f5d..fc29eb4aae 100644 --- a/app/Rules/Actions/ClearBudget.php +++ b/app/Rules/Actions/ClearBudget.php @@ -3,8 +3,10 @@ * ClearBudget.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/ClearCategory.php b/app/Rules/Actions/ClearCategory.php index 9133eeb9a6..5af30a1811 100644 --- a/app/Rules/Actions/ClearCategory.php +++ b/app/Rules/Actions/ClearCategory.php @@ -3,8 +3,10 @@ * ClearCategory.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/PrependDescription.php b/app/Rules/Actions/PrependDescription.php index 8841a8da7d..7e734873ee 100644 --- a/app/Rules/Actions/PrependDescription.php +++ b/app/Rules/Actions/PrependDescription.php @@ -3,8 +3,10 @@ * PrependDescription.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/RemoveAllTags.php b/app/Rules/Actions/RemoveAllTags.php index 5eb6bc504d..66ddbc4810 100644 --- a/app/Rules/Actions/RemoveAllTags.php +++ b/app/Rules/Actions/RemoveAllTags.php @@ -3,8 +3,10 @@ * RemoveAllTags.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/RemoveTag.php b/app/Rules/Actions/RemoveTag.php index a29a5e6751..c002c1ff21 100644 --- a/app/Rules/Actions/RemoveTag.php +++ b/app/Rules/Actions/RemoveTag.php @@ -3,8 +3,10 @@ * RemoveTag.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/SetBudget.php b/app/Rules/Actions/SetBudget.php index e85a8da1c4..90d7aa6d18 100644 --- a/app/Rules/Actions/SetBudget.php +++ b/app/Rules/Actions/SetBudget.php @@ -3,8 +3,10 @@ * SetBudget.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/SetCategory.php b/app/Rules/Actions/SetCategory.php index 3a836ec7d3..ff6e79fb66 100644 --- a/app/Rules/Actions/SetCategory.php +++ b/app/Rules/Actions/SetCategory.php @@ -3,8 +3,10 @@ * SetCategory.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Actions/SetDescription.php b/app/Rules/Actions/SetDescription.php index 64a6e965fb..8be7339f03 100644 --- a/app/Rules/Actions/SetDescription.php +++ b/app/Rules/Actions/SetDescription.php @@ -3,8 +3,10 @@ * SetDescription.php * Copyright (C) 2016 thegrumpydictator@gmail.com * - * This software may be modified and distributed under the terms - * of the MIT license. See the LICENSE file for details. + * This software may be modified and distributed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International License. + * + * See the LICENSE file for details. */ declare(strict_types = 1); diff --git a/app/Rules/Factory/ActionFactory.php b/app/Rules/Factory/ActionFactory.php index 34ed948c19..a73c1c23b2 100644 --- a/app/Rules/Factory/ActionFactory.php +++ b/app/Rules/Factory/ActionFactory.php @@ -1,4 +1,14 @@ Date: Wed, 5 Oct 2016 16:09:37 +0200 Subject: [PATCH 03/28] Removed a method no longer necessary. --- app/Http/Controllers/ExportController.php | 11 +++++------ app/Http/Controllers/RuleGroupController.php | 11 +++++------ app/Repositories/Account/AccountRepository.php | 12 ------------ .../Account/AccountRepositoryInterface.php | 9 --------- 4 files changed, 10 insertions(+), 33 deletions(-) diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 5628797153..84003aab26 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -22,7 +22,6 @@ use FireflyIII\Export\Processor; use FireflyIII\Http\Requests\ExportFormRequest; use FireflyIII\Models\AccountType; use FireflyIII\Models\ExportJob; -use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI; use Preferences; use Response; @@ -117,20 +116,20 @@ class ExportController extends Controller } /** - * @param ExportFormRequest $request - * @param ARI $repository + * @param ExportFormRequest $request + * @param AccountCrudInterface $crud * - * @param EJRI $jobs + * @param EJRI $jobs * * @return string * @throws \FireflyIII\Exceptions\FireflyException */ - public function postIndex(ExportFormRequest $request, ARI $repository, EJRI $jobs) + public function postIndex(ExportFormRequest $request, AccountCrudInterface $crud, EJRI $jobs) { set_time_limit(0); $job = $jobs->findByKey($request->get('job')); $settings = [ - 'accounts' => $repository->get($request->get('accounts')), + 'accounts' => $crud->getAccountsById($request->get('accounts')), 'startDate' => new Carbon($request->get('export_start_range')), 'endDate' => new Carbon($request->get('export_end_range')), 'exportFormat' => $request->get('exportFormat'), diff --git a/app/Http/Controllers/RuleGroupController.php b/app/Http/Controllers/RuleGroupController.php index e1ffdec383..0998099348 100644 --- a/app/Http/Controllers/RuleGroupController.php +++ b/app/Http/Controllers/RuleGroupController.php @@ -21,7 +21,6 @@ use FireflyIII\Http\Requests\SelectTransactionsRequest; use FireflyIII\Jobs\ExecuteRuleGroupOnExistingTransactions; use FireflyIII\Models\AccountType; use FireflyIII\Models\RuleGroup; -use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface; use Input; use Preferences; @@ -147,16 +146,16 @@ class RuleGroupController extends Controller /** * Execute the given rulegroup on a set of existing transactions * - * @param SelectTransactionsRequest $request - * @param AccountRepositoryInterface $repository - * @param RuleGroup $ruleGroup + * @param SelectTransactionsRequest $request + * @param AccountCrudInterface $crud + * @param RuleGroup $ruleGroup * * @return \Illuminate\Http\RedirectResponse */ - public function execute(SelectTransactionsRequest $request, AccountRepositoryInterface $repository, RuleGroup $ruleGroup) + public function execute(SelectTransactionsRequest $request, AccountCrudInterface $crud, RuleGroup $ruleGroup) { // Get parameters specified by the user - $accounts = $repository->get($request->get('accounts')); + $accounts = $crud->getAccountsById($request->get('accounts')); $startDate = new Carbon($request->get('start_date')); $endDate = new Carbon($request->get('end_date')); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index a1a13961cf..9d862039fc 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -227,18 +227,6 @@ class AccountRepository implements AccountRepositoryInterface return $first; } - /** - * Gets all the accounts by ID, for a given set. - * - * @param array $ids - * - * @return \Illuminate\Support\Collection - */ - public function get(array $ids): Collection - { - return $this->user->accounts()->whereIn('id', $ids)->get(['accounts.*']); - } - /** * @param TransactionJournal $journal * @param Account $account diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 255572fe3e..52b201fb1d 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -79,15 +79,6 @@ interface AccountRepositoryInterface */ public function firstUseDate(Account $account): Carbon; - /** - * Gets all the accounts by ID, for a given set. - * - * @param array $ids - * - * @return \Illuminate\Support\Collection - */ - public function get(array $ids): Collection; - /** * @param TransactionJournal $journal * @param Account $account From 9920504232e2d89010cd2f193d0833d3ab77445e Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 6 Oct 2016 05:26:38 +0200 Subject: [PATCH 04/28] Fixes #346 --- app/Console/Commands/VerifyDatabase.php | 8 ++++---- app/Helpers/Report/AccountReportHelper.php | 2 +- app/Helpers/Report/BalanceReportHelper.php | 2 +- app/Repositories/Bill/BillRepository.php | 8 ++++---- app/Repositories/Journal/JournalRepository.php | 2 +- app/Support/Steam.php | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index 6d29ac9b68..eb99c2b3cd 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -197,7 +197,7 @@ class VerifyDatabase extends Command $date = is_null($entry->transaction_deleted_at) ? $entry->journal_deleted_at : $entry->transaction_deleted_at; $this->error( 'Error: Account #' . $entry->account_id . ' should have been deleted, but has not.' . - ' Find it in the table called `accounts` and change the `deleted_at` field to: "' . $date . '"' + ' Find it in the table called "accounts" and change the "deleted_at" field to: "' . $date . '"' ); } } @@ -224,7 +224,7 @@ class VerifyDatabase extends Command foreach ($set as $entry) { $this->error( 'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . - ' Find it in the table called `transactions` and change the `deleted_at` field to: "' . $entry->journal_deleted . '"' + ' Find it in the table called "transactions" and change the "deleted_at" field to: "' . $entry->journal_deleted . '"' ); } } @@ -242,7 +242,7 @@ class VerifyDatabase extends Command foreach ($set as $entry) { $this->error( - 'Error: Journal #' . $entry->id . ' has zero transactions. Open table `transaction_journals` and delete the entry with id #' . $entry->id + 'Error: Journal #' . $entry->id . ' has zero transactions. Open table "transaction_journals" and delete the entry with id #' . $entry->id ); } @@ -303,7 +303,7 @@ class VerifyDatabase extends Command foreach ($set as $entry) { $this->error( 'Error: Transaction journal #' . $entry->journal_id . ' should have been deleted, but has not.' . - ' Find it in the table called `transaction_journals` and change the `deleted_at` field to: "' . $entry->transaction_deleted . '"' + ' Find it in the table called "transaction_journals" and change the "deleted_at" field to: "' . $entry->transaction_deleted . '"' ); } } diff --git a/app/Helpers/Report/AccountReportHelper.php b/app/Helpers/Report/AccountReportHelper.php index c5ecb3b155..fdb5539ed9 100644 --- a/app/Helpers/Report/AccountReportHelper.php +++ b/app/Helpers/Report/AccountReportHelper.php @@ -139,6 +139,6 @@ class AccountReportHelper implements AccountReportHelperInterface ->whereNull('transactions.deleted_at') ->where('transaction_journals.date', '<=', $date->format('Y-m-d')) ->groupBy('accounts.id') - ->get(['accounts.id', DB::raw('SUM(`transactions`.`amount`) as `balance`')]); + ->get(['accounts.id', DB::raw('SUM(transactions.amount) AS balance')]); } } diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index 781191b576..4210cc66fe 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -128,7 +128,7 @@ class BalanceReportHelper implements BalanceReportHelperInterface ->get( [ 't_destination.account_id', - DB::raw('SUM(`t_destination`.`amount`) as `sum`'), + DB::raw('SUM(t_destination.amount) AS sum'), ] ); diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index b333b26cf1..2e12076d10 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -106,7 +106,7 @@ class BillRepository implements BillRepositoryInterface ->get( [ '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'); @@ -141,7 +141,7 @@ class BillRepository implements BillRepositoryInterface [ 'transaction_journals.bill_id', 'transaction_journals.id', - DB::raw('SUM(`transactions`.`amount`) as `journalAmount`'), + DB::raw('SUM(transactions.amount) AS journalAmount'), ] ); @@ -247,7 +247,7 @@ class BillRepository implements BillRepositoryInterface $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '<', 0); } ) - ->first([DB::raw('SUM(`transactions`.`amount`) as `sum_amount`')]); + ->first([DB::raw('SUM(transactions.amount) AS sum_amount')]); $sumAmount = $paid->sum_amount ?? '0'; $amount = bcadd($amount, $sumAmount); } @@ -282,7 +282,7 @@ class BillRepository implements BillRepositoryInterface $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '>', 0); } ) - ->first([DB::raw('SUM(`transactions`.`amount`) as `sum_amount`')]); + ->first([DB::raw('SUM(transactions.amount) AS sum_amount')]); $sumAmount = $paid->sum_amount ?? '0'; $paidBill = bcadd($sumAmount, $paidBill); } diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 404e5e4f21..fce3033619 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -229,7 +229,7 @@ class JournalRepository implements JournalRepositoryInterface $transactions = new Collection; $fields = ['transactions.id', 'transactions.created_at', 'transactions.updated_at', 'transactions.deleted_at', 'transactions.account_id', 'transactions.transaction_journal_id', 'transactions.description', 'transactions.amount', - DB::raw('SUM(`transactions`.`amount`) as `sum`')]; + DB::raw('SUM(transactions.amount) AS sum')]; $groupBy = ['transactions.id', 'transactions.created_at', 'transactions.updated_at', 'transactions.deleted_at', 'transactions.account_id', 'transactions.transaction_journal_id', 'transactions.description', 'transactions.amount']; switch ($journal->transactionType->type) { diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 15cf25c94a..d94b7af230 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -124,7 +124,7 @@ class Steam ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) ->groupBy('transaction_journals.date') - ->get(['transaction_journals.date', DB::raw('SUM(`transactions`.`amount`) as `modified`')]); + ->get(['transaction_journals.date', DB::raw('SUM(transactions.amount) AS modified')]); $currentBalance = $startBalance; foreach ($set as $entry) { $modified = is_null($entry->modified) ? '0' : strval($entry->modified); @@ -164,7 +164,7 @@ class Steam ->where('transaction_journals.date', '<=', $date->format('Y-m-d')) ->groupBy('transactions.account_id') ->whereIn('transactions.account_id', $ids) - ->get(['transactions.account_id', DB::raw('sum(`transactions`.`amount`) as aggregate')]); + ->get(['transactions.account_id', DB::raw('sum(transactions.amount) AS aggregate')]); $result = []; foreach ($balances as $entry) { @@ -191,7 +191,7 @@ class Steam $set = auth()->user()->transactions() ->whereIn('transactions.account_id', $accounts) ->groupBy(['transactions.account_id', 'transaction_journals.user_id']) - ->get(['transactions.account_id', DB::raw('MAX(`transaction_journals`.`date`) as `max_date`')]); + ->get(['transactions.account_id', DB::raw('MAX(transaction_journals.date) AS max_date')]); foreach ($set as $entry) { $list[intval($entry->account_id)] = new Carbon($entry->max_date); From 5c239c91dbd75312588653be3227d23a7467a563 Mon Sep 17 00:00:00 2001 From: Sander Kleykens Date: Thu, 6 Oct 2016 21:18:43 +0200 Subject: [PATCH 05/28] Convert raw XORs to a construct compatible with Laravel's query builder --- app/Helpers/Report/ReportHelper.php | 16 ++++++-- .../Account/AccountRepository.php | 21 ++++++++-- app/Repositories/Budget/BudgetRepository.php | 39 ++++++++++++++++--- .../Category/CategoryRepository.php | 20 ++++++++-- 4 files changed, 81 insertions(+), 15 deletions(-) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 8e9803a233..cab8f39f18 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -257,9 +257,19 @@ class ReportHelper implements ReportHelperInterface ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) ->where( - function (Builder $q) use ($ids) { - $q->whereIn('source.account_id', $ids) - ->whereIn('destination.account_id', $ids, 'xor'); + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $sourceXorDestinationQuery) use ($ids) { + $sourceXorDestinationQuery->where( + function (Builder $inSourceButNotDestinationQuery) use ($ids) { + $inSourceButNotDestinationQuery->whereIn('source.account_id', $ids) + ->whereNotIn('destination.account_id', $ids); + } + )->orWhere( + function (Builder $inDestinationButNotSourceQuery) use ($ids) { + $inDestinationButNotSourceQuery->whereIn('destination.account_id', $ids) + ->whereNotIn('source.account_id', $ids); + } + ); } ) ->get(['tags.id', 'tags.tag', 'transaction_journals.id as journal_id', 'destination.amount']); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 9d862039fc..e8b9364705 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -23,6 +23,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Steam; @@ -413,10 +414,24 @@ class AccountRepository implements AccountRepositoryInterface $join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0); } ); - $set = join(', ', $accountIds); - $query->whereRaw('(source.account_id in (' . $set . ') XOR destination.account_id in (' . $set . '))'); - + $query->where( + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $sourceXorDestinationQuery) use ($accountIds) { + $sourceXorDestinationQuery->where( + function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { + $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); + } + )->orWhere( + function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { + $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); + } + ); + } + ); } + // that should do it: $fields = TransactionJournal::queryFields(); $complete = $query->get($fields); diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index d8459de23d..51e1f37a48 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -23,6 +23,7 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; @@ -368,9 +369,22 @@ class BudgetRepository implements BudgetRepositoryInterface } if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); - $set = join(', ', $accountIds); - $query->whereRaw('(source.account_id in (' . $set . ') XOR destination.account_id in (' . $set . '))'); - + $query->where( + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $sourceXorDestinationQuery) use ($accountIds) { + $sourceXorDestinationQuery->where( + function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { + $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); + } + )->orWhere( + function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { + $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); + } + ); + } + ); } if ($budgets->count() > 0) { $budgetIds = $budgets->pluck('id')->toArray(); @@ -445,9 +459,22 @@ class BudgetRepository implements BudgetRepositoryInterface if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); - - $set = join(', ', $accountIds); - $query->whereRaw('(source.account_id in (' . $set . ') XOR destination.account_id in (' . $set . '))'); + $query->where( + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $sourceXorDestinationQuery) use ($accountIds) { + $sourceXorDestinationQuery->where( + function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { + $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); + } + )->orWhere( + function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { + $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); + } + ); + } + ); } $ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray(); $sum = '0'; diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 4f675182a5..a68c340171 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -18,6 +18,7 @@ use FireflyIII\Models\Category; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\JoinClause; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; @@ -487,9 +488,22 @@ class CategoryRepository implements CategoryRepositoryInterface } if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); - $set = join(', ', $accountIds); - $query->whereRaw('(source.account_id in (' . $set . ') XOR destination.account_id in (' . $set . '))'); - + $query->where( + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $sourceXorDestinationQuery) use ($accountIds) { + $sourceXorDestinationQuery->where( + function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { + $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); + } + )->orWhere( + function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { + $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); + } + ); + } + ); } if ($categories->count() > 0) { $categoryIds = $categories->pluck('id')->toArray(); From cf543613c93bb34e98e58168db555b48175101ad Mon Sep 17 00:00:00 2001 From: Sander Kleykens Date: Thu, 6 Oct 2016 23:49:33 +0200 Subject: [PATCH 06/28] Fix the CSV importer failing when using PostgreSQL Add ordered column to the list of columns that are selected so PostgreSQL doesn't throw an error --- app/Import/ImportStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Import/ImportStorage.php b/app/Import/ImportStorage.php index 3fdb48cc79..8b4986a9fe 100644 --- a/app/Import/ImportStorage.php +++ b/app/Import/ImportStorage.php @@ -185,7 +185,7 @@ class ImportStorage ->where('rules.active', 1) ->orderBy('rule_groups.order', 'ASC') ->orderBy('rules.order', 'ASC') - ->get(['rules.*']); + ->get(['rules.*', 'rule_groups.order']); Log::debug(sprintf('Found %d user rules.', $set->count())); return $set; From 3c5f9487a873335fbcec46bde1e6a3efdca48455 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 7 Oct 2016 05:43:47 +0200 Subject: [PATCH 07/28] Prep change log for next version [skip ci] --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82d0da3566..405e516da0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + + +## [4.0.2] - 2016-10-x +### Added +- Initial release. + +### Changed +- Initial release. + +### Deprecated +- Initial release. + +### Removed +- Initial release. + +### Fixed +- PostgreSQL compatibility thanks to @SanderKleykens + +### Security +- Initial release. + + ## [4.0.1] - 2016-10-04 ### Added - New ING import specific by @tomwerf From 49af6522a82efc6fc8b1c7f734c4cd8a3723d862 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 7 Oct 2016 05:44:21 +0200 Subject: [PATCH 08/28] Some code cleanup. --- app/Exceptions/Handler.php | 3 ++- app/Helpers/Report/ReportHelper.php | 18 +++++++-------- app/Import/Converter/Amount.php | 2 +- app/Models/Preference.php | 2 +- .../Account/AccountRepository.php | 22 +++++++++---------- app/Repositories/Budget/BudgetRepository.php | 22 +++++++++---------- .../Category/CategoryRepository.php | 18 +++++++-------- .../Category/CategoryRepositoryInterface.php | 2 +- app/Repositories/Tag/TagRepository.php | 2 +- .../Tag/TagRepositoryInterface.php | 14 ++++++------ app/Rules/Triggers/FromAccountContains.php | 3 ++- app/Rules/Triggers/ToAccountContains.php | 3 ++- app/Rules/Triggers/ToAccountEnds.php | 1 + app/Rules/Triggers/ToAccountStarts.php | 1 + 14 files changed, 59 insertions(+), 54 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 543fe47f12..4f9d8b6675 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -108,7 +108,8 @@ class Handler extends ExceptionHandler /** * Convert an authentication exception into an unauthenticated response. * - * @param \Illuminate\Http\Request $request + * @param \Illuminate\Http\Request $request + * * @return \Illuminate\Http\Response */ protected function unauthenticated($request) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index cab8f39f18..d13dd53b70 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -257,17 +257,17 @@ class ReportHelper implements ReportHelperInterface ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) ->where( - // source.account_id in accountIds XOR destination.account_id in accountIds - function (Builder $sourceXorDestinationQuery) use ($ids) { - $sourceXorDestinationQuery->where( - function (Builder $inSourceButNotDestinationQuery) use ($ids) { - $inSourceButNotDestinationQuery->whereIn('source.account_id', $ids) - ->whereNotIn('destination.account_id', $ids); + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $query) use ($ids) { + $query->where( + function (Builder $q1) use ($ids) { + $q1->whereIn('source.account_id', $ids) + ->whereNotIn('destination.account_id', $ids); } )->orWhere( - function (Builder $inDestinationButNotSourceQuery) use ($ids) { - $inDestinationButNotSourceQuery->whereIn('destination.account_id', $ids) - ->whereNotIn('source.account_id', $ids); + function (Builder $q2) use ($ids) { + $q2->whereIn('destination.account_id', $ids) + ->whereNotIn('source.account_id', $ids); } ); } diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index bf15ad63ab..6b64a2b862 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -41,7 +41,7 @@ class Amount extends BasicConverter implements ConverterInterface } if ($len > 2 && $value{$decimalPosition} == ',') { $decimal = ','; - } + } // if decimal is dot, replace all comma's and spaces with nothing. then parse as float (round to 4 pos) if ($decimal === '.') { diff --git a/app/Models/Preference.php b/app/Models/Preference.php index 6bedbdd24a..cebb90f2c2 100644 --- a/app/Models/Preference.php +++ b/app/Models/Preference.php @@ -44,7 +44,7 @@ class Preference extends Model { protected $dates = ['created_at', 'updated_at']; - protected $fillable = ['user_id', 'data', 'name','data']; + protected $fillable = ['user_id', 'data', 'name', 'data']; /** * @param $value diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index e8b9364705..fd5e695e25 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -22,8 +22,8 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; -use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Steam; @@ -415,23 +415,23 @@ class AccountRepository implements AccountRepositoryInterface } ); $query->where( - // source.account_id in accountIds XOR destination.account_id in accountIds - function (Builder $sourceXorDestinationQuery) use ($accountIds) { - $sourceXorDestinationQuery->where( - function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { - $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) - ->whereNotIn('destination.account_id', $accountIds); + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $query) use ($accountIds) { + $query->where( + function (Builder $q1) use ($accountIds) { + $q1->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); } )->orWhere( - function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { - $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) - ->whereNotIn('source.account_id', $accountIds); + function (Builder $q2) use ($accountIds) { + $q2->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); } ); } ); } - + // that should do it: $fields = TransactionJournal::queryFields(); $complete = $query->get($fields); diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 51e1f37a48..7d7e24dc52 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -22,8 +22,8 @@ use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; -use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; @@ -370,17 +370,17 @@ class BudgetRepository implements BudgetRepositoryInterface if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); $query->where( - // source.account_id in accountIds XOR destination.account_id in accountIds - function (Builder $sourceXorDestinationQuery) use ($accountIds) { - $sourceXorDestinationQuery->where( - function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { - $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) - ->whereNotIn('destination.account_id', $accountIds); + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $query) use ($accountIds) { + $query->where( + function (Builder $q1) use ($accountIds) { + $q1->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); } )->orWhere( - function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { - $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) - ->whereNotIn('source.account_id', $accountIds); + function (Builder $q2) use ($accountIds) { + $q2->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); } ); } @@ -460,7 +460,7 @@ class BudgetRepository implements BudgetRepositoryInterface if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); $query->where( - // source.account_id in accountIds XOR destination.account_id in accountIds + // source.account_id in accountIds XOR destination.account_id in accountIds function (Builder $sourceXorDestinationQuery) use ($accountIds) { $sourceXorDestinationQuery->where( function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index a68c340171..ac3ea1e285 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -489,17 +489,17 @@ class CategoryRepository implements CategoryRepositoryInterface if ($accounts->count() > 0) { $accountIds = $accounts->pluck('id')->toArray(); $query->where( - // source.account_id in accountIds XOR destination.account_id in accountIds - function (Builder $sourceXorDestinationQuery) use ($accountIds) { - $sourceXorDestinationQuery->where( - function (Builder $inSourceButNotDestinationQuery) use ($accountIds) { - $inSourceButNotDestinationQuery->whereIn('source.account_id', $accountIds) - ->whereNotIn('destination.account_id', $accountIds); + // source.account_id in accountIds XOR destination.account_id in accountIds + function (Builder $query) use ($accountIds) { + $query->where( + function (Builder $q1) use ($accountIds) { + $q1->whereIn('source.account_id', $accountIds) + ->whereNotIn('destination.account_id', $accountIds); } )->orWhere( - function (Builder $inDestinationButNotSourceQuery) use ($accountIds) { - $inDestinationButNotSourceQuery->whereIn('destination.account_id', $accountIds) - ->whereNotIn('source.account_id', $accountIds); + function (Builder $q2) use ($accountIds) { + $q2->whereIn('destination.account_id', $accountIds) + ->whereNotIn('source.account_id', $accountIds); } ); } diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index 6ad9176a60..d5aaff5bc2 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -71,7 +71,7 @@ interface CategoryRepositoryInterface public function findByName(string $name) : Category; /** - * @param Category $category + * @param Category $category * * @return Carbon */ diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 0033f3c807..6c29921d88 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -145,7 +145,7 @@ class TagRepository implements TagRepositoryInterface ->transactionJournals() ->sortCorrectly() ->expanded() - ->groupBy(['tag_transaction_journal.tag_id','tag_transaction_journal.transaction_journal_id']) + ->groupBy(['tag_transaction_journal.tag_id', 'tag_transaction_journal.transaction_journal_id']) ->get(TransactionJournal::queryFields()); return $journals; diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index aa10d6a839..b1676b2f03 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -35,13 +35,6 @@ interface TagRepositoryInterface */ public function connect(TransactionJournal $journal, Tag $tag): bool; - /** - * @param Tag $tag - * - * @return Collection - */ - public function getJournals(Tag $tag) : Collection; - /** * This method destroys a tag. * @@ -72,6 +65,13 @@ interface TagRepositoryInterface */ public function get(): Collection; + /** + * @param Tag $tag + * + * @return Collection + */ + public function getJournals(Tag $tag) : Collection; + /** * This method stores a tag. * diff --git a/app/Rules/Triggers/FromAccountContains.php b/app/Rules/Triggers/FromAccountContains.php index 475d3a2554..1b8241ef7b 100644 --- a/app/Rules/Triggers/FromAccountContains.php +++ b/app/Rules/Triggers/FromAccountContains.php @@ -83,7 +83,8 @@ final class FromAccountContains extends AbstractTrigger implements TriggerInterf Log::debug( sprintf( 'RuleTrigger FromAccountContains for journal #%d: "%s" does not contain "%s", return false.', - $journal->id, $fromAccountName, $search) + $journal->id, $fromAccountName, $search + ) ); return false; diff --git a/app/Rules/Triggers/ToAccountContains.php b/app/Rules/Triggers/ToAccountContains.php index 926c141808..d80c9ab4d5 100644 --- a/app/Rules/Triggers/ToAccountContains.php +++ b/app/Rules/Triggers/ToAccountContains.php @@ -83,7 +83,8 @@ final class ToAccountContains extends AbstractTrigger implements TriggerInterfac Log::debug( sprintf( 'RuleTrigger ToAccountContains for journal #%d: "%s" does not contain "%s", return false.', - $journal->id, $toAccountName, $search) + $journal->id, $toAccountName, $search + ) ); return false; diff --git a/app/Rules/Triggers/ToAccountEnds.php b/app/Rules/Triggers/ToAccountEnds.php index 13d6eed81e..f4fd676422 100644 --- a/app/Rules/Triggers/ToAccountEnds.php +++ b/app/Rules/Triggers/ToAccountEnds.php @@ -86,6 +86,7 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface if ($part === $search) { Log::debug(sprintf('RuleTrigger ToAccountEnds for journal #%d: "%s" ends with "%s", return true.', $journal->id, $toAccountName, $search)); + return true; } diff --git a/app/Rules/Triggers/ToAccountStarts.php b/app/Rules/Triggers/ToAccountStarts.php index 619c0209fb..f5f162c283 100644 --- a/app/Rules/Triggers/ToAccountStarts.php +++ b/app/Rules/Triggers/ToAccountStarts.php @@ -75,6 +75,7 @@ final class ToAccountStarts extends AbstractTrigger implements TriggerInterface if ($part === $search) { Log::debug(sprintf('RuleTrigger ToAccountStarts for journal #%d: "%s" starts with "%s", return true.', $journal->id, $toAccountName, $search)); + return true; } Log::debug(sprintf('RuleTrigger ToAccountStarts for journal #%d: "%s" does not start with "%s", return false.', $journal->id, $toAccountName, $search)); From 4d91f7d23a39f9c8e0bfb531335baa860a7b0fd5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 7 Oct 2016 09:40:50 +0200 Subject: [PATCH 09/28] This fixes #344 --- app/Repositories/PiggyBank/PiggyBankRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index a1fc615774..9eca01a95a 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -200,6 +200,10 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface // remove money from the rep. $repetition = $piggyBank->currentRelevantRep(); if ($repetition->currentamount > $piggyBank->targetamount) { + + $diff = bcsub($piggyBank->targetamount, $repetition->currentamount); + $this->createEvent($piggyBank, $diff); + $repetition->currentamount = $piggyBank->targetamount; $repetition->save(); } From c0fdf44ad2a03f30c815b7074b38b80dd23268ec Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 7 Oct 2016 11:40:03 +0200 Subject: [PATCH 10/28] Small cleaning up. --- app/Support/FireflyConfig.php | 4 ++-- app/Support/Models/TagSupport.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index 13777acf6a..a6a528b8a0 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -33,11 +33,11 @@ class FireflyConfig */ public function delete($name): bool { - $fullName = 'preference' . auth()->user()->id . $name; + $fullName = 'ff-config-' . $name; if (Cache::has($fullName)) { Cache::forget($fullName); } - Preference::where('user_id', auth()->user()->id)->where('name', $name)->delete(); + Configuration::where('name', $name)->delete(); return true; } diff --git a/app/Support/Models/TagSupport.php b/app/Support/Models/TagSupport.php index cc1374c3ea..f053ef42cf 100644 --- a/app/Support/Models/TagSupport.php +++ b/app/Support/Models/TagSupport.php @@ -33,9 +33,9 @@ class TagSupport extends Model public static function tagAllowAdvance(Tag $tag): bool { /* - * If this tag is a balancing act, and it contains transfers, it cannot be - * changes to an advancePayment. - */ + * If this tag is a balancing act, and it contains transfers, it cannot be + * changes to an advancePayment. + */ if ($tag->tagMode == 'balancingAct' || $tag->tagMode == 'nothing') { foreach ($tag->transactionjournals as $journal) { From 39dab4fdd973ee53176c8b7c980f4a9f0c80b2d8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 7 Oct 2016 12:28:14 +0200 Subject: [PATCH 11/28] Remove unused class. --- app/Models/Component.php | 44 ---------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 app/Models/Component.php diff --git a/app/Models/Component.php b/app/Models/Component.php deleted file mode 100644 index 5d4762b515..0000000000 --- a/app/Models/Component.php +++ /dev/null @@ -1,44 +0,0 @@ - Date: Fri, 7 Oct 2016 16:33:17 +0200 Subject: [PATCH 12/28] Removed some unused code. --- app/Crud/Account/AccountCrud.php | 32 ++----------------- app/Crud/Account/AccountCrudInterface.php | 7 ---- .../Controllers/TransactionController.php | 1 + 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index e1d63dc8fe..172d3f1783 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -119,7 +119,7 @@ class AccountCrud implements AccountCrudInterface */ public function findByIban(string $iban, array $types): Account { - $query = $this->user->accounts()->where('iban', '!=', ''); + $query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban'); if (count($types) > 0) { $query->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id'); @@ -176,11 +176,7 @@ class AccountCrud implements AccountCrudInterface public function getAccountsById(array $accountIds): Collection { /** @var Collection $result */ - $query = $this->user->accounts()->with( - ['accountmeta' => function (HasMany $query) { - $query->where('name', 'accountRole'); - }] - ); + $query = $this->user->accounts(); if (count($accountIds) > 0) { $query->whereIn('accounts.id', $accountIds); @@ -204,11 +200,7 @@ class AccountCrud implements AccountCrudInterface public function getAccountsByType(array $types): Collection { /** @var Collection $result */ - $query = $this->user->accounts()->with( - ['accountmeta' => function (HasMany $query) { - $query->where('name', 'accountRole'); - }] - ); + $query = $this->user->accounts(); if (count($types) > 0) { $query->accountTypeIn($types); } @@ -303,24 +295,6 @@ class AccountCrud implements AccountCrudInterface return $account; } - /** - * @param Account $account - * @param string $type - * - * @return Account - */ - public function updateAccountType(Account $account, string $type): Account - { - $type = AccountType::whereType($type)->first(); - if (!is_null($type)) { - $account->accountType()->associate($type); - $account->save(); - } - - return $this->find($account->id); - - } - /** * @param array $data * diff --git a/app/Crud/Account/AccountCrudInterface.php b/app/Crud/Account/AccountCrudInterface.php index 8a3d7507c4..772bf6afcb 100644 --- a/app/Crud/Account/AccountCrudInterface.php +++ b/app/Crud/Account/AccountCrudInterface.php @@ -108,11 +108,4 @@ interface AccountCrudInterface */ public function update(Account $account, array $data): Account; - /** - * @param Account $account - * @param string $type - * - * @return Account - */ - public function updateAccountType(Account $account, string $type): Account; } diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 164a3e8ffb..7880ddea05 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -62,6 +62,7 @@ class TransactionController extends Controller */ public function create(string $what = TransactionType::DEPOSIT) { + /** @var AccountCrudInterface $crud */ $crud = app(AccountCrudInterface::class); $budgetRepository = app('FireflyIII\Repositories\Budget\BudgetRepositoryInterface'); $piggyRepository = app('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface'); From 24f62b8fce4e0ac5685ea078fb199a9e9fdc1244 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Oct 2016 10:02:33 +0200 Subject: [PATCH 13/28] Some minor refactoring. --- app/Crud/Account/AccountCrud.php | 263 +++++++++++------- app/Crud/Account/AccountCrudInterface.php | 7 + app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/NewUserController.php | 8 +- app/Models/Account.php | 14 - .../Account/AccountRepository.php | 12 - .../Account/AccountRepositoryInterface.php | 7 - 7 files changed, 170 insertions(+), 143 deletions(-) diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index 172d3f1783..814735dae1 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -15,6 +15,7 @@ namespace FireflyIII\Crud\Account; use Carbon\Carbon; use DB; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountType; @@ -51,6 +52,18 @@ class AccountCrud implements AccountCrudInterface $this->user = $user; } + /** + * @param array $types + * + * @return int + */ + public function count(array $types):int + { + $count = $this->user->accounts()->accountTypeIn($types)->count(); + + return $count; + } + /** * @param Account $account * @param Account $moveTo @@ -250,13 +263,14 @@ class AccountCrud implements AccountCrudInterface public function store(array $data): Account { $newAccount = $this->storeAccount($data); - if (!is_null($newAccount->id)) { - $this->storeMetadata($newAccount, $data); - } + $this->updateMetadata($newAccount, $data); - if ($data['openingBalance'] != 0) { - $this->storeInitialBalance($newAccount, $data); + if ($this->validOpeningBalanceData($data)) { + $this->updateInitialBalance($newAccount, $data); + + return $newAccount; } + $this->deleteInitialBalance($newAccount); return $newAccount; @@ -295,16 +309,66 @@ class AccountCrud implements AccountCrudInterface return $account; } + /** + * @param Account $account + */ + protected function deleteInitialBalance(Account $account) + { + $journal = $this->openingBalanceTransaction($account); + if (!is_null($journal->id)) { + $journal->delete(); + } + + } + + /** + * @param Account $account + * + * @return TransactionJournal|null + */ + protected function openingBalanceTransaction(Account $account): TransactionJournal + { + $journal = TransactionJournal + ::sortCorrectly() + ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transactions.account_id', $account->id) + ->transactionTypes([TransactionType::OPENING_BALANCE]) + ->first(['transaction_journals.*']); + if (is_null($journal)) { + Log::debug('Could not find a opening balance journal, return empty one.'); + + return new TransactionJournal; + } + Log::debug(sprintf('Found opening balance: journal #%d.', $journal->id)); + + return $journal; + } + /** * @param array $data * * @return Account + * @throws FireflyException */ protected function storeAccount(array $data): Account { - $type = config('firefly.accountTypeByIdentifier.' . $data['accountType']); - $accountType = AccountType::whereType($type)->first(); - $newAccount = new Account( + $data['accountType'] = $data['accountType'] ?? 'invalid'; + $type = config('firefly.accountTypeByIdentifier.' . $data['accountType']); + $accountType = AccountType::whereType($type)->first(); + + // verify account type + if (is_null($accountType)) { + throw new FireflyException(sprintf('Account type "%s" is invalid. Cannot create account.', $data['accountType'])); + } + + // account may exist already: + $existingAccount = $this->findByName($data['name'], [$data['accountType']]); + if (!is_null($existingAccount->id)) { + throw new FireflyException(sprintf('There already is an account named "%s" of type "%s".', $data['name'], $data['accountType'])); + } + + // create it: + $newAccount = new Account( [ 'user_id' => $data['user'], 'account_type_id' => $accountType->id, @@ -314,26 +378,14 @@ class AccountCrud implements AccountCrudInterface 'iban' => $data['iban'], ] ); - - if (!$newAccount->isValid()) { - // does the account already exist? - $searchData = [ - 'user_id' => $data['user'], - 'account_type_id' => $accountType->id, - 'virtual_balance' => $data['virtualBalance'], - 'name' => $data['name'], - 'iban' => $data['iban'], - ]; - $existingAccount = Account::firstOrNullEncrypted($searchData); - if (!$existingAccount) { - Log::error('Account create error', $newAccount->getErrors()->toArray()); - - return new Account; - } - $newAccount = $existingAccount; - - } $newAccount->save(); + // verify its creation: + if (is_null($newAccount->id)) { + Log::error( + sprintf('Could not create account "%s" (%d error(s))', $data['name'], $newAccount->getErrors()->count()), $newAccount->getErrors()->toArray() + ); + throw new FireflyException(sprintf('Tried to create account named "%s" but failed. The logs have more details.', $data['name'])); + } return $newAccount; } @@ -362,6 +414,7 @@ class AccountCrud implements AccountCrudInterface 'encrypted' => true, ] ); + Log::debug(sprintf('Created new opening balance journal: #%d', $journal->id)); $firstAccount = $account; $secondAccount = $opposing; @@ -380,27 +433,32 @@ class AccountCrud implements AccountCrudInterface $two = new Transaction(['account_id' => $secondAccount->id, 'transaction_journal_id' => $journal->id, 'amount' => $secondAmount]); $two->save(); // second transaction: to + Log::debug(sprintf('Stored two transactions, #%d and #%d', $one->id, $two->id)); + return $journal; } /** - * @param Account $account - * @param array $data + * @param float $amount + * @param int $user + * @param string $name + * + * @return Account */ - protected function storeMetadata(Account $account, array $data) + protected function storeOpposingAccount(float $amount, int $user, string $name):Account { - foreach ($this->validFields as $field) { - if (isset($data[$field])) { - $metaData = new AccountMeta( - [ - 'account_id' => $account->id, - 'name' => $field, - 'data' => $data[$field], - ] - ); - $metaData->save(); - } - } + $type = $amount < 0 ? 'expense' : 'revenue'; + $opposingData = [ + 'user' => $user, + 'accountType' => $type, + 'name' => $name . ' initial balance', + 'active' => false, + 'iban' => '', + 'virtualBalance' => 0, + ]; + Log::debug('Going to create an opening balance opposing account'); + + return $this->storeAccount($opposingData); } /** @@ -412,21 +470,24 @@ class AccountCrud implements AccountCrudInterface protected function updateInitialBalance(Account $account, array $data): bool { $openingBalance = $this->openingBalanceTransaction($account); - if ($data['openingBalance'] != 0) { - if (!is_null($openingBalance->id)) { - $date = $data['openingBalanceDate']; - $amount = $data['openingBalance']; - - return $this->updateJournal($account, $openingBalance, $date, $amount); - } + // no opening balance journal? create it: + if (is_null($openingBalance->id)) { + Log::debug('No opening balance journal yet, create journal.'); $this->storeInitialBalance($account, $data); return true; } - // else, delete it: - if ($openingBalance) { // opening balance is zero, should we delete it? - $openingBalance->delete(); // delete existing opening balance. + // opening balance data? update it! + if (!is_null($openingBalance->id)) { + $date = $data['openingBalanceDate']; + $amount = $data['openingBalance']; + + Log::debug('Opening balance journal found, update journal.'); + + $this->updateOpeningBalanceJournal($account, $openingBalance, $date, $amount); + + return true; } return true; @@ -440,71 +501,41 @@ class AccountCrud implements AccountCrudInterface protected function updateMetadata(Account $account, array $data) { foreach ($this->validFields as $field) { + /** @var AccountMeta $entry */ $entry = $account->accountMeta()->where('name', $field)->first(); - if (isset($data[$field])) { - // update if new data is present: - if (!is_null($entry)) { - $entry->data = $data[$field]; - $entry->save(); - - continue; - } - $metaData = new AccountMeta( + // if $data has field and $entry is null, create new one: + if (isset($data[$field]) && is_null($entry)) { + Log::debug( + sprintf( + 'Created meta-field "%s":"%s" for account #%d ("%s") ', + $field, $data[$field], $account->id, $account->name + ) + ); + AccountMeta::create( [ 'account_id' => $account->id, 'name' => $field, 'data' => $data[$field], ] ); - $metaData->save(); + } + + // if $data has field and $entry is not null, update $entry: + if (isset($data[$field]) && !is_null($entry)) { + $entry->data = $data[$field]; + $entry->save(); + Log::debug( + sprintf( + 'Updated meta-field "%s":"%s" for account #%d ("%s") ', + $field, $data[$field], $account->id, $account->name + ) + ); } } } - /** - * @param Account $account - * - * @return TransactionJournal|null - */ - private function openingBalanceTransaction(Account $account): TransactionJournal - { - $journal = TransactionJournal - ::sortCorrectly() - ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transactions.account_id', $account->id) - ->transactionTypes([TransactionType::OPENING_BALANCE]) - ->first(['transaction_journals.*']); - if (is_null($journal)) { - return new TransactionJournal; - } - - return $journal; - } - - /** - * @param float $amount - * @param int $user - * @param string $name - * - * @return Account - */ - private function storeOpposingAccount(float $amount, int $user, string $name):Account - { - $type = $amount < 0 ? 'expense' : 'revenue'; - $opposingData = [ - 'user' => $user, - 'accountType' => $type, - 'name' => $name . ' initial balance', - 'active' => false, - 'iban' => '', - 'virtualBalance' => 0, - ]; - - return $this->storeAccount($opposingData); - } - /** * @param Account $account * @param TransactionJournal $journal @@ -513,7 +544,7 @@ class AccountCrud implements AccountCrudInterface * * @return bool */ - private function updateJournal(Account $account, TransactionJournal $journal, Carbon $date, float $amount): bool + protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, Carbon $date, float $amount): bool { // update date: $journal->date = $date; @@ -530,8 +561,30 @@ class AccountCrud implements AccountCrudInterface $transaction->save(); } } + Log::debug('Updated opening balance journal.'); return true; } + + /** + * @param array $data + * + * @return bool + */ + protected function validOpeningBalanceData(array $data): bool + { + if (isset($data['openingBalance']) + && isset($data['openingBalanceDate']) + && isset($data['openingBalanceCurrency']) + && bccomp(strval($data['openingBalance']), '0') !== 0 + ) { + Log::debug('Array has valid opening balance data.'); + + return true; + } + Log::debug('Array does not have valid opening balance data.'); + + return false; + } } diff --git a/app/Crud/Account/AccountCrudInterface.php b/app/Crud/Account/AccountCrudInterface.php index 772bf6afcb..f7e995f020 100644 --- a/app/Crud/Account/AccountCrudInterface.php +++ b/app/Crud/Account/AccountCrudInterface.php @@ -24,6 +24,13 @@ use Illuminate\Support\Collection; */ interface AccountCrudInterface { + /** + * @param array $types + * + * @return int + */ + public function count(array $types):int; + /** * @param Account $account * @param Account $moveTo diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 889eda4c9a..51ef56eac4 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -123,7 +123,7 @@ class HomeController extends Controller { $types = config('firefly.accountTypesByIdentifier.asset'); - $count = $repository->countAccounts($types); + $count = $crud->count($types); if ($count == 0) { return redirect(route('new-user.index')); diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index 145bc80230..a59a2b38ba 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -37,11 +37,11 @@ class NewUserController extends Controller /** - * @param ARI $repository + * @param AccountCrudInterface $crud * - * @@return View + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View */ - public function index(ARI $repository) + public function index(AccountCrudInterface $crud) { View::share('title', trans('firefly.welcome')); @@ -49,7 +49,7 @@ class NewUserController extends Controller $types = config('firefly.accountTypesByIdentifier.asset'); - $count = $repository->countAccounts($types); + $count = $crud->count($types); if ($count > 0) { return redirect(route('index')); diff --git a/app/Models/Account.php b/app/Models/Account.php index 22b5fadcfa..b27944737c 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -236,20 +236,6 @@ class Account extends Model return $value; } - /** - * - * @return string - */ - public function getNameForEditformAttribute(): string - { - $name = $this->name; - if ($this->accountType->type == 'Cash account') { - $name = ''; - } - - return $name; - } - /** * @return HasMany */ diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index fd5e695e25..ea5b4377a8 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -51,18 +51,6 @@ class AccountRepository implements AccountRepositoryInterface $this->user = $user; } - /** - * @param array $types - * - * @return int - */ - public function countAccounts(array $types): int - { - $count = $this->user->accounts()->accountTypeIn($types)->count(); - - return $count; - } - /** * This method is almost the same as ::earnedInPeriod, but only works for revenue accounts * instead of the implied asset accounts for ::earnedInPeriod. ::earnedInPeriod will tell you diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 52b201fb1d..f4c628972b 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -27,13 +27,6 @@ use Illuminate\Support\Collection; interface AccountRepositoryInterface { - /** - * @param array $types - * - * @return int - */ - public function countAccounts(array $types): int; - /** * This method is almost the same as ::earnedInPeriod, but only works for revenue accounts * instead of the implied asset accounts for ::earnedInPeriod. ::earnedInPeriod will tell you From 6e90c033b1cab9f32a9b4966d932c603c7c37d84 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Oct 2016 14:54:32 +0200 Subject: [PATCH 14/28] Start of some remodelling. --- app/Models/Account.php | 25 ------------------- app/Repositories/Account/AccountTasker.php | 24 ++++++++++++++++++ .../Account/AccountTaskerInterface.php | 24 ++++++++++++++++++ 3 files changed, 48 insertions(+), 25 deletions(-) create mode 100644 app/Repositories/Account/AccountTasker.php create mode 100644 app/Repositories/Account/AccountTaskerInterface.php diff --git a/app/Models/Account.php b/app/Models/Account.php index b27944737c..42f628b1bc 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -121,31 +121,6 @@ class Account extends Model } - /** - * @param array $fields - * - * @return Account|null - */ - public static function firstOrNullEncrypted(array $fields) - { - // everything but the name: - $query = Account::orderBy('id'); - $search = $fields; - unset($search['name']); - foreach ($search as $name => $value) { - $query->where($name, $value); - } - $set = $query->get(['accounts.*']); - /** @var Account $account */ - foreach ($set as $account) { - if ($account->name == $fields['name']) { - return $account; - } - } - - return null; - } - /** * @param Account $value * diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php new file mode 100644 index 0000000000..6339e12290 --- /dev/null +++ b/app/Repositories/Account/AccountTasker.php @@ -0,0 +1,24 @@ + Date: Sat, 8 Oct 2016 15:59:58 +0200 Subject: [PATCH 15/28] Clean up account report helper. --- app/Helpers/Report/AccountReportHelper.php | 99 +++++----------------- app/Repositories/Account/AccountTasker.php | 13 +++ 2 files changed, 34 insertions(+), 78 deletions(-) diff --git a/app/Helpers/Report/AccountReportHelper.php b/app/Helpers/Report/AccountReportHelper.php index fdb5539ed9..5cf499285c 100644 --- a/app/Helpers/Report/AccountReportHelper.php +++ b/app/Helpers/Report/AccountReportHelper.php @@ -14,10 +14,11 @@ declare(strict_types = 1); namespace FireflyIII\Helpers\Report; use Carbon\Carbon; -use DB; use FireflyIII\Helpers\Collection\Account as AccountCollection; use FireflyIII\Models\Account; use Illuminate\Support\Collection; +use Log; +use Steam; /** @@ -27,63 +28,8 @@ use Illuminate\Support\Collection; */ class AccountReportHelper implements AccountReportHelperInterface { - /** - * @param Account $account - * @param Collection $startSet - * @param Collection $endSet - * @param Collection $backupSet - * - * @return Account - */ - public static function reportFilter(Account $account, Collection $startSet, Collection $endSet, Collection $backupSet) - { - // The balance for today always incorporates transactions made on today. So to get todays "start" balance, we sub one day. - $account->startBalance = '0'; - $account->endBalance = '0'; - $currentStart = $startSet->filter( - function (Account $entry) use ($account) { - return $account->id == $entry->id; - } - ); - - $currentBackup = $backupSet->filter( // grab entry from current backup as well: - function (Account $entry) use ($account) { - return $account->id == $entry->id; - } - ); - - // first try to set from backup - if (!is_null($currentBackup->first())) { - $account->startBalance = $currentBackup->first()->balance; - } - - // overrule with data from start - if (!is_null($currentStart->first())) { - $account->startBalance = $currentStart->first()->balance; - } - - $currentEnd = $endSet->filter( - function (Account $entry) use ($account) { - return $account->id == $entry->id; - } - ); - - if (!is_null($currentEnd->first())) { - $account->endBalance = $currentEnd->first()->balance; - } - - return $account; - } /** - * This method generates a full report for the given period on all - * given accounts. - * - * a special consideration for accounts that did exist on this exact day. - * we also grab the balance from today just in case, to see if that changes things. - * it's a fall back for users who (rightly so) start keeping score at the first of - * the month and find the first report lacking / broken. - * * @param Carbon $start * @param Carbon $end * @param Collection $accounts @@ -98,13 +44,27 @@ class AccountReportHelper implements AccountReportHelperInterface $ids = $accounts->pluck('id')->toArray(); $yesterday = clone $start; $yesterday->subDay(); - $startSet = $this->getSet($ids, $yesterday); // get balances for start. - $backupSet = $this->getSet($ids, $start); - $endSet = $this->getSet($ids, $end); + $startSet = Steam::balancesById($ids, $yesterday); + $backupSet = Steam::balancesById($ids, $start); + $endSet = Steam::balancesById($ids, $end); + Log::debug( + sprintf( + 'getAccountReport from %s to %s for %d accounts.', + $start->format('Y-m-d'), + $end->format('Y-m-d'), + $accounts->count() + ) + ); $accounts->each( function (Account $account) use ($startSet, $endSet, $backupSet) { - return self::reportFilter($account, $startSet, $endSet, $backupSet); + $account->startBalance = $startSet[$account->id] ?? '0'; + $account->endBalance = $endSet[$account->id] ?? '0'; + + // check backup set just in case: + if ($account->startBalance === '0' && isset($backupSet[$account->id])) { + $account->startBalance = $backupSet[$account->id]; + } } ); @@ -121,24 +81,7 @@ class AccountReportHelper implements AccountReportHelperInterface $object->setDifference($diff); $object->setAccounts($accounts); + return $object; } - - /** - * @param array $ids - * @param Carbon $date - * - * @return Collection - */ - private function getSet(array $ids, Carbon $date): Collection - { - return Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->whereIn('accounts.id', $ids) - ->whereNull('transaction_journals.deleted_at') - ->whereNull('transactions.deleted_at') - ->where('transaction_journals.date', '<=', $date->format('Y-m-d')) - ->groupBy('accounts.id') - ->get(['accounts.id', DB::raw('SUM(transactions.amount) AS balance')]); - } } diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 6339e12290..d7811f9ff5 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -13,6 +13,8 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; +use FireflyIII\User; + /** * Class AccountTasker * @@ -20,5 +22,16 @@ namespace FireflyIII\Repositories\Account; */ class AccountTasker { + /** @var User */ + private $user; + /** + * AttachmentRepository constructor. + * + * @param User $user + */ + public function __construct(User $user) + { + $this->user = $user; + } } \ No newline at end of file From a1f797c4d1658ed9aae30cb72c2e816b2af0956a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Oct 2016 16:04:05 +0200 Subject: [PATCH 16/28] Moved a method around. --- app/Helpers/Report/AccountReportHelper.php | 87 ------------------- .../Report/AccountReportHelperInterface.php | 40 --------- app/Http/Controllers/ReportController.php | 13 +-- app/Providers/AccountServiceProvider.php | 14 +++ app/Repositories/Account/AccountTasker.php | 62 +++++++++++++ .../Account/AccountTaskerInterface.php | 13 +++ 6 files changed, 96 insertions(+), 133 deletions(-) delete mode 100644 app/Helpers/Report/AccountReportHelper.php delete mode 100644 app/Helpers/Report/AccountReportHelperInterface.php diff --git a/app/Helpers/Report/AccountReportHelper.php b/app/Helpers/Report/AccountReportHelper.php deleted file mode 100644 index 5cf499285c..0000000000 --- a/app/Helpers/Report/AccountReportHelper.php +++ /dev/null @@ -1,87 +0,0 @@ -pluck('id')->toArray(); - $yesterday = clone $start; - $yesterday->subDay(); - $startSet = Steam::balancesById($ids, $yesterday); - $backupSet = Steam::balancesById($ids, $start); - $endSet = Steam::balancesById($ids, $end); - - Log::debug( - sprintf( - 'getAccountReport from %s to %s for %d accounts.', - $start->format('Y-m-d'), - $end->format('Y-m-d'), - $accounts->count() - ) - ); - $accounts->each( - function (Account $account) use ($startSet, $endSet, $backupSet) { - $account->startBalance = $startSet[$account->id] ?? '0'; - $account->endBalance = $endSet[$account->id] ?? '0'; - - // check backup set just in case: - if ($account->startBalance === '0' && isset($backupSet[$account->id])) { - $account->startBalance = $backupSet[$account->id]; - } - } - ); - - // summarize: - foreach ($accounts as $account) { - $startAmount = bcadd($startAmount, $account->startBalance); - $endAmount = bcadd($endAmount, $account->endBalance); - $diff = bcadd($diff, bcsub($account->endBalance, $account->startBalance)); - } - - $object = new AccountCollection; - $object->setStart($startAmount); - $object->setEnd($endAmount); - $object->setDifference($diff); - $object->setAccounts($accounts); - - - return $object; - } -} diff --git a/app/Helpers/Report/AccountReportHelperInterface.php b/app/Helpers/Report/AccountReportHelperInterface.php deleted file mode 100644 index f5703957b2..0000000000 --- a/app/Helpers/Report/AccountReportHelperInterface.php +++ /dev/null @@ -1,40 +0,0 @@ -helper = app(ReportHelperInterface::class); - $this->accountHelper = app(AccountReportHelperInterface::class); + $this->accountTasker = app(AccountTaskerInterface::class); $this->budgetHelper = app(BudgetReportHelperInterface::class); $this->balanceHelper = app(BalanceReportHelperInterface::class); } @@ -253,7 +254,7 @@ class ReportController extends Controller $expenseTopLength = 8; // get report stuff! - $accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts); + $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); $incomes = $this->helper->getIncomeReport($start, $end, $accounts); $expenses = $this->helper->getExpenseReport($start, $end, $accounts); $budgets = $this->budgetHelper->getBudgetReport($start, $end, $accounts); @@ -297,7 +298,7 @@ class ReportController extends Controller // list of users stuff: $budgets = app(BudgetRepositoryInterface::class)->getActiveBudgets(); $categories = app(CategoryRepositoryInterface::class)->getCategories(); - $accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts); + $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); $incomes = $this->helper->getIncomeReport($start, $end, $accounts); $expenses = $this->helper->getExpenseReport($start, $end, $accounts); $tags = $this->helper->tagReport($start, $end, $accounts); @@ -332,7 +333,7 @@ class ReportController extends Controller $incomeTopLength = 8; $expenseTopLength = 8; - $accountReport = $this->accountHelper->getAccountReport($start, $end, $accounts); + $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); $incomes = $this->helper->getIncomeReport($start, $end, $accounts); $expenses = $this->helper->getExpenseReport($start, $end, $accounts); $tags = $this->helper->tagReport($start, $end, $accounts); diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index dd65e6f5d6..a91cc1ac1d 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -55,5 +55,19 @@ class AccountServiceProvider extends ServiceProvider return app('FireflyIII\Repositories\Account\AccountRepository', $arguments); } ); + + $this->app->bind( + 'FireflyIII\Repositories\Account\AccountTaskerInterface', + function (Application $app, array $arguments) { + if (!isset($arguments[0]) && $app->auth->check()) { + return app('FireflyIII\Repositories\Account\AccountTasker', [auth()->user()]); + } + if (!isset($arguments[0]) && !$app->auth->check()) { + throw new FireflyException('There is no user present.'); + } + + return app('FireflyIII\Repositories\Account\AccountTasker', $arguments); + } + ); } } diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index d7811f9ff5..5beb77c121 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -13,7 +13,13 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; +use Carbon\Carbon; +use FireflyIII\Models\Account; use FireflyIII\User; +use Illuminate\Support\Collection; +use FireflyIII\Helpers\Collection\Account as AccountCollection; +use Log; +use Steam; /** * Class AccountTasker @@ -34,4 +40,60 @@ class AccountTasker { $this->user = $user; } + + /** + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return AccountCollection + */ + public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection + { + $startAmount = '0'; + $endAmount = '0'; + $diff = '0'; + $ids = $accounts->pluck('id')->toArray(); + $yesterday = clone $start; + $yesterday->subDay(); + $startSet = Steam::balancesById($ids, $yesterday); + $backupSet = Steam::balancesById($ids, $start); + $endSet = Steam::balancesById($ids, $end); + + Log::debug( + sprintf( + 'getAccountReport from %s to %s for %d accounts.', + $start->format('Y-m-d'), + $end->format('Y-m-d'), + $accounts->count() + ) + ); + $accounts->each( + function (Account $account) use ($startSet, $endSet, $backupSet) { + $account->startBalance = $startSet[$account->id] ?? '0'; + $account->endBalance = $endSet[$account->id] ?? '0'; + + // check backup set just in case: + if ($account->startBalance === '0' && isset($backupSet[$account->id])) { + $account->startBalance = $backupSet[$account->id]; + } + } + ); + + // summarize: + foreach ($accounts as $account) { + $startAmount = bcadd($startAmount, $account->startBalance); + $endAmount = bcadd($endAmount, $account->endBalance); + $diff = bcadd($diff, bcsub($account->endBalance, $account->startBalance)); + } + + $object = new AccountCollection; + $object->setStart($startAmount); + $object->setEnd($endAmount); + $object->setDifference($diff); + $object->setAccounts($accounts); + + + return $object; + } } \ No newline at end of file diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index 7ca7bd62c8..73be6cb23b 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -13,6 +13,10 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; +use Carbon\Carbon; +use FireflyIII\Helpers\Collection\Account as AccountCollection; +use Illuminate\Support\Collection; + /** * Interface AccountTaskerInterface * @@ -21,4 +25,13 @@ namespace FireflyIII\Repositories\Account; interface AccountTaskerInterface { + /** + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return AccountCollection + */ + public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection; + } \ No newline at end of file From ea7ee7ee9a4d959a39dc05a2dfe353549a1635a0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 8 Oct 2016 16:24:07 +0200 Subject: [PATCH 17/28] Moved a report out of the controller. --- .../Controllers/Report/AccountController.php | 44 ++++++++++++++++ app/Http/Controllers/ReportController.php | 47 ++++++++---------- public/css/firefly.css | 5 ++ public/images/loading-small.gif | Bin 0 -> 24345 bytes public/js/ff/reports/default/all.js | 18 +++++++ resources/views/reports/default/month.twig | 6 ++- .../views/reports/default/multi-year.twig | 7 +-- resources/views/reports/default/year.twig | 6 ++- routes/web.php | 10 +++- 9 files changed, 109 insertions(+), 34 deletions(-) create mode 100644 app/Http/Controllers/Report/AccountController.php create mode 100644 public/images/loading-small.gif diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php new file mode 100644 index 0000000000..e2d6f01b31 --- /dev/null +++ b/app/Http/Controllers/Report/AccountController.php @@ -0,0 +1,44 @@ +getAccountReport($start, $end, $accounts); + + return view('reports.partials.accounts', compact('accountReport')); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 225a8ee31d..8f34806a8b 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -16,7 +16,6 @@ namespace FireflyIII\Http\Controllers; use Carbon\Carbon; use FireflyIII\Crud\Account\AccountCrudInterface; use FireflyIII\Exceptions\FireflyException; -use FireflyIII\Helpers\Report\AccountReportHelperInterface; use FireflyIII\Helpers\Report\BalanceReportHelperInterface; use FireflyIII\Helpers\Report\BudgetReportHelperInterface; use FireflyIII\Helpers\Report\ReportHelperInterface; @@ -24,7 +23,6 @@ use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; -use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use Illuminate\Support\Collection; @@ -41,8 +39,6 @@ use View; class ReportController extends Controller { - /** @var AccountTaskerInterface */ - protected $accountTasker; /** @var BalanceReportHelperInterface */ protected $balanceHelper; @@ -235,7 +231,6 @@ class ReportController extends Controller private function createRepositories() { $this->helper = app(ReportHelperInterface::class); - $this->accountTasker = app(AccountTaskerInterface::class); $this->budgetHelper = app(BudgetReportHelperInterface::class); $this->balanceHelper = app(BalanceReportHelperInterface::class); } @@ -254,14 +249,13 @@ class ReportController extends Controller $expenseTopLength = 8; // get report stuff! - $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); - $incomes = $this->helper->getIncomeReport($start, $end, $accounts); - $expenses = $this->helper->getExpenseReport($start, $end, $accounts); - $budgets = $this->budgetHelper->getBudgetReport($start, $end, $accounts); - $categories = $this->helper->getCategoryReport($start, $end, $accounts); - $balance = $this->balanceHelper->getBalanceReport($start, $end, $accounts); - $bills = $this->helper->getBillReport($start, $end, $accounts); - $tags = $this->helper->tagReport($start, $end, $accounts); + $incomes = $this->helper->getIncomeReport($start, $end, $accounts); + $expenses = $this->helper->getExpenseReport($start, $end, $accounts); + $budgets = $this->budgetHelper->getBudgetReport($start, $end, $accounts); + $categories = $this->helper->getCategoryReport($start, $end, $accounts); + $balance = $this->balanceHelper->getBalanceReport($start, $end, $accounts); + $bills = $this->helper->getBillReport($start, $end, $accounts); + $tags = $this->helper->tagReport($start, $end, $accounts); // and some id's, joined: $accountIds = join(',', $accounts->pluck('id')->toArray()); @@ -271,7 +265,7 @@ class ReportController extends Controller 'reports.default.month', compact( 'start', 'end', 'reportType', - 'accountReport', 'tags', + 'tags', 'incomes', 'incomeTopLength', 'expenses', 'expenseTopLength', 'budgets', 'balance', @@ -296,12 +290,11 @@ class ReportController extends Controller $incomeTopLength = 8; $expenseTopLength = 8; // list of users stuff: - $budgets = app(BudgetRepositoryInterface::class)->getActiveBudgets(); - $categories = app(CategoryRepositoryInterface::class)->getCategories(); - $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); - $incomes = $this->helper->getIncomeReport($start, $end, $accounts); - $expenses = $this->helper->getExpenseReport($start, $end, $accounts); - $tags = $this->helper->tagReport($start, $end, $accounts); + $budgets = app(BudgetRepositoryInterface::class)->getActiveBudgets(); + $categories = app(CategoryRepositoryInterface::class)->getCategories(); + $incomes = $this->helper->getIncomeReport($start, $end, $accounts); + $expenses = $this->helper->getExpenseReport($start, $end, $accounts); + $tags = $this->helper->tagReport($start, $end, $accounts); // and some id's, joined: $accountIds = []; @@ -314,7 +307,8 @@ class ReportController extends Controller return view( 'reports.default.multi-year', compact( - 'budgets', 'accounts', 'categories', 'start', 'end', 'accountIds', 'reportType', 'accountReport', 'incomes', 'expenses', + 'budgets', 'accounts', 'categories', 'start', 'end', 'accountIds', 'reportType', + 'incomes', 'expenses', 'incomeTopLength', 'expenseTopLength', 'tags' ) ); @@ -333,11 +327,10 @@ class ReportController extends Controller $incomeTopLength = 8; $expenseTopLength = 8; - $accountReport = $this->accountTasker->getAccountReport($start, $end, $accounts); - $incomes = $this->helper->getIncomeReport($start, $end, $accounts); - $expenses = $this->helper->getExpenseReport($start, $end, $accounts); - $tags = $this->helper->tagReport($start, $end, $accounts); - $budgets = $this->budgetHelper->budgetYearOverview($start, $end, $accounts); + $incomes = $this->helper->getIncomeReport($start, $end, $accounts); + $expenses = $this->helper->getExpenseReport($start, $end, $accounts); + $tags = $this->helper->tagReport($start, $end, $accounts); + $budgets = $this->budgetHelper->budgetYearOverview($start, $end, $accounts); Session::flash('gaEventCategory', 'report'); Session::flash('gaEventAction', 'year'); @@ -354,7 +347,7 @@ class ReportController extends Controller return view( 'reports.default.year', compact( - 'start', 'accountReport', 'incomes', 'reportType', 'accountIds', 'end', + 'start', 'incomes', 'reportType', 'accountIds', 'end', 'expenses', 'incomeTopLength', 'expenseTopLength', 'tags', 'budgets' ) ); diff --git a/public/css/firefly.css b/public/css/firefly.css index a33f04a936..354ea0b15b 100644 --- a/public/css/firefly.css +++ b/public/css/firefly.css @@ -73,4 +73,9 @@ body.waiting * { .bootstrap-tagsinput { margin-bottom: 10px; width: 100%; +} + +.loading { + background:url('/images/loading-small.gif') no-repeat center center; + min-height:30px; } \ No newline at end of file diff --git a/public/images/loading-small.gif b/public/images/loading-small.gif new file mode 100644 index 0000000000000000000000000000000000000000..5c4758cc12e6e4debb56cc9c421db13123017915 GIT binary patch literal 24345 zcmeI4cTm)6y8UN#Fn~CY0Z4Vtw0QC2B}gHvu2HigoLD|q?DA@+O=!fty?E8EiEG>vwr=0Sy|Z)8#Zj* zxN*~_O`A7w-m+!O)~#E&ZQHhe`}Q3>cI@1_bJwn2a&mIJckh;$m*2BzkAi~2-o1Mj z6&3gG+qZxJ{sRXN96WeXNlEF@p+kocA68aYR#8zoa^%Rbzy5mk=+R@xj{WxAZ^w@x zKXKy3$&)8fojP^;^yxEa&YV4a_T0I1s;a8z&!4|=;ljm>7cX79q^72J`SRr}SFZg2 z`|nq;UcGkh+V$(#Z``MRCJT9BZ>C-gybG*TPj_>T=6|q1}~Q9Ef)CLhsh}J|rh6HMSwucd5u&eJ>GvLfd&I zPo}reZ*%0##xE|}{_9jNH>v38Ia+tbMK5z&YMPzcxdCx*X5@O9byv)-ndI=#haHet zBP!$D#vWUdcA7T^Zqt?Wj@aVs_^K=!rWR~?Ew9i+H%xqZgQkZK;ZuQQ)h=_rO#$OL zrMriiekrEA-%;dGn>QDF98rphJZ1hosV=o!a*V@6X{2S!i*|At#Jh&8Rd*|$F6Qa* zw;j_&Di>DVJz{mtpJI5Y`mVy~49m55x=%!3j^s(%*&-I4T}6;{u!Jew;Mg;(D0lDg zzazGA!QX#PZ|1e+{~ayyb=LKD*7I{Q@PBzL=(S168#9=@MYy+3r0;|10DE|#V@&W9 z1ndPe^ffBn6BX%?iV8wSha#h+5OAbGQT|p={zgdV{z^h1NGK#3gC@sf$wWLUjz~%% z6O-ZysR@MiL_9SaM^C|Kq+&C{q+zqtv5a&alL8Hk8q1>L*)#&1Mr6}TY&w~f5zoy` z3; zrnzmdKr+K8wL4(V_~G*xUp{g9RH@q0EX1Hic7WXX_jIeKK4oMmOFIU>4thgPW)c8 zxn$j%V-jlzSe8ync@H0jx5?eeSz-9_&YpXR-C%w$ucIUfPZcMhr1!(}Zzj9;jZMQW zv?q^0il5NAbir4VWEwTDaUR#tXk}=yEQ~6I-@qULU@* z*Kn}C?exIp$wQN8_9o7cj9na!Upg7Rer)9W*vRe4tv63^c|0}re5UXHT;Io8-}i-q zpNk>*?FT?s!UR}}U@&f`A#cC{DYyf3HxKo+i14$x7l(|AMa1BN-H3tas|_K=#QZTpIuHml8coK>lH*9^r1-eBqT_Qv}|@}Hk+BvW^>tGfxXD#aPq)#xdJKR7v$v@6c!W}7ZsP5l$DoN zR8~}0S5?% zYj8{TOb1(1(ia9TXg@DmlA@lj@irvQv+k5xH^PDJW)m&E$M|SiXgm=04dl?R)2K(k3|Sj#lb%b!$F~ z>V`d5-ybrQea#?Er)+j6ya zPt6Q{@lW$Q@gLU-pb+lQjJ%%T@_BK~*X7oqRKX4G7^X0HvrvyaVV>q;o)+O=RuSHJ zBYmu)@wJHp<99FG|32K`R-hAhKq?SH_K08yWbh*tOsE#lxJZ}SsMmP7J0ZrKfb=J# zf{Exb0y+YZj*3Oc;7~{m5{*J&fhxqn2{CZu?EE1Ne^Lmb3P@xe8Xb?tCgSnQBvM*@ zJT)nao|>9Tp)hGQ7M;$?$lzpVa=~O}WebMKV9XAa$^SYm7N5n+0rnxA0~Qia4v&+^ z=N9DgiwpBhi;K$3$|@_XtE+43>l>Pzo7-AjJKEd3x;lG%y5IKp^u6uv@9Q1xhZd62 z;r`K)fw9rS@v)(a@sY`i(f9Ah-@lu9|9;}b`^gUP!D$tr=eMc3XXXmhrP6L#ywmw&wJ zM&7A0S^)J)8eZ=Zn zw9@O4e5osUyw~hM2or@3z{)-`OwaeHo{W0tv`?+((b_9iZ?ve|og*O=uxfnSP!Wl0 zqFEv$X=7DbtJ2w1cI#S)yjA$*h?oc$=KR~nd8zoGQsHplKk8Zsb#20Rl z4cwm?ctG*Rx7h_0T+Bum&N_ZzUg-L}=mosg4}4`9^x7!I%{b)EZJ4{MP(s4JEF-+F zB7N=x<%ssTjR~?xhB#rup5r24#YVf~;T{Bp4*>zJgC7AIKtKlLk+4`~I1U+!MZ*8y zKnUE!w+7-*Iw3R@KrK+HS+$6bO(GCd1cE_HOr)ixK!QP~3I&6kkpT%tW@h%cGp8T3 zD#B)Eb2(goHaCaI&Ese1=Vlk?^NR{{ON#Q#N{TAVimED#Ybs0Xs!Qr?N*ch_mNwRw zHr1CmH&nDVR<<@(wKZ3_x72jB)^)bkceOWk3k*kJ4=@>>1AW~?1HHmgQ5*6+W?;_!3Rn>{-Ki){^Q)rF-2L{bo>$wSc=>c!_DXXe%eOVDAG9X z)4 zK2ck?5`7mxhI-5!2s!9lu%J$~b6^yh{d}02y?IG@#iMgb!#qV;yw4=4t+26)<4-GMK;%0 zqq%rfi;C(tlGeSOg}$PN=$T3S|mIzuQOG#XoAHz3^rS^-=Jo5joKW&?@H<#F=)oPu0# zVIHq2KNs>8CB+qGWi?e54Ruw`jWw;!b?vS7or0~Sr?a^SEFN90g2kf^2tr?Phd>j$ z2K$Aw09*#}7bEW`Cx8?PL_m;n{*?y&g*^Q6zXXOtUUjgAsv;r+RN^W!`DoV0BIN2g z{}eZ=f-j_lvFIF?M#V#gH*!rd7hR5=@`PROJZ`#vgT?A4DJI)O7dY8R5$<1Cjhflq z6~2mKl4piN4C`S(A`SB^+shl}T2h+3t-iGn;k6aHEAN>s%Oza!T%?@G5Q z>6B8}azplY<@n|WT9DL|WJ|!7y^{3IVK|T70)2)5U2;lL|q z3Lq3c!$WUJhX=qSGC48!;XPm?e_B2So5wfH$G^FMY~7&<+v?Kx6C@X{n|0F{iKEW$ z{+;V3x~;1&H{h3(-lBQeI(K?hqkR0Oloo#6+n9IM|F`K&>9*Gn!DjAu{jxRX7W||# z;bgv@e_M)Al8tfadD14O;N2(r`CR;_%U;R}+jYaNS5&=j{mIuv%GU(0Rf6vti|E;u zs$Rzm2;}>(qan=>Z@=MYEk$5rf|2M9#hNR=r=x!~P_taK3%el3`k0)eb{dluVM@{% z7~bpMsezJyN3_*)&7VHB<*BV+4@+GC%X@Q#MiZ0ihp^&XxDq7HXT1~ zxDy_6v(mZa`4|4PvUe?-JU10LpYfPv!}7HfGdiyE8K(xhxBZS;Pa7UEpCJxvNUfMR z7T@1kd`EgJBpwhz6-1r_+;K0;{~VgV;jS7E*itrK;k6>g}1OTXC zb>VLSsz4_Gv850umq;YEcmVW)!;%QGWHOPQNG2u6lTs5&=}9C?GLf20prsJ#srZc4 z*er;9!~)#G%^>p_319>OH7SRcoXZB2lE+DfhMNW^pPQbaP07oq=4I3Jvgx_mnYr1F zTplZz&lV_1eob#-<14fPF;4UJ7rO)XHG(bCb@+S$?8 z-PQiK2kag_BSZb;W5Yl-KyU$s0|Ff%KYacKG711X{^ify`mtJhsD$cVmk*MP`>o37 zJ1oCg+}wRF*-c6W_8F`n*$?aXFIUr4&{RF2w%Y0F&i&ds=R`&5Q#USko;dHk0&B8! zUl}EOv+XI%4{;{B-pUp$yTX?3JZI=LEpOTDg}&@k7N#H*>W;=ZcT}4m%(K0oeve6? zzTjXRoN8BPwr@hD%0$(GOgtvddlXEzH?Ztz$$IuVKX9A1k;>Vwe5ElFm~=~K z2kSz=bP%4yARn3G@+BLq9y}!}Jyq%pk&o>7kgTUnQaTjSp%Y@Gr5k^qN4_iQJ5@ zL(0x1XJ^I<1`yE%ZWe%|$=s||b{2)5MPp@Uu(C3lSqvtF#bf|J%44(n98RtfhVc0X zIXOZuT2xR_Tv%9ATnt(l<>lp-RaG^$wRQFN4NZ-WEiI5fw70c_>FR9n>F((3?HcIs z9fqRLf$>o&U7_63QW!*m&5sOKO{Eb}#S~ z3wLb$1oF(SM#+l%gL$^?7*82-&#A?M9q0!OFHF~^1$Oa|D@vaG6l5Mq4f%D4QfK%6 zp0hS_=GW>_@4NW`J`?o76RI5enzVUA4B>Nr7 zf0lhWWd9AvQM$gCLeo}S5P2U8MoA>ytCqU*SluS{tX0tnFbS6dN8e~VUT(%+7dzS` zH=G{Qq80~hUZ!ne)lyxxl@hORlu5E&S#HL=YoB_LTNo2rNLQVlJ%^;E#U*KENt6Yc_zp0M-JHj*E>= zAd?ak6Oz+GkV#ErWu|ko(z%Ru2#PW(JQj_|qVw2U*=$BOh%GrBP`eUx(XVtAXu{m& zXJ^k2Xior@00Vjxg@t9s#pM8k)YJ%+p{c1=APXJsZIE+-3KVU<-M~Mze-l_hX~oD; z9{?f(p#Y8oq9GrlJ>=ad06{)|fY`^>=jp$UFTWL&IhB~w^bMptr#V0>VMKFo9odO` z{YHWfLJIY4Zqk-*$Ek{kFz&HGZ&PzQ^4scNiF#*_dT2~@dA~?1!)8|64s5xx5$AjO zEUe-J!AQxs;{G(+ov`VUZ|(i+_MP~)n;ys34x!ZTHYp!hv|3;2b_H|gXc*CmBqHIL zZaz32=lO20?x8oYh87+wAh z+auMguKnt_yF0Abkl|I+<-EF~dueXi#VMH*{lgSDxMq>@NAYoD#xjezz>w8D$m(pV zbU5jt?x1>tNcyF?N4yt8Y&wMw0=-Hg5ffN1)=g-)Eo{Cw7)?} zk<_eSy_^!ZQLSOUEKEHBgB**S6YnLBYc*Kz%tfdXrnz8%Q*I{XR0pcw&rK~ z&3EMVX z*0U;jADD^8Mnm6z1Y>SvL zXZ}alkH>bvPk=(^tv62$J)RjrJxstzp&B+cg4>Q+$}x*L1Wp375uN~+LN)@xQh-Sz zC<;78pdB*U9xNW1uqU{P=b()Vwho+d>wvme!j4773tqN77m@Q6QS zQv6>uFu$%Gg0uqaatko2P%GlF*o3)01rUmK07!wo5NHKNN7K`p-vClJ=wpF;1puTR z7ARVQqBbX&54u*I{2V|>p#nv*;QFJythB14tgfb_slKYEsiv)^uA{Y~tGyAlB)Vq- zDJW+GM%o6g9De}Po}q!apf>?zVSH>9^t3;G04*zFQQ|u?(yfw1F{vsG#6&^qs_nS` zOULyQb{=bE?kqnbnkitUqDsqG|CF}{bLr&~*;8)UI!}jmN^Bn2D(osy*|+w31UF~< zw%_bFsywX@&_4gh|J~Jxj)`0LhyE&}B41tB&5X8#D>N>eC_Qf1!H`u_-q9s`Ye zVc)}=MC-isrppeGn&g-icyDQ!Yz z6f`ykT}@Ebgz6N)Tp)rS0sBCNJVipM9XFHkMY=AcM`Ao<@hJS;hIB;sRc2QEpjDL3wFW zRXJ!}l>!sd+)&xp44PG-Rs{qDAW{%bbiD29>U#^hhQWb8!7&HuREn|=GTa{6|voOLj zDoM2P!Ub!eRX!3~kRZAB`k%bCU{l`s89|^bJzftrWf#N z#d*w<0!~>Gv~5(B=2w>GSC<#mR2J4&fwiLyav6de7T7l0TbnxCnmfT+SjV5X4WJv~ z6m0I+bQIj0LUqh{AeR8tceb6vYuRE2kqpY^F z*jL&mE8o;AxaC@6{l42h<>V$a=T#;7lXu%T-|g5aUgcJ_mvpBiv+Gm8cn9@$g1p~) z<)V8%A$?Om3ZsGj7=y#Wi|ISbR`{!UD z=Aj-Ip`Mmt!aS|Qq0=znB>mJVE$J1*J_7wwCM2V&r% zXgKI*A`o!wU)QWa$4Y1;&?o{HO^C%3h_Qq?0zNqop9bBE5;D>Vnd#7vpE>)3C$s5s zYZH0Oc`kkuz)y^pkzY%$DQ=f~ z8^ZTlbXxXl`sg*9OZuVu>mToR@D(eW1-r5%?_LPzM}sM%429suZ~Ee5p!#r+4+EB=*{ztw>Y6O;$9yF`1Rgvg5=pHJJ}F|8FRT0XQ55Xw=skx*8Qag)mRc zaKRne+y&U|`4dK1R>dN}s>c;xo z=EnNA*5=NR_TFwlHhKs8-$H%?x*msKs1O`+3{8Mi6;zi1x&YmTL2%;(L^dE6Duf%* zHP|q0SvJFc#iJr^`myE!+}`0$DJ5%b0+OMd5gib+~D z9w1c51azH{8^GCKqqxux)(7IoV$S>QTBB3{VI?LtC}^E!rpCBoHbRVKLDo1>BYX6P z6kmq8U-Qh-wABVrj_lIBXxVV0IcjTM#0{V7Ke8e+r5J})l` z)qza>39ESg%B8wWUTfuRn?=kF&mPo!H(%TS&I#sUp^iV@fr1Y8tU zCqTifxDbM(;NSz)Fw4u!%Bw0XK#{w#9vpqtwnMQdxcd+$n^3sf(+Q@zw+jr^>+b7m z1&!{(K5%d@Xi^M=(^BCr*ytn_T?o&?K*R}kGv@+~zfz33wPWgi;X3x|g#dMY7!E+F zzWM3$mK?9PQx8h+kAm8^AM%mJsw*8*z1Q}fmR{?!Y?opa|LogE)fYdyccrLGYc7vU z{YA3ithAL}YWlwIm!eLsGHWouu;Vmh$(rKMRXcTa2~XvgZ{6Wuf^iv%XWs}@SbsI4 zI(f7&f3aqo-UuMnQgjL zmwuwr?4zraZKMK|Myy*OR!mf5^`5cWem6kBMZH3Tud~g&>rfFXch8jCZu|2OpKI@! z8VKF?E0exjHa70p&b!Pckz{mN&7<=UBliog!^EmvbmSLHF`ggwiMEGT5cNrEM2XM2 zZELP9+#vaUzCiIG$TFYWo4j-c4^J3+JT-tyRkPO|&|_8*`xMB6ka-9W#K3U}IO{M5 z`tawQ4oE13=c3@&9Nd=!QvrGtz&U`2Cx|g_B&0_i+AAL8n}`cYj13e_P-1LwVk|5n zHZ&nNEIu|o4i`nj!U-5eEEk(mLujx0td10w~uj?N>CTwl(&y{@43yfkUJpSh%d*UxFut{{dIO(RFSX06bFMI zZ%++ADS4!G$^NaspI&AwD^EPwb<(x@{Gww!5~Gx{AuDaY5AKmx4175C;(%#UWW2Ft z(d1}tl9Zw~z@nbK!rFc0hZ04DOA4#^04#bzSGj1Tq7Rqc<;p9JJY?YX#5D>Qu-i<_ zaMk__vBQ|dS(jJU?>8ky71))JrR%wehZZ@vk6D_ytH6?K!Y+T&aa0)AjpRM=`qH4T zX;4Eci92LpptUzE=~RQf|skx}YvGCl+7{xh1$J6&{uYMmlRLfS&-zqCzx^1!y$V86W+U z0EeEa0eV41ydfdnfohPDUSt#)Z(;3MP1ia*K}!dfPX zH-%i3NK65#W?~{WC54`r2JXzWXf$R9ospHnn3DzuSVDk0K#$gN`FwtUUT$GQej&Ks z0MAvG6hi`0Q3}+d1kepYL>ud?!O3WQ3v@3ka16}?5IXln4RiwrjySr&4LOj8!GT_g zhzefH16QMC5ElinQjCEmgTJu5`ow`2W zxUo_7grfMBGqt7Kss?3ew)bh}86EV?zh#qel8Y=pdeXZ4BX49K;;4rxY}JzZwzTN= zdsMvm{rzResqx2j)nQ2GK-uw?CK`jFlSv8;xm10>BIda4svmV0QAZ86O(c&z$?N}J z&7ewlN5=L&H7$DU&}a2S3lqrn1zum)zf-%dqU*f$FlLe>RcPg$pfa&+U3a5;xkCbd zjmj2f7GoW3;a#!qRHGzG*!U$1mEYxTAwHgYq@Q^^`If}5Lur=L?~_XH*s@m587J
-
- {% include 'reports/partials/accounts.twig' %} +
@@ -93,6 +92,9 @@ var hideTheRest = '{{ trans('firefly.hideTheRest',{number:incomeTopLength}) }}'; var showTheRestExpense = '{{ trans('firefly.showTheRest',{number:expenseTopLength}) }}'; var hideTheRestExpense = '{{ trans('firefly.hideTheRest',{number:expenseTopLength}) }}'; + + + var accountReportUrl = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig index 40170b188f..b631c35ff3 100644 --- a/resources/views/reports/default/multi-year.twig +++ b/resources/views/reports/default/multi-year.twig @@ -31,9 +31,7 @@
-
- {% include 'reports/partials/accounts.twig' %} - +
@@ -176,6 +174,9 @@ var showTheRestExpense = '{{ trans('firefly.showTheRest',{number:expenseTopLength}) }}'; var hideTheRestExpense = '{{ trans('firefly.hideTheRest',{number:expenseTopLength}) }}'; + + var accountReportUrl = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index caf274a9ff..8bf9e86b1f 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -31,7 +31,8 @@
- {% include 'reports/partials/accounts.twig' %} +
+
{% include 'reports/partials/income-vs-expenses.twig' %}
@@ -133,6 +134,9 @@ var hideTheRest = '{{ trans('firefly.hideTheRest',{number:incomeTopLength}) }}'; var showTheRestExpense = '{{ trans('firefly.showTheRest',{number:expenseTopLength}) }}'; var hideTheRestExpense = '{{ trans('firefly.hideTheRest',{number:expenseTopLength}) }}'; + + + var accountReportUrl = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; diff --git a/routes/web.php b/routes/web.php index e6573fa07b..91187a8dc0 100755 --- a/routes/web.php +++ b/routes/web.php @@ -40,7 +40,7 @@ Route::group( Route::group( ['middleware' => 'user-simple-auth'], function () { Route::get('/error', 'HomeController@displayError'); - Route::any('logout', ['uses' => 'Auth\LoginController@logout','as' => 'logout']); + Route::any('logout', ['uses' => 'Auth\LoginController@logout', 'as' => 'logout']); Route::get('/flush', ['uses' => 'HomeController@flush']); } ); @@ -312,6 +312,14 @@ Route::group( Route::get('/reports', ['uses' => 'ReportController@index', 'as' => 'reports.index']); Route::get('/reports/report/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@report', 'as' => 'reports.report']); + /** + * Report AJAX data Controller: + */ + Route::get( + '/reports/data/accountReport/{start_date}/{end_date}/{accountList}', + ['uses' => 'Report\AccountController@accountReport', 'as' => 'reports.data.accountReport'] + ); + /** * Rules Controller */ From c64771b76beac1398cf66be34b93c18261af99b3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 07:58:27 +0200 Subject: [PATCH 18/28] Move some methods around, refactoring. --- app/Http/Controllers/AccountController.php | 85 +------- .../Admin/ConfigurationController.php | 2 + app/Http/Controllers/Auth/LoginController.php | 2 + .../Controllers/Auth/RegisterController.php | 2 + .../Controllers/Chart/BudgetController.php | 2 + .../Controllers/Chart/ReportController.php | 36 ++-- app/Http/Controllers/JsonController.php | 22 +- app/Http/Controllers/NewUserController.php | 1 - app/Import/Importer/CsvImporter.php | 1 + app/Import/Specifics/IngDescription.php | 4 +- .../Account/AccountRepository.php | 197 ------------------ .../Account/AccountRepositoryInterface.php | 32 --- app/Repositories/Account/AccountTasker.php | 126 ++++++++++- .../Account/AccountTaskerInterface.php | 24 +++ .../ImportJob/ImportJobRepository.php | 1 + app/Support/FireflyConfig.php | 1 - routes/console.php | 6 - tests/ExampleTest.php | 3 + tests/TestCase.php | 3 + 19 files changed, 207 insertions(+), 343 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 6fe2ba4f8c..c003953b4c 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -20,6 +20,7 @@ use FireflyIII\Http\Requests\AccountFormRequest; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; +use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; @@ -196,12 +197,14 @@ class AccountController extends Controller } /** - * @param ARI $repository - * @param Account $account + * @param AccountTaskerInterface $tasker + * @param AccountCrudInterface $crud + * @param ARI $repository + * @param Account $account * * @return View */ - public function show(ARI $repository, Account $account) + public function show(AccountTaskerInterface $tasker, AccountCrudInterface $crud, ARI $repository, Account $account) { // show journals from current period only: $subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type); @@ -240,16 +243,15 @@ class AccountController extends Controller if ($cache->has()) { - $entries = $cache->get(); - - return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle')); + // $entries = $cache->get(); + // return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle')); } - + $assets = $crud->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]); while ($end >= $start) { $end = Navigation::startOfPeriod($end, $range); $currentEnd = Navigation::endOfPeriod($end, $range); - $spent = $this->spentInPeriod($account, $end, $currentEnd); - $earned = $this->earnedInPeriod($account, $end, $currentEnd); + $spent = $tasker->amountOutInPeriod(new Collection([$account]), $assets, $end, $currentEnd); + $earned = $tasker->amountInInPeriod(new Collection([$account]), $assets, $end, $currentEnd); $dateStr = $end->format('Y-m-d'); $dateName = Navigation::periodShow($end, $range); $entries->push([$dateStr, $dateName, $spent, $earned]); @@ -391,69 +393,4 @@ class AccountController extends Controller return ''; } - - /** - * Asset accounts actually earn money by being the destination of a deposit or the destination - * of a transfer. The money moves to them. - * - * A revenue account doesn't really earn money itself. Money is earned "from" the revenue account. - * So, the call to find out how many money has been earned by/from a revenue account is slightly different. - * - * - * - * @param Account $account - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - private function earnedInPeriod(Account $account, Carbon $start, Carbon $end) - { - /** @var ARI $repository */ - $repository = app(ARI::class); - $collection = new Collection([$account]); - $type = $account->accountType->type; - switch ($type) { - case AccountType::DEFAULT: - case AccountType::ASSET: - return $repository->earnedInPeriod($collection, $start, $end); - case AccountType::REVENUE: - return $repository->earnedFromInPeriod($collection, $start, $end); - default: - return '0'; - } - } - - /** - * Asset accounts actually spend money by being the source of a withdrawal or the source - * of a transfer. The money moves away from them. - * - * An expense account doesn't really spend money itself. Money is spent "at" the expense account. - * So, the call to find out how many money has been spent on/at an expense account is slightly different. - * - * - * - * @param Account $account - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - private function spentInPeriod(Account $account, Carbon $start, Carbon $end): string - { - /** @var ARI $repository */ - $repository = app(ARI::class); - $collection = new Collection([$account]); - $type = $account->accountType->type; - switch ($type) { - case AccountType::DEFAULT: - case AccountType::ASSET: - return $repository->spentInPeriod($collection, $start, $end); - case AccountType::EXPENSE: - return $repository->spentAtInPeriod($collection, $start, $end); - default: - return '0'; - } - } - } diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index 489b1d96e9..5b6c256622 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -60,6 +60,8 @@ class ConfigurationController extends Controller /** * @param ConfigurationRequest $request + * + * @return \Illuminate\Http\RedirectResponse */ public function store(ConfigurationRequest $request) { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 1362584111..e805c6fc6c 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -112,6 +112,8 @@ class LoginController extends Controller /** * Show the application login form. * + * @param Request $request + * * @return \Illuminate\Http\Response */ public function showLoginForm(Request $request) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 35cd6a7ec0..bb87bd81e3 100755 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -117,6 +117,8 @@ class RegisterController extends Controller * OLD * Show the application registration form. * + * @param Request $request + * * @return \Illuminate\Http\Response */ public function showRegistrationForm(Request $request) diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index 0e255ec0db..b93a52e8bb 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -139,6 +139,8 @@ class BudgetController extends Controller /** * Shows a budget list with spent/left/overspent. * + * @param BudgetRepositoryInterface $repository + * * @return \Symfony\Component\HttpFoundation\Response */ public function frontpage(BudgetRepositoryInterface $repository) diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 261c2fa39d..941d66da86 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -17,7 +17,7 @@ namespace FireflyIII\Http\Controllers\Chart; use Carbon\Carbon; use FireflyIII\Generator\Chart\Report\ReportChartGeneratorInterface; use FireflyIII\Http\Controllers\Controller; -use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use Navigation; @@ -92,15 +92,16 @@ class ReportController extends Controller /** - * @param AccountRepositoryInterface $repository - * @param string $reportType - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param AccountTaskerInterface $accountTasker + * @param string $reportType + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts * * @return \Illuminate\Http\JsonResponse + * @internal param AccountRepositoryInterface $repository */ - public function yearInOut(AccountRepositoryInterface $repository, string $reportType, Carbon $start, Carbon $end, Collection $accounts) + public function yearInOut(AccountTaskerInterface $accountTasker, string $reportType, Carbon $start, Carbon $end, Collection $accounts) { // chart properties for cache: $cache = new CacheProperties; @@ -120,8 +121,8 @@ class ReportController extends Controller while ($currentStart <= $end) { $currentEnd = Navigation::endOfPeriod($currentStart, '1M'); $date = $currentStart->format('Y-m'); - $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); - $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); + $spent = $accountTasker->amountOutInPeriod($accounts, $accounts, $currentStart, $currentEnd); + $earned = $accountTasker->amountInInPeriod($accounts, $accounts, $currentStart, $currentEnd); $spentArray[$date] = bcmul($spent, '-1'); $earnedArray[$date] = $earned; $currentStart = Navigation::addPeriod($currentStart, '1M', 0); @@ -145,15 +146,16 @@ class ReportController extends Controller } /** - * @param AccountRepositoryInterface $repository - * @param string $reportType - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param AccountTaskerInterface $accountTasker + * @param string $reportType + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts * * @return \Illuminate\Http\JsonResponse + * @internal param AccountRepositoryInterface $repository */ - public function yearInOutSummarized(AccountRepositoryInterface $repository, string $reportType, Carbon $start, Carbon $end, Collection $accounts) + public function yearInOutSummarized(AccountTaskerInterface $accountTasker, string $reportType, Carbon $start, Carbon $end, Collection $accounts) { // chart properties for cache: @@ -174,8 +176,8 @@ class ReportController extends Controller while ($currentStart <= $end) { $currentEnd = Navigation::endOfPeriod($currentStart, '1M'); $date = $currentStart->format('Y-m'); - $spent = $repository->spentInPeriod($accounts, $currentStart, $currentEnd); - $earned = $repository->earnedInPeriod($accounts, $currentStart, $currentEnd); + $spent = $accountTasker->amountOutInPeriod($accounts, $accounts, $currentStart, $currentEnd); + $earned = $accountTasker->amountInInPeriod($accounts, $accounts, $currentStart, $currentEnd); $spentArray[$date] = bcmul($spent, '-1'); $earnedArray[$date] = $earned; $currentStart = Navigation::addPeriod($currentStart, '1M', 0); diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php index 9153196476..5857040e44 100644 --- a/app/Http/Controllers/JsonController.php +++ b/app/Http/Controllers/JsonController.php @@ -17,7 +17,7 @@ use Carbon\Carbon; use FireflyIII\Crud\Account\AccountCrudInterface; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\AccountType; -use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; +use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; @@ -97,12 +97,13 @@ class JsonController extends Controller } /** - * @param ARI $accountRepository - * @param AccountCrudInterface $crud + * @param AccountTaskerInterface $accountTasker + * @param AccountCrudInterface $crud * * @return \Illuminate\Http\JsonResponse + * @internal param ARI $accountRepository */ - public function boxIn(ARI $accountRepository, AccountCrudInterface $crud) + public function boxIn(AccountTaskerInterface $accountTasker, AccountCrudInterface $crud) { $start = session('start', Carbon::now()->startOfMonth()); $end = session('end', Carbon::now()->endOfMonth()); @@ -116,7 +117,8 @@ class JsonController extends Controller return Response::json($cache->get()); } $accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]); - $amount = $accountRepository->earnedInPeriod($accounts, $start, $end); + $assets = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); + $amount = $accountTasker->amountInInPeriod($accounts, $assets, $start, $end); $data = ['box' => 'in', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount]; $cache->store($data); @@ -124,12 +126,13 @@ class JsonController extends Controller } /** - * @param ARI $accountRepository - * @param AccountCrudInterface $crud + * @param AccountCrudInterface $crud + * @param AccountTaskerInterface $accountTasker * * @return \Symfony\Component\HttpFoundation\Response + * @internal param ARI $accountRepository */ - public function boxOut(ARI $accountRepository, AccountCrudInterface $crud) + public function boxOut(AccountCrudInterface $crud, AccountTaskerInterface $accountTasker) { $start = session('start', Carbon::now()->startOfMonth()); $end = session('end', Carbon::now()->endOfMonth()); @@ -144,7 +147,8 @@ class JsonController extends Controller } $accounts = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET, AccountType::CASH]); - $amount = $accountRepository->spentInPeriod($accounts, $start, $end); + $assets = $crud->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); + $amount = $accountTasker->amountOutInPeriod($accounts, $assets, $start, $end); $data = ['box' => 'out', 'amount' => Amount::format($amount, false), 'amount_raw' => $amount]; $cache->store($data); diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index a59a2b38ba..974831a0e8 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -15,7 +15,6 @@ namespace FireflyIII\Http\Controllers; use Carbon\Carbon; use FireflyIII\Crud\Account\AccountCrudInterface; use FireflyIII\Http\Requests\NewUserFormRequest; -use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; use Preferences; use Session; use View; diff --git a/app/Import/Importer/CsvImporter.php b/app/Import/Importer/CsvImporter.php index 21bc7813f7..797335cb1d 100644 --- a/app/Import/Importer/CsvImporter.php +++ b/app/Import/Importer/CsvImporter.php @@ -99,6 +99,7 @@ class CsvImporter implements ImporterInterface * @param array $row * * @return ImportEntry + * @throws FireflyException */ private function importSingleRow(int $index, array $row): ImportEntry { diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php index 967b25b6d0..aa03ff06d1 100644 --- a/app/Import/Specifics/IngDescription.php +++ b/app/Import/Specifics/IngDescription.php @@ -63,7 +63,7 @@ class IngDescription implements SpecificInterface $this->removeIBANIngDescription(); $this->removeNameIngDescription(); break; - case 'BA' : // Betaalautomaat + case 'BA': // Betaalautomaat $this->addNameIngDescription(); break; } @@ -80,7 +80,7 @@ class IngDescription implements SpecificInterface */ protected function addNameIngDescription() { - $this->row[8] = $this->row[1] . " " . $this->row[8]; + $this->row[8] = $this->row[1] . ' ' . $this->row[8]; return true; } diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index ea5b4377a8..73656e48cd 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -23,7 +23,6 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Steam; @@ -51,108 +50,6 @@ class AccountRepository implements AccountRepositoryInterface $this->user = $user; } - /** - * This method is almost the same as ::earnedInPeriod, but only works for revenue accounts - * instead of the implied asset accounts for ::earnedInPeriod. ::earnedInPeriod will tell you - * how much money was earned by the given asset accounts. This method will tell you how much money - * these given revenue accounts sent. Ie. how much money was made FROM these revenue accounts. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function earnedFromInPeriod(Collection $accounts, Carbon $start, Carbon $end): string - { - $query = $this->user->transactionJournals()->expanded()->sortCorrectly() - ->transactionTypes([TransactionType::DEPOSIT]); - - if ($end >= $start) { - $query->before($end)->after($start); - } - - if ($accounts->count() > 0) { - $accountIds = $accounts->pluck('id')->toArray(); - $query->leftJoin( - 'transactions as source', function (JoinClause $join) { - $join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', 0); - } - ); - $query->whereIn('source.account_id', $accountIds); - $query->whereNull('source.deleted_at'); - - } - // remove group by - $query->getQuery()->getQuery()->groups = null; - - // get id's - $ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray(); - - // that should do it: - $sum = $this->user->transactions() - ->whereIn('transaction_journal_id', $ids) - ->where('amount', '>', '0') - ->whereNull('transactions.deleted_at') - ->sum('amount'); - - return strval($sum); - - } - - /** - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function earnedInPeriod(Collection $accounts, Carbon $start, Carbon $end): string - { - $query = $this->user->transactionJournals()->expanded()->sortCorrectly() - ->transactionTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]); - - if ($end >= $start) { - $query->before($end)->after($start); - } - - if ($accounts->count() > 0) { - $accountIds = $accounts->pluck('id')->toArray(); - $query->leftJoin( - 'transactions as destination', function (JoinClause $join) { - $join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0); - } - ); - $query->leftJoin( - 'transactions as source', function (JoinClause $join) { - $join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', 0); - } - ); - - $query->whereIn('destination.account_id', $accountIds); - $query->whereNotIn('source.account_id', $accountIds); - $query->whereNull('destination.deleted_at'); - $query->whereNull('source.deleted_at'); - - } - // remove group by - $query->getQuery()->getQuery()->groups = null; - - // get id's - $ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray(); - - - // that should do it: - $sum = $this->user->transactions() - ->whereIn('transaction_journal_id', $ids) - ->where('amount', '>', '0') - ->whereNull('transactions.deleted_at') - ->sum('amount'); - - return strval($sum); - - } - /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection @@ -514,98 +411,4 @@ class AccountRepository implements AccountRepositoryInterface return $journal; } - - /** - * This method is almost the same as ::spentInPeriod, but only works for expense accounts - * instead of the implied asset accounts for ::spentInPeriod. ::spentInPeriod will tell you - * how much money was spent by the given asset accounts. This method will tell you how much money - * these given expense accounts received. Ie. how much money was spent AT these expense accounts. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function spentAtInPeriod(Collection $accounts, Carbon $start, Carbon $end): string - { - /** @var HasMany $query */ - $query = $this->user->transactionJournals()->expanded() - ->transactionTypes([TransactionType::WITHDRAWAL]); - if ($end >= $start) { - $query->before($end)->after($start); - } - - if ($accounts->count() > 0) { - $accountIds = $accounts->pluck('id')->toArray(); - $query->leftJoin( - 'transactions as destination', function (JoinClause $join) { - $join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0); - } - ); - $query->whereIn('destination.account_id', $accountIds); - - } - // remove group by - $query->getQuery()->getQuery()->groups = null; - - // that should do it: - $sum = strval($query->sum('destination.amount')); - if (is_null($sum)) { - $sum = '0'; - } - $sum = bcmul($sum, '-1'); - - return $sum; - } - - /** - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function spentInPeriod(Collection $accounts, Carbon $start, Carbon $end): string - { - /** @var HasMany $query */ - $query = $this->user->transactionJournals()->expanded() - ->transactionTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]); - if ($end >= $start) { - $query->before($end)->after($start); - } - - if ($accounts->count() > 0) { - $accountIds = $accounts->pluck('id')->toArray(); - $query->leftJoin( - 'transactions as source', function (JoinClause $join) { - $join->on('source.transaction_journal_id', '=', 'transaction_journals.id')->where('source.amount', '<', 0); - } - ); - - $query->leftJoin( - 'transactions as destination', function (JoinClause $join) { - $join->on('destination.transaction_journal_id', '=', 'transaction_journals.id')->where('destination.amount', '>', 0); - } - ); - $query->whereIn('source.account_id', $accountIds); - $query->whereNotIn('destination.account_id', $accountIds); - $query->whereNull('source.deleted_at'); - $query->whereNull('destination.deleted_at'); - $query->distinct(); - - } - // remove group by - $query->getQuery()->getQuery()->groups = null; - $ids = $query->get(['transaction_journals.id'])->pluck('id')->toArray(); - - $sum = $this->user->transactions() - ->whereIn('transaction_journal_id', $ids) - ->where('amount', '<', '0') - ->whereNull('transactions.deleted_at') - ->sum('amount'); - - return strval($sum); - } - } diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index f4c628972b..5441d262d0 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -41,15 +41,6 @@ interface AccountRepositoryInterface */ public function earnedFromInPeriod(Collection $accounts, Carbon $start, Carbon $end): string; - /** - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function earnedInPeriod(Collection $accounts, Carbon $start, Carbon $end): string; - /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection @@ -160,27 +151,4 @@ interface AccountRepositoryInterface */ public function openingBalanceTransaction(Account $account) : TransactionJournal; - /** - * This method is almost the same as ::spentInPeriod, but only works for expense accounts - * instead of the implied asset accounts for ::spentInPeriod. ::spentInPeriod will tell you - * how much money was spent by the given asset accounts. This method will tell you how much money - * these given expense accounts received. Ie. how much money was spent AT these expense accounts. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function spentAtInPeriod(Collection $accounts, Carbon $start, Carbon $end): string; - - /** - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function spentInPeriod(Collection $accounts, Carbon $start, Carbon $end): string; - } diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 5beb77c121..f9933ed89b 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -14,10 +14,12 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; use Carbon\Carbon; -use FireflyIII\Models\Account; -use FireflyIII\User; -use Illuminate\Support\Collection; use FireflyIII\Helpers\Collection\Account as AccountCollection; +use FireflyIII\Models\Account; +use FireflyIII\Models\Transaction; +use FireflyIII\User; +use Illuminate\Database\Query\JoinClause; +use Illuminate\Support\Collection; use Log; use Steam; @@ -26,7 +28,7 @@ use Steam; * * @package FireflyIII\Repositories\Account */ -class AccountTasker +class AccountTasker implements AccountTaskerInterface { /** @var User */ private $user; @@ -41,6 +43,64 @@ class AccountTasker $this->user = $user; } + /** + * @see self::amountInPeriod + * + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @return string + */ + public function amountInInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string + { + $idList = [ + 'accounts' => $accounts->pluck('id')->toArray(), + 'exclude' => $excluded->pluck('id')->toArray(), + ]; + + Log::debug( + 'Now calling amountInInPeriod.', + ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], + 'start' => $start->format('Y-m-d'), + 'end' => $end->format('Y-m-d'), + ] + ); + + return $this->amountInPeriod($idList, $start, $end, true); + + } + + /** + * @see self::amountInPeriod + * + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @return string + */ + public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string + { + $idList = [ + 'accounts' => $accounts->pluck('id')->toArray(), + 'exclude' => $excluded->pluck('id')->toArray(), + ]; + + Log::debug( + 'Now calling amountOutInPeriod.', + ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], + 'start' => $start->format('Y-m-d'), + 'end' => $end->format('Y-m-d'), + ] + ); + + return $this->amountInPeriod($idList, $start, $end, false); + + } + /** * @param Carbon $start * @param Carbon $end @@ -96,4 +156,62 @@ class AccountTasker return $object; } + + /** + * Will return how much money has been going out (ie. spent) by the given account(s). + * Alternatively, will return how much money has been coming in (ie. earned) by the given accounts. + * + * Enter $incoming=true for any money coming in (income) + * Enter $incoming=false for any money going out (expenses) + * + * This means any money going out or in. You can also submit accounts to exclude, + * so transfers between accounts are not included. + * + * As a general rule: + * + * - Asset accounts should return both expenses and earnings. But could return 0. + * - Expense accounts (where money is spent) should only return earnings (the account gets money). + * - Revenue accounts (where money comes from) should only return expenses (they spend money). + * + * @param array $accounts + * @param Carbon $start + * @param Carbon $end + * @param bool $incoming + * + * @return string + */ + protected function amountInPeriod(array $accounts, Carbon $start, Carbon $end, bool $incoming): string + { + $joinModifier = $incoming ? '<' : '>'; + $selection = $incoming ? '>' : '<'; + + $query = Transaction + ::distinct() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin( + 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { + $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); + } + ) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->whereIn('transactions.account_id', $accounts['accounts']) + ->where('transactions.amount', $selection, 0); + if (count($accounts['exclude']) > 0) { + $query->whereNotIn('other_side.account_id', $accounts['exclude']); + } + + $result = $query->get(['transactions.id', 'transactions.amount']); + $sum = strval($result->sum('amount')); + if (strlen($sum) === 0) { + Log::debug('Sum is empty.'); + $sum = '0'; + } + Log::debug(sprintf('Result is %s', $sum)); + + return $sum; + } } \ No newline at end of file diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index 73be6cb23b..52dcf95425 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -25,6 +25,30 @@ use Illuminate\Support\Collection; interface AccountTaskerInterface { + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @see AccountTasker::amountInPeriod() + * + * @return string + */ + public function amountInInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string; + + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @see AccountTasker::amountInPeriod() + * + * @return string + */ + public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string; + /** * @param Carbon $start * @param Carbon $end diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php index e8683a611f..d7f4ac30cf 100644 --- a/app/Repositories/ImportJob/ImportJobRepository.php +++ b/app/Repositories/ImportJob/ImportJobRepository.php @@ -42,6 +42,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface * @param string $fileType * * @return ImportJob + * @throws FireflyException */ public function create(string $fileType): ImportJob { diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index a6a528b8a0..32ff7958c3 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -15,7 +15,6 @@ namespace FireflyIII\Support; use Cache; use FireflyIII\Models\Configuration; -use FireflyIII\Models\Preference; use Log; /** diff --git a/routes/console.php b/routes/console.php index a70b3bb62b..6cfd0b721d 100755 --- a/routes/console.php +++ b/routes/console.php @@ -8,8 +8,6 @@ */ declare(strict_types = 1); -use Illuminate\Foundation\Inspiring; - /* |-------------------------------------------------------------------------- | Console Routes @@ -20,7 +18,3 @@ use Illuminate\Foundation\Inspiring; | simple approach to interacting with each command's IO methods. | */ - -Artisan::command('inspire', function () { - $this->comment(Inspiring::quote()); -}); diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 2f2d20ff72..451bd48bed 100755 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -4,6 +4,9 @@ use Illuminate\Foundation\Testing\WithoutMiddleware; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\DatabaseTransactions; +/** + * Class ExampleTest + */ class ExampleTest extends TestCase { /** diff --git a/tests/TestCase.php b/tests/TestCase.php index 8208edcaf6..2781681df5 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -1,5 +1,8 @@ Date: Sun, 9 Oct 2016 07:59:14 +0200 Subject: [PATCH 19/28] Clean up code. --- app/Providers/AccountServiceProvider.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index a91cc1ac1d..f88b52983e 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -41,6 +41,17 @@ class AccountServiceProvider extends ServiceProvider * @return void */ public function register() + { + $this->registerRepository(); + $this->registerTasker(); + + + } + + /** + * + */ + private function registerRepository() { $this->app->bind( 'FireflyIII\Repositories\Account\AccountRepositoryInterface', @@ -55,7 +66,13 @@ class AccountServiceProvider extends ServiceProvider return app('FireflyIII\Repositories\Account\AccountRepository', $arguments); } ); + } + /** + * + */ + private function registerTasker() + { $this->app->bind( 'FireflyIII\Repositories\Account\AccountTaskerInterface', function (Application $app, array $arguments) { From 3f40751a1ae8d6c95cd9883c4a867d9b48aa8e71 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 08:06:49 +0200 Subject: [PATCH 20/28] Forgot to exclude a method. --- app/Providers/AccountServiceProvider.php | 2 +- .../Account/AccountRepositoryInterface.php | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index f88b52983e..0ce5a90329 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -49,7 +49,7 @@ class AccountServiceProvider extends ServiceProvider } /** - * + * */ private function registerRepository() { diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 5441d262d0..263a5d1137 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -27,20 +27,6 @@ use Illuminate\Support\Collection; interface AccountRepositoryInterface { - /** - * This method is almost the same as ::earnedInPeriod, but only works for revenue accounts - * instead of the implied asset accounts for ::earnedInPeriod. ::earnedInPeriod will tell you - * how much money was earned by the given asset accounts. This method will tell you how much money - * these given revenue accounts sent. Ie. how much money was made FROM these revenue accounts. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @return string - */ - public function earnedFromInPeriod(Collection $accounts, Carbon $start, Carbon $end): string; - /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection From 1d2d3523d6773557eaebc4e501b49a8ae9dccf70 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 08:18:47 +0200 Subject: [PATCH 21/28] Move CRUD method count() to account repository --- app/Crud/Account/AccountCrud.php | 12 ------------ app/Crud/Account/AccountCrudInterface.php | 7 ------- app/Http/Controllers/HomeController.php | 2 +- app/Http/Controllers/NewUserController.php | 7 ++++--- app/Repositories/Account/AccountRepository.php | 14 ++++++++++++++ .../Account/AccountRepositoryInterface.php | 8 ++++++++ 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index 814735dae1..76bcb659e3 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -52,18 +52,6 @@ class AccountCrud implements AccountCrudInterface $this->user = $user; } - /** - * @param array $types - * - * @return int - */ - public function count(array $types):int - { - $count = $this->user->accounts()->accountTypeIn($types)->count(); - - return $count; - } - /** * @param Account $account * @param Account $moveTo diff --git a/app/Crud/Account/AccountCrudInterface.php b/app/Crud/Account/AccountCrudInterface.php index f7e995f020..772bf6afcb 100644 --- a/app/Crud/Account/AccountCrudInterface.php +++ b/app/Crud/Account/AccountCrudInterface.php @@ -24,13 +24,6 @@ use Illuminate\Support\Collection; */ interface AccountCrudInterface { - /** - * @param array $types - * - * @return int - */ - public function count(array $types):int; - /** * @param Account $account * @param Account $moveTo diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 51ef56eac4..bb13eb2fea 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -123,7 +123,7 @@ class HomeController extends Controller { $types = config('firefly.accountTypesByIdentifier.asset'); - $count = $crud->count($types); + $count = $repository->count($types); if ($count == 0) { return redirect(route('new-user.index')); diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index 974831a0e8..f770a191fa 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -15,6 +15,7 @@ namespace FireflyIII\Http\Controllers; use Carbon\Carbon; use FireflyIII\Crud\Account\AccountCrudInterface; use FireflyIII\Http\Requests\NewUserFormRequest; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; use Preferences; use Session; use View; @@ -36,11 +37,11 @@ class NewUserController extends Controller /** - * @param AccountCrudInterface $crud + * @param AccountRepositoryInterface $repository * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View */ - public function index(AccountCrudInterface $crud) + public function index(AccountRepositoryInterface $repository) { View::share('title', trans('firefly.welcome')); @@ -48,7 +49,7 @@ class NewUserController extends Controller $types = config('firefly.accountTypesByIdentifier.asset'); - $count = $crud->count($types); + $count = $repository->count($types); if ($count > 0) { return redirect(route('index')); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 73656e48cd..8e4348cba0 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -50,6 +50,20 @@ class AccountRepository implements AccountRepositoryInterface $this->user = $user; } + /** + * Moved here from account CRUD + * + * @param array $types + * + * @return int + */ + public function count(array $types):int + { + $count = $this->user->accounts()->accountTypeIn($types)->count(); + + return $count; + } + /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 263a5d1137..855081fba1 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -26,6 +26,14 @@ use Illuminate\Support\Collection; */ interface AccountRepositoryInterface { + /** + * Moved here from account CRUD. + * + * @param array $types + * + * @return int + */ + public function count(array $types): int; /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, From a3359ba47a89243f053698529fe0fbf9f94b88fc Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 08:20:29 +0200 Subject: [PATCH 22/28] Moved destroy() method from CRUD to Account repos. --- app/Crud/Account/AccountCrud.php | 16 --------------- app/Crud/Account/AccountCrudInterface.php | 7 ------- app/Http/Controllers/AccountController.php | 5 +++-- .../Account/AccountRepository.php | 20 +++++++++++++++++++ .../Account/AccountRepositoryInterface.php | 11 ++++++++++ 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index 76bcb659e3..8b01d018f8 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -52,23 +52,7 @@ class AccountCrud implements AccountCrudInterface $this->user = $user; } - /** - * @param Account $account - * @param Account $moveTo - * - * @return bool - */ - public function destroy(Account $account, Account $moveTo): bool - { - if (!is_null($moveTo->id)) { - DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]); - } - if (!is_null($account)) { - $account->delete(); - } - return true; - } /** * @param $accountId diff --git a/app/Crud/Account/AccountCrudInterface.php b/app/Crud/Account/AccountCrudInterface.php index 772bf6afcb..15dd162de9 100644 --- a/app/Crud/Account/AccountCrudInterface.php +++ b/app/Crud/Account/AccountCrudInterface.php @@ -24,13 +24,6 @@ use Illuminate\Support\Collection; */ interface AccountCrudInterface { - /** - * @param Account $account - * @param Account $moveTo - * - * @return bool - */ - public function destroy(Account $account, Account $moveTo): bool; /** * @param int $accountId diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index c003953b4c..aabab3107d 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -94,19 +94,20 @@ class AccountController extends Controller } /** + * @param ARI $repository * @param AccountCrudInterface $crud * @param Account $account * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ - public function destroy(AccountCrudInterface $crud, Account $account) + public function destroy(ARI $repository, AccountCrudInterface $crud, Account $account) { $type = $account->accountType->type; $typeName = config('firefly.shortNamesByFullName.' . $type); $name = $account->name; $moveTo = $crud->find(intval(Input::get('move_account_before_delete'))); - $crud->destroy($account, $moveTo); + $repository->destroy($account, $moveTo); Session::flash('success', strval(trans('firefly.' . $typeName . '_deleted', ['name' => $name]))); Preferences::mark(); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 8e4348cba0..0dc0072b50 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -64,6 +64,26 @@ class AccountRepository implements AccountRepositoryInterface return $count; } + /** + * Moved here from account CRUD. + * + * @param Account $account + * @param Account $moveTo + * + * @return bool + */ + public function destroy(Account $account, Account $moveTo): bool + { + if (!is_null($moveTo->id)) { + DB::table('transactions')->where('account_id', $account->id)->update(['account_id' => $moveTo->id]); + } + if (!is_null($account)) { + $account->delete(); + } + + return true; + } + /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 855081fba1..ae253ba416 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -26,6 +26,7 @@ use Illuminate\Support\Collection; */ interface AccountRepositoryInterface { + /** * Moved here from account CRUD. * @@ -35,6 +36,16 @@ interface AccountRepositoryInterface */ public function count(array $types): int; + /** + * Moved here from account CRUD. + * + * @param Account $account + * @param Account $moveTo + * + * @return bool + */ + public function destroy(Account $account, Account $moveTo): bool; + /** * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, * as well as the transfers that move away from those $accounts. This is a slightly sharper selection From 90f2e27f1f4bc4bff50d76b0ec04848961801136 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 09:32:12 +0200 Subject: [PATCH 23/28] Refactoring income and expense reports. --- app/Crud/Account/AccountCrud.php | 2 - app/Helpers/Collection/Expense.php | 32 +--- app/Helpers/Collection/Income.php | 28 +--- app/Helpers/Report/ReportHelper.php | 29 ++-- app/Http/Controllers/AccountController.php | 8 +- .../Account/AccountRepository.php | 83 ---------- .../Account/AccountRepositoryInterface.php | 30 ---- app/Repositories/Account/AccountTasker.php | 143 ++++++++++++++++++ .../Account/AccountTaskerInterface.php | 26 ++++ 9 files changed, 197 insertions(+), 184 deletions(-) diff --git a/app/Crud/Account/AccountCrud.php b/app/Crud/Account/AccountCrud.php index 8b01d018f8..03b12eba24 100644 --- a/app/Crud/Account/AccountCrud.php +++ b/app/Crud/Account/AccountCrud.php @@ -14,7 +14,6 @@ declare(strict_types = 1); namespace FireflyIII\Crud\Account; use Carbon\Carbon; -use DB; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; @@ -53,7 +52,6 @@ class AccountCrud implements AccountCrudInterface } - /** * @param $accountId * diff --git a/app/Helpers/Collection/Expense.php b/app/Helpers/Collection/Expense.php index 86ff175e28..7a06e4f628 100644 --- a/app/Helpers/Collection/Expense.php +++ b/app/Helpers/Collection/Expense.php @@ -12,7 +12,6 @@ declare(strict_types = 1); namespace FireflyIII\Helpers\Collection; -use FireflyIII\Models\TransactionJournal; use Illuminate\Support\Collection; use stdClass; @@ -38,36 +37,11 @@ class Expense } /** - * @param TransactionJournal $entry + * @param stdClass $entry */ - public function addOrCreateExpense(TransactionJournal $entry) + public function addOrCreateExpense(stdClass $entry) { - // add each account individually: - $destinations = TransactionJournal::destinationTransactionList($entry); - - foreach ($destinations as $transaction) { - $amount = strval($transaction->amount); - $account = $transaction->account; - if (bccomp('0', $amount) === -1) { - $amount = bcmul($amount, '-1'); - } - - $object = new stdClass; - $object->amount = $amount; - $object->name = $account->name; - $object->count = 1; - $object->id = $account->id; - - // overrule some properties: - if ($this->expenses->has($account->id)) { - $object = $this->expenses->get($account->id); - $object->amount = bcadd($object->amount, $amount); - $object->count++; - } - $this->expenses->put($account->id, $object); - } - - + $this->expenses->put($entry->id, $entry); } /** diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php index 6c1075b606..1bd6036150 100644 --- a/app/Helpers/Collection/Income.php +++ b/app/Helpers/Collection/Income.php @@ -12,7 +12,6 @@ declare(strict_types = 1); namespace FireflyIII\Helpers\Collection; -use FireflyIII\Models\TransactionJournal; use Illuminate\Support\Collection; use stdClass; @@ -39,32 +38,11 @@ class Income } /** - * @param TransactionJournal $entry + * @param stdClass $entry */ - public function addOrCreateIncome(TransactionJournal $entry) + public function addOrCreateIncome(stdClass $entry) { - // add each account individually: - $sources = TransactionJournal::sourceTransactionList($entry); - - foreach ($sources as $transaction) { - $amount = strval($transaction->amount); - $account = $transaction->account; - $amount = bcmul($amount, '-1'); - - $object = new stdClass; - $object->amount = $amount; - $object->name = $account->name; - $object->count = 1; - $object->id = $account->id; - - // overrule some properties: - if ($this->incomes->has($account->id)) { - $object = $this->incomes->get($account->id); - $object->amount = bcadd($object->amount, $amount); - $object->count++; - } - $this->incomes->put($account->id, $object); - } + $this->incomes->put($entry->id, $entry); } diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index d13dd53b70..6f1a1f7529 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -24,7 +24,7 @@ use FireflyIII\Models\Bill; use FireflyIII\Models\Category; use FireflyIII\Models\Tag; use FireflyIII\Models\TransactionJournal; -use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; @@ -32,6 +32,7 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; +use stdClass; /** * Class ReportHelper @@ -146,14 +147,14 @@ class ReportHelper implements ReportHelperInterface public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense { $object = new Expense; - /** @var AccountRepositoryInterface $repos */ - $repos = app(AccountRepositoryInterface::class); - $journals = $repos->expensesInPeriod($accounts, $start, $end); - /** @var TransactionJournal $entry */ - foreach ($journals as $entry) { - $amount = TransactionJournal::amount($entry); - $object->addToTotal($amount); + /** @var AccountTaskerInterface $tasker */ + $tasker = app(AccountTaskerInterface::class); + $collection = $tasker->expenseReport($accounts, $accounts, $start, $end); + + /** @var stdClass $entry */ + foreach ($collection as $entry) { + $object->addToTotal($entry->amount); $object->addOrCreateExpense($entry); } @@ -172,13 +173,13 @@ class ReportHelper implements ReportHelperInterface public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income { $object = new Income; - /** @var AccountRepositoryInterface $repos */ - $repos = app(AccountRepositoryInterface::class); - $journals = $repos->incomesInPeriod($accounts, $start, $end); + /** @var AccountTaskerInterface $tasker */ + $tasker = app(AccountTaskerInterface::class); + $collection = $tasker->incomeReport($accounts, $accounts, $start, $end); - foreach ($journals as $entry) { - $amount = TransactionJournal::amount($entry); - $object->addToTotal($amount); + /** @var stdClass $entry */ + foreach ($collection as $entry) { + $object->addToTotal($entry->amount); $object->addOrCreateIncome($entry); } diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index aabab3107d..2d0f070bbb 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -247,7 +247,13 @@ class AccountController extends Controller // $entries = $cache->get(); // return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle')); } - $assets = $crud->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]); + + // only include asset accounts when this account is an asset: + $assets = new Collection; + if (in_array($account->accountType->type, [AccountType::ASSET, AccountType::DEFAULT])) { + $assets = $crud->getAccountsByType([AccountType::ASSET, AccountType::DEFAULT]); + } + while ($end >= $start) { $end = Navigation::startOfPeriod($end, $range); $currentEnd = Navigation::endOfPeriod($end, $range); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 0dc0072b50..dd67f0f60d 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -84,46 +84,6 @@ class AccountRepository implements AccountRepositoryInterface return true; } - /** - * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, - * as well as the transfers that move away from those $accounts. This is a slightly sharper selection - * than made by journalsInPeriod itself. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @see AccountRepositoryInterface::journalsInPeriod - * - * @return Collection - */ - public function expensesInPeriod(Collection $accounts, Carbon $start, Carbon $end): Collection - { - $types = [TransactionType::WITHDRAWAL, TransactionType::TRANSFER]; - $journals = $this->journalsInPeriod($accounts, $types, $start, $end); - $accountIds = $accounts->pluck('id')->toArray(); - - // filter because some of these journals are still too much. - $journals = $journals->filter( - function (TransactionJournal $journal) use ($accountIds) { - if ($journal->transaction_type_type == TransactionType::WITHDRAWAL) { - return true; - } - /* - * The source of a transfer must be one of the $accounts in order to - * be included. Otherwise, it would not be an expense. - */ - if (in_array($journal->source_account_id, $accountIds)) { - return true; - } - - return false; - } - ); - - return $journals; - } - /** * @param Account $account * @@ -258,49 +218,6 @@ class AccountRepository implements AccountRepositoryInterface return $accounts; } - /** - * This method will call AccountRepositoryInterface::journalsInPeriod and get all deposits made to the given $accounts, - * as well as the transfers that move away to those $accounts. This is a slightly sharper selection - * than made by journalsInPeriod itself. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @see AccountRepositoryInterface::journalsInPeriod - * - * @return Collection - */ - public function incomesInPeriod(Collection $accounts, Carbon $start, Carbon $end): Collection - { - $types = [TransactionType::DEPOSIT, TransactionType::TRANSFER]; - $journals = $this->journalsInPeriod($accounts, $types, $start, $end); - $accountIds = $accounts->pluck('id')->toArray(); - - // filter because some of these journals are still too much. - $journals = $journals->filter( - function (TransactionJournal $journal) use ($accountIds) { - if ($journal->transaction_type_type == TransactionType::DEPOSIT) { - return true; - } - /* - * The destination of a transfer must be one of the $accounts in order to - * be included. Otherwise, it would not be income. - */ - $destinations = TransactionJournal::destinationAccountList($journal)->pluck('id')->toArray(); - - if (count(array_intersect($destinations, $accountIds)) > 0) { - // at least one of $target is in $haystack - return true; - } - - return false; - } - ); - - return $journals; - } - /** * @param Collection $accounts * @param array $types diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index ae253ba416..83f4b9b84d 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -46,21 +46,6 @@ interface AccountRepositoryInterface */ public function destroy(Account $account, Account $moveTo): bool; - /** - * This method will call AccountRepositoryInterface::journalsInPeriod and get all withdrawaks made from the given $accounts, - * as well as the transfers that move away from those $accounts. This is a slightly sharper selection - * than made by journalsInPeriod itself. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @see AccountRepositoryInterface::journalsInPeriod - * - * @return Collection - */ - public function expensesInPeriod(Collection $accounts, Carbon $start, Carbon $end): Collection; - /** * @param Account $account * @@ -96,21 +81,6 @@ interface AccountRepositoryInterface */ public function getSavingsAccounts(Carbon $start, Carbon $end): Collection; - /** - * This method will call AccountRepositoryInterface::journalsInPeriod and get all deposits made to the given $accounts, - * as well as the transfers that move to to those $accounts. This is a slightly sharper selection - * than made by journalsInPeriod itself. - * - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * - * @see AccountRepositoryInterface::journalsInPeriod - * - * @return Collection - */ - public function incomesInPeriod(Collection $accounts, Carbon $start, Carbon $end): Collection; - /** * @param Collection $accounts * @param array $types diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index f9933ed89b..f920981e52 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -14,6 +14,8 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; use Carbon\Carbon; +use Crypt; +use DB; use FireflyIII\Helpers\Collection\Account as AccountCollection; use FireflyIII\Models\Account; use FireflyIII\Models\Transaction; @@ -21,6 +23,7 @@ use FireflyIII\User; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Log; +use stdClass; use Steam; /** @@ -101,6 +104,35 @@ class AccountTasker implements AccountTaskerInterface } + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @return Collection + * @see self::financialReport + * + */ + public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection + { + $idList = [ + 'accounts' => $accounts->pluck('id')->toArray(), + 'exclude' => $excluded->pluck('id')->toArray(), + ]; + + Log::debug( + 'Now calling expenseReport.', + ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], + 'start' => $start->format('Y-m-d'), + 'end' => $end->format('Y-m-d'), + ] + ); + + return $this->financialReport($idList, $start, $end, false); + + } + /** * @param Carbon $start * @param Carbon $end @@ -157,6 +189,35 @@ class AccountTasker implements AccountTaskerInterface return $object; } + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @see AccountTasker::financialReport() + * + * @return Collection + * + */ + public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection + { + $idList = [ + 'accounts' => $accounts->pluck('id')->toArray(), + 'exclude' => $excluded->pluck('id')->toArray(), + ]; + + Log::debug( + 'Now calling expenseReport.', + ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], + 'start' => $start->format('Y-m-d'), + 'end' => $end->format('Y-m-d'), + ] + ); + + return $this->financialReport($idList, $start, $end, true); + } + /** * Will return how much money has been going out (ie. spent) by the given account(s). * Alternatively, will return how much money has been coming in (ie. earned) by the given accounts. @@ -214,4 +275,86 @@ class AccountTasker implements AccountTaskerInterface return $sum; } + + /** + * + * This method will determin how much has flown (in the given period) from OR to $accounts to/from anywhere else, + * except $excluded. This could be a list of incomes, or a list of expenses. This method shows + * the name, the amount and the number of transactions. It is a summary, and only used in some reports. + * + * $incoming=true a list of incoming money (earnings) + * $incoming=false a list of outgoing money (expenses). + * + * @param array $accounts + * @param Carbon $start + * @param Carbon $end + * @param bool $incoming + * + * @return Collection + */ + protected function financialReport(array $accounts, Carbon $start, Carbon $end, bool $incoming): Collection + { + $collection = new Collection; + $joinModifier = $incoming ? '<' : '>'; + $selection = $incoming ? '>' : '<'; + $query = Transaction + ::distinct() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin( + 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { + $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); + } + ) + ->leftJoin('accounts as other_account', 'other_account.id', '=', 'other_side.account_id') + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->whereIn('transactions.account_id', $accounts['accounts']) + ->where('other_side.amount', '=', DB::raw('transactions.amount * -1')) + ->where('transactions.amount', $selection, 0) + ->orderBy('transactions.amount'); + + if (count($accounts['exclude']) > 0) { + $query->whereNotIn('other_side.account_id', $accounts['exclude']); + } + $set = $query->get( + [ + 'other_side.account_id', + 'other_account.name', + 'other_account.encrypted', + 'transactions.amount', + ] + ); + // summarize ourselves: + $temp = []; + foreach ($set as $entry) { + // save into $temp: + $id = intval($entry->account_id); + if (isset($temp[$id])) { + $temp[$id]['count']++; + $temp[$id]['amount'] = bcadd($temp[$id]['amount'], $entry->amount); + } + if (!isset($temp[$id])) { + $temp[$id] = [ + 'name' => intval($entry->encrypted) === 1 ? Crypt::decrypt($entry->name) : $entry->name, + 'amount' => $entry->amount, + 'count' => 1, + ]; + } + } + + // loop $temp and create collection: + foreach ($temp as $key => $entry) { + $object = new stdClass(); + $object->id = $key; + $object->name = $entry['name']; + $object->count = $entry['count']; + $object->amount = $entry['amount']; + $collection->push($object); + } + + return $collection; + } } \ No newline at end of file diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index 52dcf95425..15a95041cd 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -49,6 +49,19 @@ interface AccountTaskerInterface */ public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string; + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @see AccountTasker::financialReport() + * + * @return Collection + * + */ + public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; + /** * @param Carbon $start * @param Carbon $end @@ -58,4 +71,17 @@ interface AccountTaskerInterface */ public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection; + /** + * @param Collection $accounts + * @param Collection $excluded + * @param Carbon $start + * @param Carbon $end + * + * @see AccountTasker::financialReport() + * + * @return Collection + * + */ + public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; + } \ No newline at end of file From a4d2ed74fc884dea5a4deecbe5f13532240c36c8 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 09:41:03 +0200 Subject: [PATCH 24/28] Make sure all journals are included. --- app/Repositories/Account/AccountTasker.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index f920981e52..41f44e6ef9 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -321,6 +321,7 @@ class AccountTasker implements AccountTaskerInterface } $set = $query->get( [ + 'transaction_journals.id', 'other_side.account_id', 'other_account.name', 'other_account.encrypted', From 39ea9e85a77ebaba7ae5a541a13d41115c7a639e Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 10:53:37 +0200 Subject: [PATCH 25/28] Various code cleanup and refactoring. Restored cache. --- app/Http/Controllers/AccountController.php | 10 ++++------ app/Repositories/Account/AccountRepository.php | 14 +++++++++++++- .../Account/AccountRepositoryInterface.php | 8 ++++++++ 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 2d0f070bbb..c4401c21dd 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -226,10 +226,7 @@ class AccountController extends Controller // grouped other months thing: // oldest transaction in account: - $start = $repository->firstUseDate($account); - if ($start->year == 1900) { - $start = new Carbon; - } + $start = $repository->firstUseDate($account); $range = Preferences::get('viewRange', '1M')->data; $start = Navigation::startOfPeriod($start, $range); $end = Navigation::endOfX(new Carbon, $range); @@ -244,8 +241,9 @@ class AccountController extends Controller if ($cache->has()) { - // $entries = $cache->get(); - // return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle')); + $entries = $cache->get(); + + return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle')); } // only include asset accounts when this account is an asset: diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index dd67f0f60d..bce6c9650b 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -16,6 +16,7 @@ namespace FireflyIII\Repositories\Account; use Carbon\Carbon; use DB; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\Transaction; @@ -85,13 +86,15 @@ class AccountRepository implements AccountRepositoryInterface } /** + * Returns the date of the first time the Account has been used, or today if it has never been used. + * * @param Account $account * * @return Carbon */ public function firstUseDate(Account $account): Carbon { - $first = new Carbon('1900-01-01'); + $first = new Carbon; /** @var Transaction $first */ $date = $account->transactions() @@ -108,13 +111,22 @@ class AccountRepository implements AccountRepositoryInterface } /** + * Returns the transaction from a journal that is related to a given account. Since a journal generally only contains + * two transactions, this will return one of the two. This method fails horribly when the journal has more than two transactions, + * but luckily it isn't used for such folly. + * * @param TransactionJournal $journal * @param Account $account * * @return Transaction + * @throws FireflyException */ public function getFirstTransaction(TransactionJournal $journal, Account $account): Transaction { + $count = $journal->transactions()->count(); + if ($count > 2) { + throw new FireflyException(sprintf('Cannot use getFirstTransaction on journal #%d', $journal->id)); + } $transaction = $journal->transactions()->where('account_id', $account->id)->first(); if (is_null($transaction)) { $transaction = new Transaction; diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index 83f4b9b84d..c02789239a 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -14,6 +14,7 @@ declare(strict_types = 1); namespace FireflyIII\Repositories\Account; use Carbon\Carbon; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Account; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; @@ -47,6 +48,8 @@ interface AccountRepositoryInterface public function destroy(Account $account, Account $moveTo): bool; /** + * Returns the date of the first time the Account has been used, or today if it has never been used. + * * @param Account $account * * @return Carbon @@ -54,10 +57,15 @@ interface AccountRepositoryInterface public function firstUseDate(Account $account): Carbon; /** + * Returns the transaction from a journal that is related to a given account. Since a journal generally only contains + * two transactions, this will return one of the two. This method fails horribly when the journal has more than two transactions, + * but luckily it isn't used for such folly. + * * @param TransactionJournal $journal * @param Account $account * * @return Transaction + * @throws FireflyException */ public function getFirstTransaction(TransactionJournal $journal, Account $account): Transaction; From a8a014189d4dd80a20081c618bf654bff7b5c953 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 10:57:06 +0200 Subject: [PATCH 26/28] Removed method that was already there under another name. --- app/Http/Controllers/AccountController.php | 2 +- .../Account/AccountRepository.php | 47 +++++-------------- .../Account/AccountRepositoryInterface.php | 9 ---- 3 files changed, 13 insertions(+), 45 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index c4401c21dd..42fabc7488 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -226,7 +226,7 @@ class AccountController extends Controller // grouped other months thing: // oldest transaction in account: - $start = $repository->firstUseDate($account); + $start = $repository->oldestJournalDate($account); $range = Preferences::get('viewRange', '1M')->data; $start = Navigation::startOfPeriod($start, $range); $end = Navigation::endOfX(new Carbon, $range); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index bce6c9650b..9c39d9c373 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -85,30 +85,6 @@ class AccountRepository implements AccountRepositoryInterface return true; } - /** - * Returns the date of the first time the Account has been used, or today if it has never been used. - * - * @param Account $account - * - * @return Carbon - */ - public function firstUseDate(Account $account): Carbon - { - $first = new Carbon; - - /** @var Transaction $first */ - $date = $account->transactions() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->orderBy('transaction_journals.date', 'ASC') - ->orderBy('transaction_journals.order', 'DESC') - ->orderBy('transaction_journals.id', 'ASC') - ->first(['transaction_journals.date']); - if (!is_null($date)) { - $first = new Carbon($date->date); - } - - return $first; - } /** * Returns the transaction from a journal that is related to a given account. Since a journal generally only contains @@ -340,19 +316,20 @@ class AccountRepository implements AccountRepositoryInterface */ public function oldestJournalDate(Account $account): Carbon { - /** @var TransactionJournal $journal */ - $journal = TransactionJournal:: - leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transactions.account_id', $account->id) - ->orderBy('transaction_journals.date', 'ASC') - ->orderBy('transaction_journals.order', 'DESC') - ->orderBy('transaction_journals.id', 'ÅSC') - ->first(['transaction_journals.*']); - if (is_null($journal)) { - return new Carbon('1900-01-01'); + $first = new Carbon; + + /** @var Transaction $first */ + $date = $account->transactions() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->orderBy('transaction_journals.date', 'ASC') + ->orderBy('transaction_journals.order', 'DESC') + ->orderBy('transaction_journals.id', 'ASC') + ->first(['transaction_journals.date']); + if (!is_null($date)) { + $first = new Carbon($date->date); } - return $journal->date; + return $first; } /** diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index c02789239a..d4b6c55212 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -47,15 +47,6 @@ interface AccountRepositoryInterface */ public function destroy(Account $account, Account $moveTo): bool; - /** - * Returns the date of the first time the Account has been used, or today if it has never been used. - * - * @param Account $account - * - * @return Carbon - */ - public function firstUseDate(Account $account): Carbon; - /** * Returns the transaction from a journal that is related to a given account. Since a journal generally only contains * two transactions, this will return one of the two. This method fails horribly when the journal has more than two transactions, From b0828588667c6330fe6f98a8d6347e03daee5f37 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 10:58:54 +0200 Subject: [PATCH 27/28] Removed unused blocks from the front page. Savings and piggy banks. --- app/Http/Controllers/HomeController.php | 10 +-- resources/views/index.twig | 111 ------------------------ 2 files changed, 1 insertion(+), 120 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index bb13eb2fea..bc1586f7cc 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -142,14 +142,6 @@ class HomeController extends Controller $end = session('end', Carbon::now()->endOfMonth()); $showTour = Preferences::get('tour', true)->data; $accounts = $crud->getAccountsById($frontPage->data); - $savings = $repository->getSavingsAccounts($start, $end); - $piggyBankAccounts = $repository->getPiggyBankAccounts($start, $end); - - - $savingsTotal = '0'; - foreach ($savings as $savingAccount) { - $savingsTotal = bcadd($savingsTotal, Steam::balance($savingAccount, $end)); - } foreach ($accounts as $account) { $set = $repository->journalsInPeriod(new Collection([$account]), [], $start, $end); @@ -161,7 +153,7 @@ class HomeController extends Controller } return view( - 'index', compact('count', 'showTour', 'title', 'savings', 'subTitle', 'mainTitleIcon', 'transactions', 'savingsTotal', 'piggyBankAccounts') + 'index', compact('count', 'showTour', 'title','subTitle', 'mainTitleIcon', 'transactions') ); } diff --git a/resources/views/index.twig b/resources/views/index.twig index 64a8e1d873..e7356da910 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -103,117 +103,6 @@
-
-
- -
-
-

{{ 'savings'|_ }}

- -
-
- {% if savings|length == 0 %} -

{{ 'markAsSavingsToContinue'|_ }}

- {% else %} - {% for account in savings %} - -
- -
{{ account.startBalance|formatAmount }}
- -
- {% if account.difference < 0 %} - -
-
- {% if account.percentage >= 20 %} - {{ account.difference|formatAmountPlain }} - {% endif %} -
-
- {% if account.percentage < 20 %} - {{ account.difference|formatAmountPlain }} - {% endif %} -
-
- {% else %} - -
-
- {% if account.percentage >= 20 %} - {{ account.difference|formatAmountPlain }} - {% endif %} -
-
- {% if account.percentage < 20 %} - {{ account.difference|formatAmountPlain }} - {% endif %} -
-
- {% endif %} - -
- -
{{ account.endBalance|formatAmount }}
-
- {% endfor %} - {% endif %} -
- -
-
-
- -
-
-

{{ 'piggyBanks'|_ }}

- -
-
- {% if piggyBankAccounts|length == 0 %} -

{{ 'createPiggyToContinue'|_ }}

- {% else %} - {% for account in piggyBankAccounts %} - -
- -
{{ account.startBalance|formatAmount }}
- -
- -
-
- {% if account.percentage >= 20 %} - {{ account.piggyBalance|formatAmountPlain }} {{ 'divided'|_ }} - {% endif %} -
-
- {% if account.percentage < 20 %} - {{ account.difference|formatAmountPlain }} {{ 'toDivide'|_ }} - {% endif %} -
-
-
- -
{{ account.piggyBalance|formatAmount }}
-
- {% endfor %} - {% endif %} -
-
-
-
- {% endblock %} {% block scripts %} From f5adb4047f7ca079493a5ffd45546597d929c61b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 9 Oct 2016 10:59:28 +0200 Subject: [PATCH 28/28] Remove methods no longer used. --- .../Account/AccountRepository.php | 95 ------------------- .../Account/AccountRepositoryInterface.php | 20 ---- 2 files changed, 115 deletions(-) diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 9c39d9c373..369a88ccdb 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -111,101 +111,6 @@ class AccountRepository implements AccountRepositoryInterface return $transaction; } - /** - * Get the accounts of a user that have piggy banks connected to them. - * - * @param Carbon $start - * @param Carbon $end - * - * @return Collection - */ - public function getPiggyBankAccounts(Carbon $start, Carbon $end): Collection - { - $collection = new Collection(DB::table('piggy_banks')->distinct()->get(['piggy_banks.account_id'])); - $accountIds = $collection->pluck('account_id')->toArray(); - $accounts = new Collection; - $accountIds = array_unique($accountIds); - if (count($accountIds) > 0) { - $accounts = $this->user->accounts()->whereIn('id', $accountIds)->where('accounts.active', 1)->get(); - } - - $accounts->each( - function (Account $account) use ($start, $end) { - $account->startBalance = Steam::balanceIgnoreVirtual($account, $start); - $account->endBalance = Steam::balanceIgnoreVirtual($account, $end); - $account->piggyBalance = '0'; - /** @var PiggyBank $piggyBank */ - foreach ($account->piggyBanks as $piggyBank) { - $account->piggyBalance = bcadd($account->piggyBalance, $piggyBank->currentRelevantRep()->currentamount); - } - // sum of piggy bank amounts on this account: - // diff between endBalance and piggyBalance. - // then, percentage. - $difference = bcsub($account->endBalance, $account->piggyBalance); - $account->difference = $difference; - $account->percentage = $difference != 0 && $account->endBalance != 0 ? round((($difference / $account->endBalance) * 100)) : 100; - - } - ); - - - return $accounts; - - } - - /** - * Get savings accounts. - * - * @param Carbon $start - * @param Carbon $end - * - * @return Collection - */ - public function getSavingsAccounts(Carbon $start, Carbon $end): Collection - { - $accounts = $this->user->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC') - ->leftJoin('account_meta', 'account_meta.account_id', '=', 'accounts.id') - ->where('account_meta.name', 'accountRole') - ->where('accounts.active', 1) - ->where('account_meta.data', '"savingAsset"') - ->get(['accounts.*']); - - $accounts->each( - function (Account $account) use ($start, $end) { - $account->startBalance = Steam::balance($account, $start); - $account->endBalance = Steam::balance($account, $end); - - // diff (negative when lost, positive when gained) - $diff = bcsub($account->endBalance, $account->startBalance); - - if ($diff < 0 && $account->startBalance > 0) { - // percentage lost compared to start. - $pct = (($diff * -1) / $account->startBalance) * 100; - - $pct = $pct > 100 ? 100 : $pct; - $account->difference = $diff; - $account->percentage = round($pct); - - return; - } - if ($diff >= 0 && $account->startBalance > 0) { - $pct = ($diff / $account->startBalance) * 100; - $pct = $pct > 100 ? 100 : $pct; - $account->difference = $diff; - $account->percentage = round($pct); - - return; - } - $account->difference = $diff; - $account->percentage = 100; - - } - ); - - - return $accounts; - } - /** * @param Collection $accounts * @param array $types diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index d4b6c55212..7ed47ff454 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -60,26 +60,6 @@ interface AccountRepositoryInterface */ public function getFirstTransaction(TransactionJournal $journal, Account $account): Transaction; - /** - * Get the accounts of a user that have piggy banks connected to them. - * - * @param Carbon $start - * @param Carbon $end - * - * @return Collection - */ - public function getPiggyBankAccounts(Carbon $start, Carbon $end): Collection; - - /** - * Get savings accounts. - * - * @param Carbon $start - * @param Carbon $end - * - * @return Collection - */ - public function getSavingsAccounts(Carbon $start, Carbon $end): Collection; - /** * @param Collection $accounts * @param array $types