From 4e9bfcfa87046de404e7da486864e1d75806856e Mon Sep 17 00:00:00 2001 From: Philipp Keck Date: Thu, 2 Jan 2020 19:10:33 +0100 Subject: [PATCH] Make FinTsNew::getSelectedTanMode() public It can be useful for application code, because the TanMode object contains information about the TAN format (allowed characters, maximum length) that the TanRequest does not contain. --- lib/Fhp/FinTsNew.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Fhp/FinTsNew.php b/lib/Fhp/FinTsNew.php index d22f39a4..78b1c0ba 100644 --- a/lib/Fhp/FinTsNew.php +++ b/lib/Fhp/FinTsNew.php @@ -526,11 +526,11 @@ private function ensureSynchronized() /** * If the selected TAN mode was provided as an int, resolves it to a full {@link TanMode} instance, which may * involve a request to the server to retrieve the BPD. Then returns it. - * @return VerfahrensparameterZweiSchrittVerfahrenV6|null The current TAN mode, null if none was selected, never an int. + * @return TanMode|null The current TAN mode, null if none was selected, never an int. * @throws CurlException When the connection fails in a layer below the FinTS protocol. * @throws ServerException When the server resopnds with an error during the BPD fetch. */ - private function getSelectedTanMode(): ?VerfahrensparameterZweischrittVerfahrenV6 + public function getSelectedTanMode(): ?TanMode { if (is_int($this->selectedTanMode)) { $this->ensureBpdAvailable(); @@ -560,12 +560,12 @@ private function getSelectedTanMode(): ?VerfahrensparameterZweischrittVerfahrenV /** * Like {@link #getSelectedTanMode()}, but throws an exception if none was selected. - * @return VerfahrensparameterZweiSchrittVerfahrenV6 The current TAN mode. + * @return TanMode The current TAN mode. * @throws \RuntimeException If no TAN mode has been selected. * @throws CurlException When the connection fails in a layer below the FinTS protocol. * @throws ServerException When the server resopnds with an error during the BPD fetch. */ - private function requireTanMode(): VerfahrensparameterZweiSchrittVerfahrenV6 + private function requireTanMode(): TanMode { $tanMode = $this->getSelectedTanMode(); if ($tanMode === null) {