First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -55,7 +55,7 @@ trait JournalServiceTrait
return; // @codeCoverageIgnore
}
foreach ($data['tags'] as $string) {
if (\strlen($string) > 0) {
if ('' != $string) {
$tag = $factory->findOrCreate($string);
if (null !== $tag) {
$set[] = $tag->id;
@@ -116,7 +116,7 @@ trait JournalServiceTrait
protected function storeNote(TransactionJournal $journal, ?string $notes): void
{
$notes = (string)$notes;
if (\strlen($notes) > 0) {
if ('' !== $notes) {
$note = $journal->notes()->first();
if (null === $note) {
$note = new Note;