diff --git a/app/Crud/Split/JournalInterface.php b/app/Crud/Split/JournalInterface.php index 2f0727d8e1..d4a111f14d 100644 --- a/app/Crud/Split/JournalInterface.php +++ b/app/Crud/Split/JournalInterface.php @@ -10,7 +10,6 @@ namespace FireflyIII\Crud\Split; -use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Support\Collection; diff --git a/app/Events/BudgetLimitStored.php b/app/Events/BudgetLimitStored.php index d96e6a8aaf..bcfa5f4083 100644 --- a/app/Events/BudgetLimitStored.php +++ b/app/Events/BudgetLimitStored.php @@ -14,7 +14,6 @@ namespace FireflyIII\Events; use Carbon\Carbon; use FireflyIII\Models\BudgetLimit; use Illuminate\Queue\SerializesModels; -use Log; /** * Class BudgetLimitStored @@ -40,7 +39,6 @@ class BudgetLimitStored extends Event */ public function __construct(BudgetLimit $budgetLimit, Carbon $end) { - Log::debug('Created new BudgetLimitStored.'); // $this->budgetLimit = $budgetLimit; $this->end = $end; diff --git a/app/Events/BudgetLimitUpdated.php b/app/Events/BudgetLimitUpdated.php index ce647baa58..f953b84285 100644 --- a/app/Events/BudgetLimitUpdated.php +++ b/app/Events/BudgetLimitUpdated.php @@ -14,7 +14,6 @@ namespace FireflyIII\Events; use Carbon\Carbon; use FireflyIII\Models\BudgetLimit; use Illuminate\Queue\SerializesModels; -use Log; /** * Class BudgetLimitUpdated @@ -40,7 +39,6 @@ class BudgetLimitUpdated extends Event */ public function __construct(BudgetLimit $budgetLimit, Carbon $end) { - Log::debug('Created new BudgetLimitUpdated.'); // $this->budgetLimit = $budgetLimit; $this->end = $end; diff --git a/app/Events/TransactionJournalStored.php b/app/Events/TransactionJournalStored.php index 82653056a9..d28e1bc5e1 100644 --- a/app/Events/TransactionJournalStored.php +++ b/app/Events/TransactionJournalStored.php @@ -12,7 +12,6 @@ namespace FireflyIII\Events; use FireflyIII\Models\TransactionJournal; use Illuminate\Queue\SerializesModels; -use Log; /** * Class TransactionJournalStored @@ -35,7 +34,6 @@ class TransactionJournalStored extends Event */ public function __construct(TransactionJournal $journal, int $piggyBankId) { - Log::debug('Created new TransactionJournalStored.'); // $this->journal = $journal; $this->piggyBankId = $piggyBankId; diff --git a/app/Events/TransactionJournalUpdated.php b/app/Events/TransactionJournalUpdated.php index e6c11d44c1..ad75a4f410 100644 --- a/app/Events/TransactionJournalUpdated.php +++ b/app/Events/TransactionJournalUpdated.php @@ -5,7 +5,6 @@ namespace FireflyIII\Events; use FireflyIII\Models\TransactionJournal; use Illuminate\Queue\SerializesModels; -use Log; /** * Class TransactionJournalUpdated @@ -26,7 +25,6 @@ class TransactionJournalUpdated extends Event */ public function __construct(TransactionJournal $journal) { - Log::debug('Created new TransactionJournalUpdated'); // $this->journal = $journal; } diff --git a/app/Export/Collector/AttachmentCollector.php b/app/Export/Collector/AttachmentCollector.php index 563d3ff532..a3e99ed962 100644 --- a/app/Export/Collector/AttachmentCollector.php +++ b/app/Export/Collector/AttachmentCollector.php @@ -69,7 +69,6 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface // put the explanation string in a file and attach it as well. $file = $this->job->key . '-Source of all your attachments explained.txt'; $this->exportDisk->put($file, $this->explanationString); - Log::debug('Also put explanation file "' . $file . '" in the zip.'); $this->getFiles()->push($file); return true; @@ -104,14 +103,12 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface private function exportAttachment(Attachment $attachment): bool { $file = $attachment->fileName(); - Log::debug('Original file is at "' . $file . '".'); if ($this->uploadDisk->exists($file)) { try { $decrypted = Crypt::decrypt($this->uploadDisk->get($file)); $exportFile = $this->exportFileName($attachment); $this->exportDisk->put($exportFile, $decrypted); $this->getFiles()->push($exportFile); - Log::debug('Stored file content in new file "' . $exportFile . '", which will be in the final zip file.'); // explain: $this->explain($attachment); @@ -144,8 +141,6 @@ class AttachmentCollector extends BasicCollector implements CollectorInterface { $attachments = $this->repository->get(); - Log::debug('Found ' . $attachments->count() . ' attachments.'); - return $attachments; } } diff --git a/app/Export/Collector/UploadCollector.php b/app/Export/Collector/UploadCollector.php index c1f1062b6e..17728e7924 100644 --- a/app/Export/Collector/UploadCollector.php +++ b/app/Export/Collector/UploadCollector.php @@ -53,7 +53,6 @@ class UploadCollector extends BasicCollector implements CollectorInterface { // grab upload directory. $files = $this->uploadDisk->files(); - Log::debug('Found ' . count($files) . ' files in the upload directory.'); foreach ($files as $entry) { $this->processOldUpload($entry); @@ -86,11 +85,9 @@ class UploadCollector extends BasicCollector implements CollectorInterface { $len = strlen($this->expected); if (substr($entry, 0, $len) === $this->expected) { - Log::debug($entry . ' is part of this users original uploads.'); return true; } - Log::debug($entry . ' is not part of this users original uploads.'); return false; } @@ -113,7 +110,6 @@ class UploadCollector extends BasicCollector implements CollectorInterface // continue with file: $date = $this->getOriginalUploadDate($entry); $file = $this->job->key . '-Old CSV import dated ' . $date . '.csv'; - Log::debug('Will put "' . $file . '" in the zip file.'); $this->exportDisk->put($file, $content); $this->getFiles()->push($file); } diff --git a/app/Export/ConfigurationFile.php b/app/Export/ConfigurationFile.php index e934f48736..c4e819b2b2 100644 --- a/app/Export/ConfigurationFile.php +++ b/app/Export/ConfigurationFile.php @@ -12,7 +12,6 @@ namespace FireflyIII\Export; use FireflyIII\Export\Entry\Entry; use FireflyIII\Models\ExportJob; -use Log; use Storage; /** @@ -58,8 +57,6 @@ class ConfigurationFile $configuration['roles'][] = $types[$field]; } $file = $this->job->key . '-configuration.json'; - Log::debug('Created JSON config file.'); - Log::debug('Will put "' . $file . '" in the ZIP file.'); $this->exportDisk->put($file, json_encode($configuration, JSON_PRETTY_PRINT)); return $file; diff --git a/app/Export/Processor.php b/app/Export/Processor.php index 3d3e3f2c48..336cb61a77 100644 --- a/app/Export/Processor.php +++ b/app/Export/Processor.php @@ -19,7 +19,6 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Support\Collection; -use Log; use Storage; use ZipArchive; @@ -97,14 +96,6 @@ class Processor $repository = app(JournalRepositoryInterface::class); $this->journals = $repository->getJournalsInRange($this->accounts, $this->settings['startDate'], $this->settings['endDate']); - Log::debug( - 'Collected ' . - $this->journals->count() . ' journals (between ' . - $this->settings['startDate']->format('Y-m-d') . ' and ' . - $this->settings['endDate']->format('Y-m-d') - . ').' - ); - return true; } @@ -133,7 +124,6 @@ class Processor $this->exportEntries->push(Entry::fromJournal($journal)); $count++; } - Log::debug('Converted ' . $count . ' journals to "Entry" objects.'); return true; } @@ -158,7 +148,6 @@ class Processor $zip = new ZipArchive; $file = $this->job->key . '.zip'; $fullPath = storage_path('export') . '/' . $file; - Log::debug('Will create zip file at ' . $fullPath); if ($zip->open($fullPath, ZipArchive::CREATE) !== true) { throw new FireflyException('Cannot store zip file.'); @@ -170,7 +159,6 @@ class Processor $zipFileName = str_replace($this->job->key . '-', '', $entry); $result = $zip->addFromString($zipFileName, $disk->get($entry)); if (!$result) { - Log::error('Could not add "' . $entry . '" into zip file as "' . $zipFileName . '".'); } } @@ -178,7 +166,6 @@ class Processor // delete the files: $this->deleteFiles($disk); - Log::debug('Done!'); return true; } @@ -190,11 +177,9 @@ class Processor { $exporterClass = config('firefly.export_formats.' . $this->exportFormat); $exporter = app($exporterClass, [$this->job]); - Log::debug('Going to export ' . $this->exportEntries->count() . ' export entries into ' . $this->exportFormat . ' format.'); $exporter->setEntries($this->exportEntries); $exporter->run(); $this->files->push($exporter->getFileName()); - Log::debug('Added "' . $exporter->getFileName() . '" to the list of files to include in the zip.'); return true; } @@ -212,9 +197,7 @@ class Processor */ private function deleteFiles(FilesystemAdapter $disk) { - Log::debug('Class of $disk: ' . get_class($disk)); foreach ($this->getFiles() as $file) { - Log::debug('Will now delete file "' . $file . '".'); $disk->delete($file); } } diff --git a/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php b/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php index 04b0851f23..5ca40c059a 100644 --- a/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php +++ b/app/Generator/Chart/Account/ChartJsAccountChartGenerator.php @@ -5,7 +5,6 @@ namespace FireflyIII\Generator\Chart\Account; use Carbon\Carbon; use FireflyIII\Models\Account; use Illuminate\Support\Collection; -use Steam; /** * Class ChartJsAccountChartGenerator @@ -83,7 +82,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface */ public function single(Account $account, array $labels, array $dataSet): array { - $data = [ + $data = [ 'count' => 1, 'labels' => $labels, 'datasets' => [ @@ -93,6 +92,7 @@ class ChartJsAccountChartGenerator implements AccountChartGeneratorInterface ], ], ]; + return $data; } diff --git a/app/Handlers/Events/AttachUserRole.php b/app/Handlers/Events/AttachUserRole.php index 86a0d5d102..6d969bbee7 100644 --- a/app/Handlers/Events/AttachUserRole.php +++ b/app/Handlers/Events/AttachUserRole.php @@ -13,7 +13,6 @@ namespace FireflyIII\Handlers\Events; use FireflyIII\Events\UserRegistration; use FireflyIII\Repositories\User\UserRepositoryInterface; -use Log; /** * Class AttachUserRole @@ -38,13 +37,11 @@ class AttachUserRole */ public function handle(UserRegistration $event) { - Log::debug('Trigger attachuserrole'); /** @var UserRepositoryInterface $repository */ $repository = app(UserRepositoryInterface::class); // first user ever? if ($repository->count() == 1) { - Log::debug('Will attach role.'); $repository->attachRole($event->user, 'owner'); } } diff --git a/app/Handlers/Events/FireRulesForStore.php b/app/Handlers/Events/FireRulesForStore.php index 05ab7006d8..dc4fcd9c7e 100644 --- a/app/Handlers/Events/FireRulesForStore.php +++ b/app/Handlers/Events/FireRulesForStore.php @@ -17,7 +17,6 @@ use FireflyIII\Models\RuleGroup; use FireflyIII\Rules\Processor; use FireflyIII\User; use Illuminate\Support\Facades\Auth; -use Log; /** * Class FireRulesForStore @@ -36,7 +35,6 @@ class FireRulesForStore */ public function handle(TransactionJournalStored $event): bool { - Log::debug('Now running FireRulesForStore because TransactionJournalStored fired.'); // get all the user's rule groups, with the rules, order by 'order'. /** @var User $user */ $user = Auth::user(); @@ -44,7 +42,6 @@ class FireRulesForStore // /** @var RuleGroup $group */ foreach ($groups as $group) { - Log::debug('Now processing group "' . $group->title . '".'); $rules = $group->rules() ->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id') ->where('rule_triggers.trigger_type', 'user_action') @@ -54,7 +51,6 @@ class FireRulesForStore /** @var Rule $rule */ foreach ($rules as $rule) { - Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')'); $processor = Processor::make($rule); $processor->handleTransactionJournal($event->journal); diff --git a/app/Handlers/Events/FireRulesForUpdate.php b/app/Handlers/Events/FireRulesForUpdate.php index ae1e187d67..a6b2fabdf2 100644 --- a/app/Handlers/Events/FireRulesForUpdate.php +++ b/app/Handlers/Events/FireRulesForUpdate.php @@ -16,7 +16,6 @@ use FireflyIII\Models\Rule; use FireflyIII\Models\RuleGroup; use FireflyIII\Rules\Processor; use FireflyIII\User; -use Log; /** * Class FireRulesForUpdate @@ -34,7 +33,6 @@ class FireRulesForUpdate */ public function handle(TransactionJournalUpdated $event): bool { - Log::debug('Now running FireRulesForUpdate because TransactionJournalUpdated fired.'); // get all the user's rule groups, with the rules, order by 'order'. /** @var User $user */ $user = Auth::user(); @@ -42,7 +40,6 @@ class FireRulesForUpdate // /** @var RuleGroup $group */ foreach ($groups as $group) { - Log::debug('Now processing group "' . $group->title . '".'); $rules = $group->rules() ->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id') ->where('rule_triggers.trigger_type', 'user_action') @@ -51,9 +48,6 @@ class FireRulesForUpdate ->get(['rules.*']); /** @var Rule $rule */ foreach ($rules as $rule) { - Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')'); - - Log::debug('Now handling rule #' . $rule->id . ' (' . $rule->title . ')'); $processor = Processor::make($rule); $processor->handleTransactionJournal($event->journal); diff --git a/app/Handlers/Events/UserConfirmation.php b/app/Handlers/Events/UserConfirmation.php index 7415ffeedb..418b01b98d 100644 --- a/app/Handlers/Events/UserConfirmation.php +++ b/app/Handlers/Events/UserConfirmation.php @@ -73,10 +73,8 @@ class UserConfirmation */ private function doConfirm(User $user, string $ipAddress) { - Log::debug('Trigger UserConfirmation::doConfirm'); $confirmAccount = env('MUST_CONFIRM_ACCOUNT', false); if ($confirmAccount === false) { - Log::debug('Confirm account is false, so user will be auto-confirmed.'); Preferences::setForUser($user, 'user_confirmed', true); Preferences::setForUser($user, 'user_confirmed_last_mail', 0); Preferences::mark(); @@ -90,7 +88,6 @@ class UserConfirmation Preferences::setForUser($user, 'user_confirmed_last_mail', time()); Preferences::setForUser($user, 'user_confirmed_code', $code); try { - Log::debug('Now in try block for user email message thing to ' . $email . '.'); Mail::send( ['emails.confirm-account-html', 'emails.confirm-account'], ['route' => $route, 'ip' => $ipAddress], function (Message $message) use ($email) { @@ -100,10 +97,8 @@ class UserConfirmation } catch (Swift_TransportException $e) { Log::error($e->getMessage()); } catch (Exception $e) { - Log::debug('Caught general exception.'); Log::error($e->getMessage()); } - Log::debug('Finished mail handling for activation.'); return; } diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php index 3433584545..7db68a1434 100644 --- a/app/Helpers/Attachments/AttachmentHelper.php +++ b/app/Helpers/Attachments/AttachmentHelper.php @@ -251,6 +251,7 @@ class AttachmentHelper implements AttachmentHelperInterface $this->processFile($entry, $model); } } + return true; } diff --git a/app/Helpers/Csv/Converter/AssetAccountIban.php b/app/Helpers/Csv/Converter/AssetAccountIban.php index c75bfc2c1f..88f9c88217 100644 --- a/app/Helpers/Csv/Converter/AssetAccountIban.php +++ b/app/Helpers/Csv/Converter/AssetAccountIban.php @@ -6,7 +6,6 @@ use Auth; use Carbon\Carbon; use FireflyIII\Models\Account; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use Log; /** * Class AssetAccountIban @@ -27,7 +26,6 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface // is mapped? Then it's easy! if (isset($this->mapped[$this->index][$this->value])) { $account = $repository->find(intval($this->mapped[$this->index][$this->value])); - Log::debug('Found mapped account for value "' . $this->value . '". It is account #' . $account->id); return $account; } @@ -54,13 +52,11 @@ class AssetAccountIban extends BasicConverter implements ConverterInterface /** @var Account $entry */ foreach ($set as $entry) { if ($entry->iban == $this->value) { - Log::debug('Found an account with the same IBAN ("' . $this->value . '"). It is account #' . $entry->id); return $entry; } } - Log::debug('Found no account with the same IBAN ("' . $this->value . '"), so will create a new one.'); // create it if doesn't exist. $accountData = [ diff --git a/app/Helpers/Csv/Converter/CurrencyCode.php b/app/Helpers/Csv/Converter/CurrencyCode.php index f77aadc8cb..2c6a3f4d64 100644 --- a/app/Helpers/Csv/Converter/CurrencyCode.php +++ b/app/Helpers/Csv/Converter/CurrencyCode.php @@ -26,7 +26,7 @@ class CurrencyCode extends BasicConverter implements ConverterInterface return $currency; } - + $currency = $repository->findByCode($this->value); diff --git a/app/Helpers/Csv/Converter/CurrencyName.php b/app/Helpers/Csv/Converter/CurrencyName.php index e517df855b..7c7178bad2 100644 --- a/app/Helpers/Csv/Converter/CurrencyName.php +++ b/app/Helpers/Csv/Converter/CurrencyName.php @@ -27,7 +27,7 @@ class CurrencyName extends BasicConverter implements ConverterInterface return $currency; } $currency = $repository->findByName($this->value); - + return $currency; } diff --git a/app/Helpers/Csv/Converter/CurrencySymbol.php b/app/Helpers/Csv/Converter/CurrencySymbol.php index 5235fbc889..c5c2d94060 100644 --- a/app/Helpers/Csv/Converter/CurrencySymbol.php +++ b/app/Helpers/Csv/Converter/CurrencySymbol.php @@ -26,7 +26,7 @@ class CurrencySymbol extends BasicConverter implements ConverterInterface return $currency; } - + $currency = $repository->findBySymbol($this->value); diff --git a/app/Helpers/Csv/Importer.php b/app/Helpers/Csv/Importer.php index 82d05948f6..3a619ffc36 100644 --- a/app/Helpers/Csv/Importer.php +++ b/app/Helpers/Csv/Importer.php @@ -108,7 +108,6 @@ class Importer foreach ($this->data->getReader() as $index => $row) { if ($this->parseRow($index)) { - Log::debug('--- Importing row ' . $index); $this->rows++; $result = $this->importRow($row); if (!($result instanceof TransactionJournal)) { @@ -119,7 +118,6 @@ class Importer $this->journals->push($result); event(new TransactionJournalStored($result, 0)); } - Log::debug('---'); } } } @@ -221,7 +219,6 @@ class Importer $class = config('csv.roles.' . $role . '.converter'); $field = config('csv.roles.' . $role . '.field'); - Log::debug('Column #' . $index . ' (role: ' . $role . ') : converter ' . $class . ' stores its data into field ' . $field . ':'); // here would be the place where preprocessors would fire. @@ -275,7 +272,6 @@ class Importer if ($specifix->getProcessorType() == SpecifixInterface::POST_PROCESSOR) { $specifix->setData($this->importData); $specifix->setRow($this->importRow); - Log::debug('Now post-process specifix named ' . $className . ':'); $this->importData = $specifix->fix(); } } @@ -287,7 +283,6 @@ class Importer $postProcessor = app('FireflyIII\Helpers\Csv\PostProcessing\\' . $className); $array = $this->importData ?? []; $postProcessor->setData($array); - Log::debug('Now post-process processor named ' . $className . ':'); $this->importData = $postProcessor->process(); } diff --git a/app/Helpers/Csv/PostProcessing/AssetAccount.php b/app/Helpers/Csv/PostProcessing/AssetAccount.php index 2d3195b7fd..bc028e721e 100644 --- a/app/Helpers/Csv/PostProcessing/AssetAccount.php +++ b/app/Helpers/Csv/PostProcessing/AssetAccount.php @@ -7,7 +7,6 @@ use Carbon\Carbon; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; -use Log; use Validator; /** @@ -207,7 +206,6 @@ class AssetAccount implements PostProcessorInterface $accounts = Auth::user()->accounts()->where('account_type_id', $accountType->id)->get(); foreach ($accounts as $entry) { if ($entry->name == $this->data['asset-account-name']) { - Log::debug('Found an asset account with this name (#' . $entry->id . ': ******)'); return $entry; } @@ -239,7 +237,6 @@ class AssetAccount implements PostProcessorInterface foreach ($accounts as $entry) { $metaFieldValue = $entry->getMeta('accountNumber'); if ($metaFieldValue === $accountNumber && $metaFieldValue !== '') { - Log::debug('Found an asset account with this account number (#' . $entry->id . ')'); return $entry; } diff --git a/app/Helpers/Csv/PostProcessing/OpposingAccount.php b/app/Helpers/Csv/PostProcessing/OpposingAccount.php index c0add69540..5980644447 100644 --- a/app/Helpers/Csv/PostProcessing/OpposingAccount.php +++ b/app/Helpers/Csv/PostProcessing/OpposingAccount.php @@ -5,7 +5,6 @@ namespace FireflyIII\Helpers\Csv\PostProcessing; use Auth; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; -use Log; use Validator; /** @@ -65,7 +64,6 @@ class OpposingAccount implements PostProcessorInterface $validator = Validator::make($check, $rules); if (is_string($iban) && strlen($iban) > 0 && !$validator->fails()) { - Log::debug('OpposingAccountPostProcession: opposing-account-iban is a string (******).'); $this->data['opposing-account-object'] = $this->parseIbanString(); return $this->data; @@ -80,13 +78,11 @@ class OpposingAccount implements PostProcessorInterface protected function checkIdNameObject() { if ($this->data['opposing-account-id'] instanceof Account) { // first priority. try to find the account based on ID, if any - Log::debug('OpposingAccountPostProcession: opposing-account-id is an Account.'); $this->data['opposing-account-object'] = $this->data['opposing-account-id']; return $this->data; } if ($this->data['opposing-account-iban'] instanceof Account) { // second: try to find the account based on IBAN, if any. - Log::debug('OpposingAccountPostProcession: opposing-account-iban is an Account.'); $this->data['opposing-account-object'] = $this->data['opposing-account-iban']; return $this->data; @@ -101,7 +97,6 @@ class OpposingAccount implements PostProcessorInterface protected function checkNameString() { if ($this->data['opposing-account-name'] instanceof Account) { // third: try to find account based on name, if any. - Log::debug('OpposingAccountPostProcession: opposing-account-name is an Account.'); $this->data['opposing-account-object'] = $this->data['opposing-account-name']; return $this->data; @@ -135,7 +130,6 @@ class OpposingAccount implements PostProcessorInterface 'active' => true, ] ); - Log::debug('OpposingAccountPostProcession: created a new account.'); return $account; } @@ -169,7 +163,6 @@ class OpposingAccount implements PostProcessorInterface $accounts = Auth::user()->accounts()->get(); foreach ($accounts as $entry) { if ($entry->iban == $this->data['opposing-account-iban']) { - Log::debug('OpposingAccountPostProcession: opposing-account-iban matches an Account.'); return $entry; } @@ -189,7 +182,6 @@ class OpposingAccount implements PostProcessorInterface $accounts = Auth::user()->accounts()->where('account_type_id', $accountType->id)->get(); foreach ($accounts as $entry) { if ($entry->name == $this->data['opposing-account-name']) { - Log::debug('Found an account with this name (#' . $entry->id . ': ******)'); return $entry; } diff --git a/app/Helpers/Csv/Specifix/AbnAmroDescription.php b/app/Helpers/Csv/Specifix/AbnAmroDescription.php index 7978ab1465..d77cef93b8 100644 --- a/app/Helpers/Csv/Specifix/AbnAmroDescription.php +++ b/app/Helpers/Csv/Specifix/AbnAmroDescription.php @@ -2,8 +2,6 @@ declare(strict_types = 1); namespace FireflyIII\Helpers\Csv\Specifix; -use Log; - /** * Parses the description from txt files for ABN AMRO bank accounts. * @@ -71,7 +69,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface { // See if the current description is formatted in ABN AMRO format if (preg_match('/ABN AMRO.{24} (.*)/', $this->data['description'], $matches)) { - Log::debug('AbnAmroSpecifix: Description is structured as costs from ABN AMRO itself.'); $this->data['opposing-account-name'] = 'ABN AMRO'; $this->data['description'] = $matches[1]; @@ -91,7 +88,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface { // See if the current description is formatted in GEA/BEA format if (preg_match('/([BG]EA) +(NR:[a-zA-Z:0-9]+) +([0-9.\/]+) +([^,]*)/', $this->data['description'], $matches)) { - Log::debug('AbnAmroSpecifix: Description is structured as GEA or BEA format.'); // description and opposing account will be the same. $this->data['opposing-account-name'] = $matches[4]; @@ -116,7 +112,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface { // See if the current description is formatted as a SEPA plain description if (preg_match('/^SEPA(.{28})/', $this->data['description'], $matches)) { - Log::debug('AbnAmroSpecifix: Description is structured as SEPA plain description.'); $type = $matches[1]; $reference = ''; @@ -130,7 +125,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface foreach ($matches as $match) { $key = $match[1]; $value = trim($match[2]); - Log::debug('SEPA: ' . $key . ' - ' . $value); switch (strtoupper($key)) { case 'OMSCHRIJVING': $newDescription = $value; @@ -173,7 +167,6 @@ class AbnAmroDescription extends Specifix implements SpecifixInterface { // See if the current description is formatted in TRTP format if (preg_match_all('!\/([A-Z]{3,4})\/([^/]*)!', $this->data['description'], $matches, PREG_SET_ORDER)) { - Log::debug('AbnAmroSpecifix: Description is structured as TRTP format.'); $type = ''; $name = ''; diff --git a/app/Helpers/Csv/Specifix/RabobankDescription.php b/app/Helpers/Csv/Specifix/RabobankDescription.php index 19e018b5ec..d424a35e9f 100644 --- a/app/Helpers/Csv/Specifix/RabobankDescription.php +++ b/app/Helpers/Csv/Specifix/RabobankDescription.php @@ -2,8 +2,6 @@ declare(strict_types = 1); namespace FireflyIII\Helpers\Csv\Specifix; -use Log; - /** * Class RabobankDescription * @@ -58,14 +56,10 @@ class RabobankDescription extends Specifix implements SpecifixInterface */ protected function rabobankFixEmptyOpposing() { - Log::debug('RaboSpecifix: Opposing account name is "******".'); if (is_string($this->data['opposing-account-name']) && strlen($this->data['opposing-account-name']) == 0) { - Log::debug('RaboSpecifix: opp-name is zero length, changed to: "******"'); $this->data['opposing-account-name'] = $this->row[10]; - Log::debug('Description was: "******".'); $this->data['description'] = trim(str_replace($this->row[10], '', $this->data['description'])); - Log::debug('Description is now: "******".'); } } diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 25fa36fe99..b801df6cfa 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -4,7 +4,6 @@ namespace FireflyIII\Helpers\Help; use Cache; use League\CommonMark\CommonMarkConverter; -use Log; use Requests; use Route; @@ -44,11 +43,9 @@ class Help implements HelpInterface 'title' => $title, ]; - Log::debug('Going to get from Github: ' . $uri); $result = Requests::get($uri); - Log::debug('Status code was ' . $result->status_code . '.'); if ($result->status_code === 200) { $content['text'] = $result->body; @@ -56,7 +53,6 @@ class Help implements HelpInterface if (strlen(trim($content['text'])) == 0) { - Log::debug('No actual help text for this route (even though a page was found).'); $content['text'] = '

' . strval(trans('firefly.route_has_no_help')) . '

'; } $converter = new CommonMarkConverter(); diff --git a/app/Helpers/Report/AccountReportHelper.php b/app/Helpers/Report/AccountReportHelper.php index 941058913c..a521f0f997 100644 --- a/app/Helpers/Report/AccountReportHelper.php +++ b/app/Helpers/Report/AccountReportHelper.php @@ -64,7 +64,7 @@ class AccountReportHelper implements AccountReportHelperInterface return $account->id == $entry->id; } ); - + if (!is_null($currentEnd->first())) { $account->endBalance = $currentEnd->first()->balance; } diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index fe2cc38ea5..7456f22980 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -17,18 +17,15 @@ use FireflyIII\Helpers\Collection\Balance; use FireflyIII\Helpers\Collection\BalanceEntry; use FireflyIII\Helpers\Collection\BalanceHeader; use FireflyIII\Helpers\Collection\BalanceLine; -use FireflyIII\Models\Account; use FireflyIII\Models\Budget; use FireflyIII\Models\Budget as BudgetModel; use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\Tag; -use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; -use Log; /** * Class BalanceReportHelper @@ -67,19 +64,16 @@ class BalanceReportHelper implements BalanceReportHelperInterface public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance { $balance = new Balance; - Log::debug('Build new report.'); // build a balance header: $header = new BalanceHeader; $limitRepetitions = $this->budgetRepository->getAllBudgetLimitRepetitions($start, $end); foreach ($accounts as $account) { $header->addAccount($account); - Log::debug('Add account #' . $account->id . ' to header.'); } /** @var LimitRepetition $repetition */ foreach ($limitRepetitions as $repetition) { $budget = $this->budgetRepository->find($repetition->budget_id); - Log::debug('Create and add balance line for budget #' . $budget->id); $balance->addBalanceLine($this->createBalanceLine($budget, $repetition, $accounts)); } $noBudgetLine = $this->createNoBudgetLine($accounts, $start, $end); @@ -155,7 +149,6 @@ class BalanceReportHelper implements BalanceReportHelperInterface */ private function createBalanceLine(BudgetModel $budget, LimitRepetition $repetition, Collection $accounts): BalanceLine { - Log::debug('Create line for budget #' . $budget->id . ' and repetition #' . $repetition->id); $line = new BalanceLine; $budget->amount = $repetition->amount; $line->setBudget($budget); diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index e529d82d30..8b02c35307 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -19,7 +19,6 @@ use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use Illuminate\Support\Collection; -use Log; /** * Class BudgetReportHelper @@ -45,12 +44,10 @@ class BudgetReportHelper implements BudgetReportHelperInterface /** @var Budget $budget */ foreach ($set as $budget) { - Log::debug('Now at budget #' . $budget->id . ' (' . $budget->name . ')'); $repetitions = $budget->limitrepetitions()->before($end)->after($start)->get(); // no repetition(s) for this budget: if ($repetitions->count() == 0) { - Log::debug('Found zero repetitions.'); // spent for budget in time range: $spent = $repository->spentInPeriod(new Collection([$budget]), $accounts, $start, $end); @@ -63,7 +60,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface } continue; } - Log::debug('Found ' . $repetitions->count() . ' repetitions.'); // one or more repetitions for budget: /** @var LimitRepetition $repetition */ foreach ($repetitions as $repetition) { @@ -72,7 +68,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface $budgetLine->setBudget($budget); $budgetLine->setRepetition($repetition); $expenses = $repository->spentInPeriod(new Collection([$budget]), $accounts, $repetition->startdate, $repetition->enddate); - Log::debug('Spent in p. [' . $repetition->startdate->format('Y-m-d') . '] to [' . $repetition->enddate->format('Y-m-d') . '] is ' . $expenses); $left = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? bcadd($repetition->amount, $expenses) : '0'; $spent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? $expenses : '0'; diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 2c19d9a440..0ee7b29337 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -13,7 +13,6 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Input; -use Log; use Navigation; use Preferences; use Response; @@ -193,7 +192,6 @@ class BudgetController extends Controller /** @var LimitRepetition $repetition */ foreach ($allRepetitions as $repetition) { if ($repetition->budget_id == $budget->id) { - Log::debug('Repetition #' . $repetition->id . ' with budget #' . $repetition->budget_id . ' (current = ' . $budget->id . ')'); if ($repetition->budgetLimit->repeat_freq == $repeatFreq && $repetition->startdate->format('Y-m-d') == $startAsString && $repetition->enddate->format('Y-m-d') == $endAsString diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index 8dc927cb48..04a933280c 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -53,7 +53,7 @@ class AccountController extends Controller $cache->addProperty('expenseAccounts'); $cache->addProperty('accounts'); if ($cache->has()) { - return Response::json($cache->get()); + return Response::json($cache->get()); } $accounts = $repository->getAccountsByType(['Expense account', 'Beneficiary account']); @@ -105,7 +105,7 @@ class AccountController extends Controller $cache->addProperty('frontpage'); $cache->addProperty('accounts'); if ($cache->has()) { - return Response::json($cache->get()); + return Response::json($cache->get()); } $frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()); @@ -151,7 +151,7 @@ class AccountController extends Controller $cache->addProperty('default'); $cache->addProperty($accounts); if ($cache->has()) { - return Response::json($cache->get()); + return Response::json($cache->get()); } foreach ($accounts as $account) { @@ -196,7 +196,7 @@ class AccountController extends Controller $cache->addProperty('single'); $cache->addProperty($account->id); if ($cache->has()) { - return Response::json($cache->get()); + return Response::json($cache->get()); } $format = (string)trans('config.month_and_day'); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index da4a29fd9a..7dfcef1aa6 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -12,7 +12,6 @@ use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; use Navigation; use Preferences; use Response; @@ -67,7 +66,6 @@ class BudgetController extends Controller $budgetCollection = new Collection([$budget]); $last = Navigation::endOfX($last, $range, $final); // not to overshoot. $entries = new Collection; - Log::debug('---- now at chart'); while ($first < $last) { // periodspecific dates: @@ -115,7 +113,6 @@ class BudgetController extends Controller $entries = new Collection; $amount = $repetition->amount; $budgetCollection = new Collection([$budget]); - Log::debug('amount starts ' . $amount); while ($start <= $end) { $spent = $repository->spentInPeriod($budgetCollection, new Collection, $start, $start); $amount = bcadd($amount, $spent); diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 872323b6cb..a249ee1459 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -11,7 +11,6 @@ use FireflyIII\Models\Category; use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Log; use Navigation; use Preferences; use Response; @@ -69,10 +68,9 @@ class CategoryController extends Controller while ($start <= $end) { $currentEnd = Navigation::endOfPeriod($start, $range); - Log::debug('Searching for expenses from ' . $start . ' to ' . $currentEnd); - $spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $currentEnd); - $earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $currentEnd); - $date = Navigation::periodShow($start, $range); + $spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $currentEnd); + $earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $currentEnd); + $date = Navigation::periodShow($start, $range); $entries->push([clone $start, $date, $spent, $earned]); $start = Navigation::addPeriod($start, $range, 0); } @@ -126,7 +124,6 @@ class CategoryController extends Controller /** @var Category $category */ foreach ($categories as $category) { $spent = $repository->spentInPeriod(new Collection([$category]), new Collection, $start, $end); - Log::debug('Spent for ' . $category->name . ' is ' . $spent . ' (' . bccomp($spent, '0') . ')'); if (bccomp($spent, '0') === -1) { $category->spent = $spent; $set->push($category); @@ -255,17 +252,13 @@ class CategoryController extends Controller $cache->addProperty('specific-period'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $entries = new Collection; - Log::debug('Start is ' . $start . ' en end is ' . $end); while ($start <= $end) { - Log::debug('Now at ' . $start); - $spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $start); - Log::debug('spent: ' . $spent); + $spent = $repository->spentInPeriod($categoryCollection, new Collection, $start, $start); $earned = $repository->earnedInPeriod($categoryCollection, new Collection, $start, $start); - Log::debug('earned: ' . $earned); - $date = Navigation::periodShow($start, '1D'); + $date = Navigation::periodShow($start, '1D'); $entries->push([clone $start, $date, $spent, $earned]); $start->addDay(); } diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index bbbf50eb58..6daafd877b 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -100,7 +100,7 @@ class ReportController extends Controller $cache->addProperty($accounts); $cache->addProperty($end); if ($cache->has()) { - return Response::json($cache->get()); + return Response::json($cache->get()); } // always per month. diff --git a/app/Http/Controllers/CsvController.php b/app/Http/Controllers/CsvController.php index f26602564e..9a3c543780 100644 --- a/app/Http/Controllers/CsvController.php +++ b/app/Http/Controllers/CsvController.php @@ -311,12 +311,10 @@ class CsvController extends Controller return redirect(route('csv.index')); } - Log::debug('Created importer'); /** @var Importer $importer */ $importer = app(Importer::class); $importer->setData($this->data); $importer->run(); - Log::debug('Done importing!'); $rows = $importer->getRows(); $errors = $importer->getErrors(); diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index 262c2af1de..56e22bad77 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -19,7 +19,6 @@ use FireflyIII\Http\Requests\ExportFormRequest; use FireflyIII\Models\ExportJob; use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; use FireflyIII\Repositories\ExportJob\ExportJobRepositoryInterface as EJRI; -use Log; use Preferences; use Response; use Storage; @@ -62,7 +61,6 @@ class ExportController extends Controller $job->change('export_downloaded'); - Log::debug('Will send user file "' . $file . '".'); return response($disk->get($file), 200) ->header('Content-Description', 'File Transfer') diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index 9f7b58ff78..d1d47e5c74 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -49,7 +49,6 @@ class HelpController extends Controller return Response::json($content); } - Log::debug('Will get help from Github for language "' . $language . '" and route "' . $route . '".'); $content = $help->getFromGithub($language, $route); $help->putInCache($route, $language, $content); diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index 9aa8ed4f0b..6cfa23efd5 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -226,7 +226,7 @@ class ReportController extends Controller } ); - $view = view('popup.report.income-entry', compact('journals', 'account'))->render(); + $view = view('popup.report.income-entry', compact('journals', 'account'))->render(); return $view; } diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index da40deee89..2f2d480b73 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -12,7 +12,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface as ARI; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use Illuminate\Support\Collection; -use Log; use Preferences; use Session; use Steam; @@ -100,7 +99,6 @@ class ReportController extends Controller // lower threshold if ($start < session('first')) { - Log::debug('Start is ' . $start . ' but session first is ' . session('first')); $start = session('first'); } @@ -167,7 +165,7 @@ class ReportController extends Controller * Is there even activity on this account between the requested dates? */ if ($start->between($first, $last) || $end->between($first, $last)) { - $exists = true; + $exists = true; $journals = $repos->journalsInPeriod($accounts, [], $start, $end); } diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index 896717c6e5..e5311019ab 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -19,7 +19,6 @@ use FireflyIII\Http\Requests\SplitJournalFormRequest; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use Illuminate\Http\Request; -use Log; use Preferences; use Session; use Steam; @@ -198,7 +197,6 @@ class SplitController extends Controller private function arrayFromJournal(Request $request, TransactionJournal $journal): array { if (Session::has('_old_input')) { - Log::debug('Old input: ', session('_old_input')); } $sourceAccounts = TransactionJournal::sourceAccountList($journal); $destinationAccounts = TransactionJournal::destinationAccountList($journal); diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 515293da71..e373a13be6 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -45,7 +45,6 @@ class MailError extends Job implements ShouldQueue $this->ipAddress = $ipAddress; $this->exception = $exceptionData; - Log::debug('In mail job constructor for error handler.'); $debug = $exceptionData; unset($debug['stackTrace']); Log::error('Exception is: ' . json_encode($debug)); @@ -58,7 +57,6 @@ class MailError extends Job implements ShouldQueue */ public function handle() { - Log::debug('Start of handle()'); if ($this->attempts() < 3) { // mail? try { @@ -82,7 +80,6 @@ class MailError extends Job implements ShouldQueue } catch (ErrorException $e) { Log::error('ErrorException ' . $e->getMessage()); } - Log::debug('Successfully handled error.'); } } } diff --git a/app/Models/Budget.php b/app/Models/Budget.php index 0d7205d9ae..4e80d197f1 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -10,21 +10,21 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\Budget * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property integer $user_id - * @property boolean $active - * @property boolean $encrypted - * @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits - * @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals - * @property-read \FireflyIII\User $user - * @property string $dateFormatted - * @property string $budgeted - * @property float $amount - * @property \Carbon\Carbon $date + * @property integer $id + * @property \Carbon\Carbon $created_at + * @property \Carbon\Carbon $updated_at + * @property \Carbon\Carbon $deleted_at + * @property string $name + * @property integer $user_id + * @property boolean $active + * @property boolean $encrypted + * @property-read \Illuminate\Database\Eloquent\Collection|BudgetLimit[] $budgetlimits + * @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals + * @property-read \FireflyIII\User $user + * @property string $dateFormatted + * @property string $budgeted + * @property float $amount + * @property \Carbon\Carbon $date * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereId($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereCreatedAt($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Budget whereUpdatedAt($value) diff --git a/app/Models/Category.php b/app/Models/Category.php index cc7a881a47..a69cfa9f73 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -10,19 +10,19 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * FireflyIII\Models\Category * - * @property integer $id - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Carbon\Carbon $deleted_at - * @property string $name - * @property integer $user_id - * @property boolean $encrypted - * @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals - * @property-read \FireflyIII\User $user - * @property string $dateFormatted - * @property string $spent - * @property \Carbon\Carbon $lastActivity - * @property string $type + * @property integer $id + * @property \Carbon\Carbon $created_at + * @property \Carbon\Carbon $updated_at + * @property \Carbon\Carbon $deleted_at + * @property string $name + * @property integer $user_id + * @property boolean $encrypted + * @property-read \Illuminate\Database\Eloquent\Collection|TransactionJournal[] $transactionjournals + * @property-read \FireflyIII\User $user + * @property string $dateFormatted + * @property string $spent + * @property \Carbon\Carbon $lastActivity + * @property string $type * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereId($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereCreatedAt($value) * @method static \Illuminate\Database\Query\Builder|\FireflyIII\Models\Category whereUpdatedAt($value) @@ -117,6 +117,7 @@ class Category extends Model { return $this->belongsToMany('FireflyIII\Models\TransactionJournal', 'category_transaction_journal', 'category_id'); } + /** * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ diff --git a/app/Models/ExportJob.php b/app/Models/ExportJob.php index e571bbfea0..1145d8e43a 100644 --- a/app/Models/ExportJob.php +++ b/app/Models/ExportJob.php @@ -12,7 +12,6 @@ namespace FireflyIII\Models; use Auth; use Illuminate\Database\Eloquent\Model; -use Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -58,7 +57,6 @@ class ExportJob extends Model */ public function change($status) { - Log::debug('Job ' . $this->key . ' to status "' . $status . '".'); $this->status = $status; $this->save(); } diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index 21b841193d..396346a03c 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -122,7 +122,7 @@ class Transaction extends Model /** * * @param Builder $query - * @param Carbon $date + * @param Carbon $date * */ public function scopeBefore(Builder $query, Carbon $date) diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index 92a5e45e59..e0fbff2814 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -7,7 +7,6 @@ use FireflyIII\Support\Models\TransactionJournalSupport; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\SoftDeletes; -use Illuminate\Database\Query\JoinClause; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Watson\Validating\ValidatingTrait; @@ -360,7 +359,7 @@ class TransactionJournal extends TransactionJournalSupport $query->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id'); } $query->whereIn('transaction_types.type', $types); - } + } /** * diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index f0f7c63c12..3124a4a7f4 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -4,17 +4,11 @@ declare(strict_types = 1); namespace FireflyIII\Providers; use FireflyIII\Models\Account; -use FireflyIII\Models\BudgetLimit; -use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\PiggyBankRepetition; use FireflyIII\Models\Transaction; -use FireflyIII\Models\TransactionJournal; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; -use Illuminate\Database\QueryException; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Log; -use Navigation; /** * Class EventServiceProvider diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.php index 5262926168..445ffb0af7 100644 --- a/app/Repositories/ExportJob/ExportJobRepository.php +++ b/app/Repositories/ExportJob/ExportJobRepository.php @@ -78,6 +78,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface $exportJob->key = Str::random(12); $exportJob->status = 'export_status_never_started'; $exportJob->save(); + // breaks the loop: return $exportJob; diff --git a/app/Rules/Actions/SetBudget.php b/app/Rules/Actions/SetBudget.php index 0cf9cc9584..28f96aefa4 100644 --- a/app/Rules/Actions/SetBudget.php +++ b/app/Rules/Actions/SetBudget.php @@ -15,7 +15,6 @@ use FireflyIII\Models\Budget; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; -use Log; /** * Class SetBudget @@ -55,12 +54,9 @@ class SetBudget implements ActionInterface } )->first(); if (!is_null($budget)) { - Log::debug('Will set budget "' . $search . '" (#' . $budget->id . ') on journal #' . $journal->id . '.'); $journal->budgets()->sync([$budget->id]); - } else { - Log::debug('Could not find budget "' . $search . '". Failed.'); } - + return true; } } diff --git a/app/Rules/Actions/SetCategory.php b/app/Rules/Actions/SetCategory.php index 86ccef422d..9e3f542dd3 100644 --- a/app/Rules/Actions/SetCategory.php +++ b/app/Rules/Actions/SetCategory.php @@ -15,7 +15,6 @@ use Auth; use FireflyIII\Models\Category; use FireflyIII\Models\RuleAction; use FireflyIII\Models\TransactionJournal; -use Log; /** * Class SetCategory @@ -47,7 +46,6 @@ class SetCategory implements ActionInterface { $name = $this->action->action_value; $category = Category::firstOrCreateEncrypted(['name' => $name, 'user_id' => Auth::user()->id]); - Log::debug('Will set category "' . $name . '" (#' . $category->id . ') on journal #' . $journal->id . '.'); $journal->categories()->sync([$category->id]); return true; diff --git a/app/Rules/Processor.php b/app/Rules/Processor.php index 58e5d406e2..bf29dcb999 100644 --- a/app/Rules/Processor.php +++ b/app/Rules/Processor.php @@ -19,7 +19,6 @@ use FireflyIII\Rules\Factory\ActionFactory; use FireflyIII\Rules\Factory\TriggerFactory; use FireflyIII\Rules\Triggers\AbstractTrigger; use Illuminate\Support\Collection; -use Log; /** * Class Processor @@ -138,13 +137,11 @@ final class Processor $triggered = $this->triggered(); if ($triggered) { if ($this->actions->count() > 0) { - Log::debug('Journal #' . $journal->id . ' triggered, actions executed.'); $this->actions(); } return true; } - Log::debug('Journal #' . $journal->id . ' not triggered, did nothing.'); return false; @@ -195,7 +192,6 @@ final class Processor } } - Log::debug('Total: ' . $foundTriggers . ' found triggers. ' . $hitTriggers . ' triggers were hit.'); return ($hitTriggers == $foundTriggers && $foundTriggers > 0); diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 14d6528135..de8ee523c3 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -5,7 +5,6 @@ namespace FireflyIII\Support; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; -use Log; /** * Class Navigation diff --git a/app/Support/Twig/Journal.php b/app/Support/Twig/Journal.php index a351385bfa..a0332ca6b7 100644 --- a/app/Support/Twig/Journal.php +++ b/app/Support/Twig/Journal.php @@ -240,7 +240,7 @@ class Journal extends Twig_Extension $cache->addProperty('transaction'); $cache->addProperty('budget-string'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } $budgets = []; @@ -270,7 +270,7 @@ class Journal extends Twig_Extension $cache->addProperty('transaction'); $cache->addProperty('category-string'); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index b7bb92b1bd..7e5471269b 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -19,7 +19,6 @@ use FireflyIII\User; use Google2FA; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Validation\Validator; -use Log; use Session; use Symfony\Component\Translation\TranslatorInterface; @@ -135,7 +134,6 @@ class FireflyValidator extends Validator $value = $this->data['rule-action-value'][$index] ?? false; switch ($name) { default: - Log::debug(' (' . $attribute . ') (index:' . $index . ') Name is "' . $name . '" so no action is taken.'); return true; case 'set_budget':