mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-08-28 17:07:21 +00:00
Remove logging
This commit is contained in:
@@ -41,12 +41,12 @@ class TransactionJournalMetaFactory
|
||||
*/
|
||||
public function updateOrCreate(array $data): ?TransactionJournalMeta
|
||||
{
|
||||
Log::debug('In updateOrCreate()');
|
||||
//Log::debug('In updateOrCreate()');
|
||||
$value = $data['data'];
|
||||
/** @var TransactionJournalMeta $entry */
|
||||
$entry = $data['journal']->transactionJournalMeta()->where('name', $data['name'])->first();
|
||||
if (null === $value && null !== $entry) {
|
||||
Log::debug('Value is empty, delete meta value.');
|
||||
//Log::debug('Value is empty, delete meta value.');
|
||||
try {
|
||||
$entry->delete();
|
||||
} catch (Exception $e) { // @phpstan-ignore-line
|
||||
@@ -57,11 +57,11 @@ class TransactionJournalMetaFactory
|
||||
}
|
||||
|
||||
if ($data['data'] instanceof Carbon) {
|
||||
Log::debug('Is a carbon object.');
|
||||
//Log::debug('Is a carbon object.');
|
||||
$value = $data['data']->toW3cString();
|
||||
}
|
||||
if ('' === (string)$value) {
|
||||
Log::debug('Is an empty string.');
|
||||
//Log::debug('Is an empty string.');
|
||||
// don't store blank strings.
|
||||
if (null !== $entry) {
|
||||
Log::debug('Will not store empty strings, delete meta value');
|
||||
@@ -76,7 +76,7 @@ class TransactionJournalMetaFactory
|
||||
}
|
||||
|
||||
if (null === $entry) {
|
||||
Log::debug('Will create new object.');
|
||||
//Log::debug('Will create new object.');
|
||||
Log::debug(sprintf('Going to create new meta-data entry to store "%s".', $data['name']));
|
||||
$entry = new TransactionJournalMeta();
|
||||
$entry->transactionJournal()->associate($data['journal']);
|
||||
|
Reference in New Issue
Block a user