Various PSR12 code cleanup

This commit is contained in:
James Cole
2022-12-29 19:42:26 +01:00
parent dbf3e76ecc
commit 6cfdc58cb1
415 changed files with 7462 additions and 6874 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* AccountRepositoryInterface.php
* Copyright (c) 2019 james@firefly-iii.org
@@ -40,7 +41,7 @@ interface AccountRepositoryInterface
/**
* Moved here from account CRUD.
*
* @param array $types
* @param array $types
*
* @return int
*/
@@ -50,8 +51,8 @@ interface AccountRepositoryInterface
/**
* Moved here from account CRUD.
*
* @param Account $account
* @param Account|null $moveTo
* @param Account $account
* @param Account|null $moveTo
*
* @return bool
*/
@@ -60,45 +61,45 @@ interface AccountRepositoryInterface
/**
* Find account with same name OR same IBAN or both, but not the same type or ID.
*
* @param Collection $accounts
* @param Collection $accounts
*
* @return Collection
*/
public function expandWithDoubles(Collection $accounts): Collection;
/**
* @param int $accountId
* @param int $accountId
*
* @return Account|null
*/
public function find(int $accountId): ?Account;
/**
* @param string $number
* @param array $types
* @param string $number
* @param array $types
*
* @return Account|null
*/
public function findByAccountNumber(string $number, array $types): ?Account;
/**
* @param string $iban
* @param array $types
* @param string $iban
* @param array $types
*
* @return Account|null
*/
public function findByIbanNull(string $iban, array $types): ?Account;
/**
* @param string $name
* @param array $types
* @param string $name
* @param array $types
*
* @return Account|null
*/
public function findByName(string $name, array $types): ?Account;
/**
* @param Account $account
* @param Account $account
*
* @return TransactionCurrency|null
*/
@@ -107,36 +108,36 @@ interface AccountRepositoryInterface
/**
* Return account type or null if not found.
*
* @param string $type
* @param string $type
*
* @return AccountType|null
*/
public function getAccountTypeByType(string $type): ?AccountType;
/**
* @param array $accountIds
* @param array $accountIds
*
* @return Collection
*/
public function getAccountsById(array $accountIds): Collection;
/**
* @param array $types
* @param array|null $sort
* @param array $types
* @param array|null $sort
*
* @return Collection
*/
public function getAccountsByType(array $types, ?array $sort = []): Collection;
/**
* @param array $types
* @param array $types
*
* @return Collection
*/
public function getActiveAccountsByType(array $types): Collection;
/**
* @param Account $account
* @param Account $account
*
* @return Collection
*/
@@ -148,14 +149,14 @@ interface AccountRepositoryInterface
public function getCashAccount(): Account;
/**
* @param Account $account
* @param Account $account
*
* @return TransactionGroup|null
*/
public function getCreditTransactionGroup(Account $account): ?TransactionGroup;
/**
* @param array $types
* @param array $types
*
* @return Collection
*/
@@ -164,7 +165,7 @@ interface AccountRepositoryInterface
/**
* Get account location, if any.
*
* @param Account $account
* @param Account $account
*
* @return Location|null
*/
@@ -173,8 +174,8 @@ interface AccountRepositoryInterface
/**
* Return meta value for account. Null if not found.
*
* @param Account $account
* @param string $field
* @param Account $account
* @param string $field
*
* @return null|string
*/
@@ -183,14 +184,14 @@ interface AccountRepositoryInterface
/**
* Get note text or null.
*
* @param Account $account
* @param Account $account
*
* @return null|string
*/
public function getNoteText(Account $account): ?string;
/**
* @param Account $account
* @param Account $account
*
* @return TransactionJournal|null
*
@@ -200,7 +201,7 @@ interface AccountRepositoryInterface
/**
* Returns the amount of the opening balance for this account.
*
* @param Account $account
* @param Account $account
*
* @return string|null
*/
@@ -209,21 +210,21 @@ interface AccountRepositoryInterface
/**
* Return date of opening balance as string or null.
*
* @param Account $account
* @param Account $account
*
* @return null|string
*/
public function getOpeningBalanceDate(Account $account): ?string;
/**
* @param Account $account
* @param Account $account
*
* @return TransactionGroup|null
*/
public function getOpeningBalanceGroup(Account $account): ?TransactionGroup;
/**
* @param Account $account
* @param Account $account
*
* @return Collection
*/
@@ -232,28 +233,28 @@ interface AccountRepositoryInterface
/**
* Find or create the opposing reconciliation account.
*
* @param Account $account
* @param Account $account
*
* @return Account|null
*/
public function getReconciliation(Account $account): ?Account;
/**
* @param Account $account
* @param Account $account
*
* @return Collection
*/
public function getUsedCurrencies(Account $account): Collection;
/**
* @param Account $account
* @param Account $account
*
* @return bool
*/
public function isLiability(Account $account): bool;
/**
* @param string $type
* @param string $type
*
* @return int
*/
@@ -262,7 +263,7 @@ interface AccountRepositoryInterface
/**
* Returns the date of the very first transaction in this account.
*
* @param Account $account
* @param Account $account
*
* @return TransactionJournal|null
*/
@@ -271,7 +272,7 @@ interface AccountRepositoryInterface
/**
* Returns the date of the very first transaction in this account.
*
* @param Account $account
* @param Account $account
*
* @return Carbon|null
*/
@@ -283,38 +284,38 @@ interface AccountRepositoryInterface
public function resetAccountOrder(): void;
/**
* @param string $query
* @param array $types
* @param int $limit
* @param string $query
* @param array $types
* @param int $limit
*
* @return Collection
*/
public function searchAccount(string $query, array $types, int $limit): Collection;
/**
* @param string $query
* @param array $types
* @param int $limit
* @param string $query
* @param array $types
* @param int $limit
*
* @return Collection
*/
public function searchAccountNr(string $query, array $types, int $limit): Collection;
/**
* @param User $user
* @param User $user
*/
public function setUser(User $user);
/**
* @param array $data
* @param array $data
*
* @return Account
*/
public function store(array $data): Account;
/**
* @param Account $account
* @param array $data
* @param Account $account
* @param array $data
*
* @return Account
*/