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