Expand and refactor factories.

This commit is contained in:
James Cole
2018-02-19 19:44:46 +01:00
parent 5bb7530642
commit b3fe24b713
11 changed files with 549 additions and 241 deletions

View File

@@ -28,6 +28,8 @@ use FireflyIII\Models\AccountType;
use FireflyIII\User;
/**
* Factory to create or return accounts.
*
* Class AccountFactory
*/
class AccountFactory
@@ -35,14 +37,6 @@ class AccountFactory
/** @var User */
private $user;
/**
* TagFactory constructor.
*/
public function __construct()
{
}
/**
* @param array $data
*
@@ -71,7 +65,7 @@ class AccountFactory
}
}
$newAccount = $this->create(
return $this->create(
[
'user_id' => $this->user->id,
'name' => $accountName,
@@ -81,7 +75,6 @@ class AccountFactory
'active' => true,
]
);
return $newAccount;
}
/**