Updated test database.

This commit is contained in:
James Cole
2016-12-30 13:47:23 +01:00
parent ac86e75233
commit a5036c86dc
32 changed files with 119 additions and 123 deletions

View File

@@ -32,11 +32,6 @@ interface AttachmentRepositoryInterface
*/
public function destroy(Attachment $attachment): bool;
/**
* @return Collection
*/
public function get(): Collection;
/**
* @param Attachment $attachment
*
@@ -45,11 +40,9 @@ interface AttachmentRepositoryInterface
public function exists(Attachment $attachment): bool;
/**
* @param Attachment $attachment
*
* @return string
* @return Collection
*/
public function getContent(Attachment $attachment): string;
public function get(): Collection;
/**
* @param Carbon $start
@@ -59,6 +52,13 @@ interface AttachmentRepositoryInterface
*/
public function getBetween(Carbon $start, Carbon $end): Collection;
/**
* @param Attachment $attachment
*
* @return string
*/
public function getContent(Attachment $attachment): string;
/**
* @param Attachment $attachment
* @param array $attachmentData

View File

@@ -83,6 +83,14 @@ interface BudgetRepositoryInterface
*/
public function getActiveBudgets(): Collection;
/**
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getAllBudgetLimits(Carbon $start, Carbon $end): Collection;
/**
* @param TransactionCurrency $currency
* @param Carbon $start
@@ -92,14 +100,6 @@ interface BudgetRepositoryInterface
*/
public function getAvailableBudget(TransactionCurrency $currency, Carbon $start, Carbon $end): string;
/**
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getAllBudgetLimits(Carbon $start, Carbon $end): Collection;
/**
* @param Budget $budget
* @param Carbon $start

View File

@@ -146,7 +146,6 @@ class CategoryRepository implements CategoryRepositoryInterface
->orderBy('transaction_journals.date', 'ASC')->first(['transaction_journals.date']);
// both exist, the one that is earliest "wins".
if (!is_null($firstTransaction) && !is_null($first) && Carbon::parse($firstTransaction->date)->lt($first)) {
$first = $firstTransaction->date;

View File

@@ -22,6 +22,14 @@ use FireflyIII\Models\ExportJob;
*/
interface ExportJobRepositoryInterface
{
/**
* @param ExportJob $job
* @param string $status
*
* @return bool
*/
public function changeStatus(ExportJob $job, string $status): bool;
/**
* @return bool
*/
@@ -32,14 +40,6 @@ interface ExportJobRepositoryInterface
*/
public function create(): ExportJob;
/**
* @param ExportJob $job
* @param string $status
*
* @return bool
*/
public function changeStatus(ExportJob $job, string $status): bool;
/**
* @param ExportJob $job
*

View File

@@ -14,7 +14,6 @@ declare(strict_types = 1);
namespace FireflyIII\Repositories\User;
use FireflyConfig;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Models\Role;
use FireflyIII\User;
@@ -53,6 +52,20 @@ class UserRepository implements UserRepositoryInterface
return true;
}
/**
* @param User $user
* @param string $password
*
* @return bool
*/
public function changePassword(User $user, string $password): bool
{
$user->password = bcrypt($password);
$user->save();
return true;
}
/**
* @return int
*/
@@ -134,17 +147,4 @@ class UserRepository implements UserRepositoryInterface
return $return;
}
/**
* @param User $user
* @param string $password
*
* @return bool
*/
public function changePassword(User $user, string $password): bool
{
$user->password = bcrypt($password);
$user->save();
return true;
}
}