mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Added import and type hinting
This commit is contained in:
parent
ce917298ed
commit
3ba41d712f
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Support\FinTS;
|
namespace FireflyIII\Support\FinTS;
|
||||||
|
|
||||||
|
use Fhp\Model\SEPAAccount;
|
||||||
use FireflyIII\Exceptions\FireflyException;
|
use FireflyIII\Exceptions\FireflyException;
|
||||||
use Illuminate\Support\Facades\Crypt;
|
use Illuminate\Support\Facades\Crypt;
|
||||||
|
|
||||||
@ -46,7 +47,7 @@ class FinTS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Fhp\Model\SEPAAccount[]
|
* @return SEPAAccount[]
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getAccounts()
|
public function getAccounts()
|
||||||
@ -60,13 +61,13 @@ class FinTS
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $accountNumber
|
* @param string $accountNumber
|
||||||
* @return \Fhp\Model\SEPAAccount
|
* @return SEPAAccount
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getAccount($accountNumber)
|
public function getAccount(string $accountNumber)
|
||||||
{
|
{
|
||||||
$accounts = $this->getAccounts();
|
$accounts = $this->getAccounts();
|
||||||
$filteredAccounts = array_filter($accounts, function ($account) use ($accountNumber) {
|
$filteredAccounts = array_filter($accounts, function (SEPAAccount $account) use ($accountNumber) {
|
||||||
return $account->getAccountNumber() == $accountNumber;
|
return $account->getAccountNumber() == $accountNumber;
|
||||||
});
|
});
|
||||||
if (count($filteredAccounts) != 1) {
|
if (count($filteredAccounts) != 1) {
|
||||||
@ -76,13 +77,13 @@ class FinTS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \Fhp\Model\SEPAAccount $account
|
* @param SEPAAccount $account
|
||||||
* @param \DateTime $from
|
* @param \DateTime $from
|
||||||
* @param \DateTIme $to
|
* @param \DateTIme $to
|
||||||
* @return \Fhp\Model\StatementOfAccount\StatementOfAccount|null
|
* @return \Fhp\Model\StatementOfAccount\StatementOfAccount|null
|
||||||
* @throws FireflyException
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
public function getStatementOfAccount(\Fhp\Model\SEPAAccount $account, \DateTime $from, \DateTIme $to)
|
public function getStatementOfAccount(SEPAAccount $account, \DateTime $from, \DateTIme $to)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return $this->finTS->getStatementOfAccount($account, $from, $to);
|
return $this->finTS->getStatementOfAccount($account, $from, $to);
|
||||||
|
Loading…
Reference in New Issue
Block a user