Remove logging

This commit is contained in:
James Cole
2021-04-10 17:26:07 +02:00
parent a2957b9e80
commit 5d7ca1ef9a

View File

@@ -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']);