From 66d7fd7d4c8be7a8c1fd5b7814fdc74838d68aa3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 20 May 2016 08:57:45 +0200 Subject: [PATCH] Declare strict types. --- app/Bootstrap/ConfigureLogging.php | 20 ++++++++++--------- app/Console/Commands/VerifyDatabase.php | 1 + app/Crud/Split/Journal.php | 2 ++ app/Crud/Split/JournalInterface.php | 2 ++ app/Events/BudgetLimitStored.php | 4 ++-- app/Events/BudgetLimitUpdated.php | 4 ++-- app/Events/TransactionStored.php | 10 ++-------- app/Export/Entry/EntryAccount.php | 2 ++ app/Export/Entry/EntryBill.php | 2 ++ app/Export/Entry/EntryBudget.php | 2 ++ app/Export/Entry/EntryCategory.php | 2 ++ app/Export/Processor.php | 2 +- .../Events/BudgetLimitEventHandler.php | 2 ++ .../Events/ConnectTransactionToPiggyBank.php | 5 +++-- app/Http/Controllers/AccountController.php | 5 ++++- app/Http/Controllers/Admin/HomeController.php | 2 ++ app/Http/Controllers/Admin/UserController.php | 2 ++ app/Http/Controllers/BillController.php | 5 ++++- app/Http/Controllers/BudgetController.php | 5 ++++- app/Http/Controllers/CategoryController.php | 5 ++++- app/Http/Controllers/CurrencyController.php | 5 ++++- app/Http/Controllers/HelpController.php | 5 ++++- app/Http/Controllers/HomeController.php | 4 +++- app/Http/Controllers/JsonController.php | 4 +++- app/Http/Controllers/NewUserController.php | 4 +++- app/Http/Controllers/PiggyBankController.php | 4 +++- .../Controllers/PreferencesController.php | 4 +++- app/Http/Controllers/ProfileController.php | 5 ++++- app/Http/Controllers/ReportController.php | 5 ++++- app/Http/Controllers/SearchController.php | 5 ++++- .../Transaction/SplitController.php | 2 ++ .../Controllers/TransactionController.php | 3 +++ app/Http/Middleware/IsAdmin.php | 12 ++++------- .../Requests/MassDeleteJournalRequest.php | 11 ++-------- app/Http/Requests/MassEditJournalRequest.php | 11 ++-------- app/Http/Requests/SplitJournalFormRequest.php | 2 ++ ...ExecuteRuleGroupOnExistingTransactions.php | 1 + app/Jobs/MailError.php | 1 + app/Models/Account.php | 5 ++++- app/Models/AccountMeta.php | 5 ++++- app/Models/AccountType.php | 5 ++++- app/Models/Bill.php | 5 ++++- app/Models/Budget.php | 5 ++++- app/Models/BudgetLimit.php | 5 ++++- app/Models/Category.php | 5 ++++- app/Models/Component.php | 5 ++++- app/Models/LimitRepetition.php | 5 ++++- app/Models/PiggyBank.php | 5 ++++- app/Models/PiggyBankEvent.php | 5 ++++- app/Models/PiggyBankRepetition.php | 5 ++++- app/Models/Preference.php | 5 ++++- app/Models/Transaction.php | 5 ++++- app/Models/TransactionCurrency.php | 5 ++++- app/Models/TransactionGroup.php | 5 ++++- app/Models/TransactionJournal.php | 5 ++++- app/Models/TransactionType.php | 5 ++++- app/Providers/AccountServiceProvider.php | 2 ++ app/Providers/AttachmentServiceProvider.php | 2 ++ app/Providers/BillServiceProvider.php | 2 ++ app/Providers/BudgetServiceProvider.php | 2 ++ app/Providers/CategoryServiceProvider.php | 2 ++ app/Providers/CrudServiceProvider.php | 3 +++ app/Providers/ExportJobServiceProvider.php | 2 ++ app/Providers/JournalServiceProvider.php | 2 ++ app/Providers/PiggyBankServiceProvider.php | 2 ++ app/Providers/RuleGroupServiceProvider.php | 2 ++ app/Providers/RuleServiceProvider.php | 3 +++ app/Providers/TagServiceProvider.php | 2 ++ .../Account/AccountRepository.php | 3 +++ app/Support/Binder/JournalList.php | 3 +++ app/Support/Binder/UnfinishedJournal.php | 3 +++ bootstrap/app.php | 2 ++ bootstrap/autoload.php | 3 +++ composer.json | 1 - config/app.php | 1 + config/auth.php | 3 +++ config/broadcasting.php | 3 +++ config/cache.php | 3 +++ config/compile.php | 2 ++ config/csv.php | 3 +++ config/database.php | 3 +++ config/entrust.php | 3 +++ config/filesystems.php | 3 +++ config/firefly.php | 3 +++ config/mail.php | 3 +++ config/queue.php | 2 ++ config/services.php | 2 ++ config/session.php | 3 +++ config/twigbridge.php | 3 +++ config/upgrade.php | 3 +++ config/view.php | 3 +++ database/factories/ModelFactory.php | 3 +++ .../2014_06_27_163032_create_users_table.php | 3 +++ ...6_27_163145_create_account_types_table.php | 3 +++ ...014_06_27_163259_create_accounts_table.php | 3 +++ ...4_06_27_163817_create_components_table.php | 3 +++ ...4_06_27_163818_create_piggybanks_table.php | 3 +++ ...42_create_transaction_currencies_table.php | 3 +++ ..._164512_create_transaction_types_table.php | 3 +++ ...19_create_recurring_transactions_table.php | 3 +++ ...4620_create_transaction_journals_table.php | 3 +++ ...06_27_164836_create_transactions_table.php | 3 +++ ...344_create_component_transaction_table.php | 3 +++ ...te_component_transaction_journal_table.php | 2 ++ ..._07_06_123842_create_preferences_table.php | 3 +++ ...2014_07_09_204843_create_session_table.php | 3 +++ .../2014_07_17_183717_create_limits_table.php | 3 +++ ...07_19_055011_create_limit_repeat_table.php | 3 +++ ..._component_recurring_transaction_table.php | 3 +++ ...919_create_piggybank_repetitions_table.php | 3 +++ ...8_100330_create_piggybank_events_table.php | 3 +++ ...14_08_23_113221_create_reminders_table.php | 3 +++ ...12_100000_create_password_resets_table.php | 2 ++ ...11_10_172053_create_account_meta_table.php | 2 ++ ...135749_create_transaction_groups_table.php | 2 ++ ...action_group_transaction_journal_table.php | 2 ++ .../2014_12_13_190730_changes_for_v321.php | 2 ++ .../2014_12_24_191544_changes_for_v322.php | 2 ++ .../2015_01_18_082406_changes_for_v325.php | 2 ++ .../2015_02_27_210653_changes_for_v332.php | 2 ++ .../2015_03_27_061038_changes_for_v333.php | 2 ++ .../2015_03_29_174140_changes_for_v336.php | 2 ++ .../2015_04_26_054507_changes_for_v3310.php | 2 ++ .../2015_04_28_075215_changes_for_v3310a.php | 2 ++ .../2015_04_28_075317_changes_for_v3310b.php | 2 ++ .../2015_05_22_172026_changes_for_v3409.php | 2 ++ ...2015_05_28_041652_entrust_setup_tables.php | 2 ++ .../2015_06_14_093841_changes_for_v345.php | 2 ++ .../2015_07_03_102450_changes_for_v3462.php | 2 ++ .../2015_07_14_204645_changes_for_v349.php | 2 ++ .../2015_07_17_190438_changes_for_v3410.php | 2 ++ .../2016_01_11_193428_changes_for_v370.php | 2 ++ .../2016_02_04_144117_changes_for_v380.php | 2 ++ .../2016_02_24_172426_create_jobs_table.php | 2 ++ .../2016_04_08_181054_changes_for_v383.php | 2 ++ .../2016_04_25_093451_changes_for_v390.php | 2 ++ database/seeds/AccountTypeSeeder.php | 2 ++ database/seeds/DatabaseSeeder.php | 3 +++ database/seeds/PermissionSeeder.php | 3 +++ database/seeds/TestDataSeeder.php | 1 + database/seeds/TransactionCurrencySeeder.php | 1 + database/seeds/TransactionTypeSeeder.php | 2 ++ public/index.php | 1 + server.php | 1 + tests/BasicTest.php | 1 + tests/TestCase.php | 3 +++ 146 files changed, 394 insertions(+), 83 deletions(-) diff --git a/app/Bootstrap/ConfigureLogging.php b/app/Bootstrap/ConfigureLogging.php index d06e820990..e020c864d9 100644 --- a/app/Bootstrap/ConfigureLogging.php +++ b/app/Bootstrap/ConfigureLogging.php @@ -1,4 +1,6 @@ useFiles($app->storagePath() . '/logs/firefly-iii.log'); - } - /** * @param Application $app * @param Writer $log @@ -40,4 +33,13 @@ class ConfigureLogging extends IlluminateConfigureLogging $app->make('config')->get('app.log_max_files', 5) ); } + + /** + * @param Application $app + * @param Writer $log + */ + protected function configureSingleHandler(Application $app, Writer $log) + { + $log->useFiles($app->storagePath() . '/logs/firefly-iii.log'); + } } diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index c67ddb2787..1c540c4b57 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -1,4 +1,5 @@ getFiles() as $entry) { // is part of this job? $zipFileName = str_replace($this->job->key . '-', '', $entry); - $result = $zip->addFromString($zipFileName, $disk->get($entry)); + $zip->addFromString($zipFileName, $disk->get($entry)); } $zip->close(); diff --git a/app/Handlers/Events/BudgetLimitEventHandler.php b/app/Handlers/Events/BudgetLimitEventHandler.php index 7c5278e1ba..82dfdbc3b7 100644 --- a/app/Handlers/Events/BudgetLimitEventHandler.php +++ b/app/Handlers/Events/BudgetLimitEventHandler.php @@ -1,4 +1,6 @@ [ 'RabobankDescription', diff --git a/config/database.php b/config/database.php index 9467c969e6..40a8db36e2 100644 --- a/config/database.php +++ b/config/database.php @@ -1,4 +1,7 @@ 'chartjs', diff --git a/config/mail.php b/config/mail.php index 0fc18bc022..1027fe9952 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,4 +1,7 @@ [ diff --git a/config/upgrade.php b/config/upgrade.php index 819b830b98..27059b92db 100644 --- a/config/upgrade.php +++ b/config/upgrade.php @@ -1,4 +1,7 @@ define( FireflyIII\User::class, function (Faker\Generator $faker) { diff --git a/database/migrations/2014_06_27_163032_create_users_table.php b/database/migrations/2014_06_27_163032_create_users_table.php index 1bd8824f42..57f44c51cd 100644 --- a/database/migrations/2014_06_27_163032_create_users_table.php +++ b/database/migrations/2014_06_27_163032_create_users_table.php @@ -1,4 +1,7 @@