mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 00:27:30 +00:00
Expand and refactor factories.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user