Skip to content

Commit

Permalink
Leftover from #4092
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 7, 2020
1 parent 1940532 commit d51e6a7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
6 changes: 0 additions & 6 deletions .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,16 +1443,10 @@
<InvalidStringClass occurrences="1">
<code>new $className</code>
</InvalidStringClass>
<LessSpecificReturnStatement occurrences="1">
<code>(new DOMDocument)-&gt;importNode($element, true)</code>
</LessSpecificReturnStatement>
<MissingReturnType occurrences="1">
<code>xmlToVariable</code>
</MissingReturnType>
<MissingThrowsDocblock occurrences="1"/>
<MoreSpecificReturnType occurrences="1">
<code>DOMElement</code>
</MoreSpecificReturnType>
<RedundantCast occurrences="1">
<code>(string) $entry-&gt;getAttribute('key')</code>
</RedundantCast>
Expand Down
25 changes: 0 additions & 25 deletions src/Util/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
use function preg_replace;
use function settype;
use function strlen;
use DOMCharacterData;
use DOMDocument;
use DOMElement;
use DOMNode;
use DOMText;
use ReflectionClass;
use ReflectionException;
Expand All @@ -31,28 +28,6 @@
*/
final class Xml
{
/**
* @deprecated Only used by assertEqualXMLStructure()
*/
public static function import(DOMElement $element): DOMElement
{
return (new DOMDocument)->importNode($element, true);
}

/**
* @deprecated Only used by assertEqualXMLStructure()
*/
public static function removeCharacterDataNodes(DOMNode $node): void
{
if ($node->hasChildNodes()) {
for ($i = $node->childNodes->length - 1; $i >= 0; $i--) {
if (($child = $node->childNodes->item($i)) instanceof DOMCharacterData) {
$node->removeChild($child);
}
}
}
}

/**
* Escapes a string for the use in XML documents.
*
Expand Down

0 comments on commit d51e6a7

Please sign in to comment.