Expanded test coverage.

This commit is contained in:
James Cole
2017-03-24 15:01:53 +01:00
parent 222b3008d5
commit fe66d089ad
20 changed files with 357 additions and 149 deletions

View File

@@ -9,7 +9,7 @@
* See the LICENSE file for details.
*/
declare(strict_types = 1);
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
@@ -135,6 +135,20 @@ class JournalRepository implements JournalRepositoryInterface
return TransactionType::orderBy('type', 'ASC')->get();
}
/**
* @param TransactionJournal $journal
* @param int $order
*
* @return bool
*/
public function setOrder(TransactionJournal $journal, int $order): bool
{
$journal->order = $order;
$journal->save();
return true;
}
/**
* @param User $user
*/

View File

@@ -9,7 +9,7 @@
* See the LICENSE file for details.
*/
declare(strict_types = 1);
declare(strict_types=1);
namespace FireflyIII\Repositories\Journal;
@@ -67,6 +67,14 @@ interface JournalRepositoryInterface
*/
public function getTransactionTypes(): Collection;
/**
* @param TransactionJournal $journal
* @param int $order
*
* @return bool
*/
public function setOrder(TransactionJournal $journal, int $order): bool;
/**
* @param User $user
*/