Skip to content

Commit

Permalink
add parameter types ContextXMLRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
grummbeer committed Dec 9, 2023
1 parent 9805bed commit 4e7cf77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 0 additions & 10 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,3 @@ parameters:
message: "#^Method AqBanking\\\\Command\\\\ListAccountsCommand\\:\\:execute\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Command/ListAccountsCommand.php

-
message: "#^Method AqBanking\\\\ContextXmlRenderer\\:\\:renderMultiLineElement\\(\\) has parameter \\$nodes with generic class DOMNodeList but does not specify its types\\: TNode$#"
count: 1
path: src/ContextXmlRenderer.php

-
message: "#^Method AqBanking\\\\ContextXmlRenderer\\:\\:renderSimpleTextElement\\(\\) has parameter \\$valueNodes with generic class DOMNodeList but does not specify its types\\: TNode$#"
count: 1
path: src/ContextXmlRenderer.php
6 changes: 6 additions & 0 deletions src/ContextXmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ public function getBalances(): array
return $balances;
}

/**
* @param DOMNodeList<DOMNode> $nodes
*/
private function renderMultiLineElement(DOMNodeList $nodes): string
{
$lines = [];
Expand Down Expand Up @@ -157,6 +160,9 @@ private function renderMoneyElement(DOMNode $node): Money
return $this->moneyElementRenderer->render($valueString, $currencyString);
}

/**
* @param DOMNodeList<DOMNode> $valueNodes
*/
private function renderSimpleTextElement(DOMNodeList $valueNodes): string
{
return trim($valueNodes->item(0)->nodeValue);
Expand Down

0 comments on commit 4e7cf77

Please sign in to comment.