Code cleanup and realign.

This commit is contained in:
James Cole
2018-08-06 19:14:30 +02:00
parent f7eef25fed
commit 5908c0ce8c
188 changed files with 1019 additions and 1031 deletions

View File

@@ -303,6 +303,7 @@ class AccountRepository implements AccountRepositoryInterface
if (null === $note) {
return null;
}
return $note->text;
}
@@ -450,6 +451,9 @@ class AccountRepository implements AccountRepositoryInterface
* @param array $data
*
* @return Account
* @throws \FireflyIII\Exceptions\FireflyException
* @throws FireflyException
* @throws FireflyException
*/
public function update(Account $account, array $data): Account
{

View File

@@ -50,6 +50,7 @@ interface AttachmentRepositoryInterface
/**
* @param int $attachmentId
*
* @return Attachment|null
*/
public function findWithoutUser(int $attachmentId): ?Attachment;

View File

@@ -323,7 +323,7 @@ class BillRepository implements BillRepositoryInterface
*/
public function getPayDatesInRange(Bill $bill, Carbon $start, Carbon $end): Collection
{
$set = new Collection;
$set = new Collection;
$currentStart = clone $start;
Log::debug(sprintf('Now at bill "%s" (%s)', $bill->name, $bill->repeat_freq));
Log::debug(sprintf('First currentstart is %s', $currentStart->format('Y-m-d')));

View File

@@ -48,7 +48,8 @@ class ExportJobRepository implements ExportJobRepositoryInterface
public function changeStatus(ExportJob $job, string $status): bool
{
Log::debug(sprintf('Change status of job #%d to "%s"', $job->id, $status));
$job->change($status);
$job->status = $status;
$job->save();
return true;
}

View File

@@ -57,6 +57,7 @@ interface ExportJobRepositoryInterface
/**
* @param string $key
*
* @return ExportJob|null
*/
public function findByKey(string $key): ?ExportJob;

View File

@@ -184,6 +184,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
$newConfig = array_merge($currentConfig, $configuration);
$job->configuration = $newConfig;
$job->save();
//Log::debug(sprintf('Set config of job "%s" to: ', $job->key), $newConfig);
return $job;

View File

@@ -54,6 +54,7 @@ interface ImportJobRepositoryInterface
/**
* @param string $key
*
* @return ImportJob|null
*/
public function findByKey(string $key): ?ImportJob;

View File

@@ -707,6 +707,8 @@ class JournalRepository implements JournalRepositoryInterface
*
* @return TransactionJournal
*
* @throws FireflyException
* @throws FireflyException
*/
public function update(TransactionJournal $journal, array $data): TransactionJournal
{

View File

@@ -25,7 +25,6 @@ namespace FireflyIII\Repositories\Journal;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionJournalMeta;

View File

@@ -60,7 +60,7 @@ interface TagRepositoryInterface
*
* @return Tag|null
*/
public function findByTag(string $tag):?Tag;
public function findByTag(string $tag): ?Tag;
/**
* @param int $tagId