Update find methods to return null

This commit is contained in:
James Cole
2018-02-16 15:19:19 +01:00
parent 28b00f6507
commit 33db99ffd3
16 changed files with 142 additions and 34 deletions

View File

@@ -57,10 +57,18 @@ interface AccountRepositoryInterface
/**
* @param int $accountId
*
* @deprecated
* @return Account
*/
public function find(int $accountId): Account;
/**
* @param int $accountId
*
* @return Account|null
*/
public function findNull(int $accountId): ?Account;
/**
* @param string $number
* @param array $types
@@ -81,9 +89,9 @@ interface AccountRepositoryInterface
* @param string $name
* @param array $types
*
* @return Account
* @return Account|null
*/
public function findByName(string $name, array $types): Account;
public function findByName(string $name, array $types): ?Account;
/**
* Return account type by string.