Various code cleanup.

This commit is contained in:
James Cole
2021-04-07 07:53:05 +02:00
parent 49013264d5
commit eddf0c1200
50 changed files with 138 additions and 152 deletions

View File

@@ -220,7 +220,6 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getAccountsById(array $accountIds): Collection
{
/** @var Collection $result */
$query = $this->user->accounts();
if (0 !== count($accountIds)) {
@@ -240,7 +239,6 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getAccountsByType(array $types): Collection
{
/** @var Collection $result */
$query = $this->user->accounts();
if (0 !== count($types)) {
$query->accountTypeIn($types);
@@ -263,7 +261,6 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getActiveAccountsByType(array $types): Collection
{
/** @var Collection $result */
$query = $this->user->accounts()->with(
['accountmeta' => function (HasMany $query) {
$query->where('name', 'account_role');
@@ -324,7 +321,6 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getInactiveAccountsByType(array $types): Collection
{
/** @var Collection $result */
$query = $this->user->accounts()->with(
['accountmeta' => function (HasMany $query) {
$query->where('name', 'account_role');