Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -127,6 +127,7 @@ trait AccountServiceTrait
* @param array $data
*
* @return TransactionJournal|null
* @throws \FireflyIII\Exceptions\FireflyException
*/
public function storeIBJournal(Account $account, array $data): ?TransactionJournal
{
@@ -330,7 +331,7 @@ trait AccountServiceTrait
$entry = $account->accountMeta()->where('name', $field)->first();
// must not be an empty string:
if (isset($data[$field]) && strlen((string)$data[$field]) > 0) {
if (isset($data[$field]) && \strlen((string)$data[$field]) > 0) {
// if $data has field and $entry is null, create new one:
if (null === $entry) {
@@ -357,7 +358,7 @@ trait AccountServiceTrait
*/
public function updateNote(Account $account, string $note): bool
{
if (0 === strlen($note)) {
if (0 === \strlen($note)) {
$dbNote = $account->notes()->first();
if (null !== $dbNote) {
$dbNote->delete();