Skip to content

Commit

Permalink
Merge pull request #196 from Philipp91/gettanmode
Browse files Browse the repository at this point in the history
Make FinTsNew::getSelectedTanMode() public
  • Loading branch information
nemiah authored Jan 5, 2020
2 parents bb10a1e + 4e9bfcf commit 7042c7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Fhp/FinTsNew.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7042c7b

Please sign in to comment.